Simpler deployment.
authorŁukasz Rekucki <lrekucki@gmail.com>
Mon, 19 Apr 2010 19:50:37 +0000 (21:50 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Mon, 19 Apr 2010 20:16:03 +0000 (22:16 +0200)
393 files changed:
README.md [new file with mode: 0644]
README.rst [deleted file]
deployment.py [new file with mode: 0644]
fabfile.py [deleted file]
localsettings.sample [new file with mode: 0644]
logging.cfg [new file with mode: 0644]
logging.cfg.dev [new file with mode: 0644]
platforma/__init__.py [deleted file]
platforma/compress_settings.py [deleted file]
platforma/config/localsettings.sample [deleted file]
platforma/config/logging.cfg [deleted file]
platforma/config/logging.cfg.dev [deleted file]
platforma/config/platforma.vhost.template [deleted file]
platforma/config/platforma.wsgi.template [deleted file]
platforma/config/requirements.txt [deleted file]
platforma/context_processors.py [deleted file]
platforma/locale/pl/LC_MESSAGES/django.mo [deleted file]
platforma/locale/pl/LC_MESSAGES/django.po [deleted file]
platforma/manage.py [deleted file]
platforma/settings.py [deleted file]
platforma/static/css/dialogs.css [deleted file]
platforma/static/css/filelist.css [deleted file]
platforma/static/css/gallery.css [deleted file]
platforma/static/css/history.css [deleted file]
platforma/static/css/html.css [deleted file]
platforma/static/css/html_print.css [deleted file]
platforma/static/css/jquery.autocomplete.css [deleted file]
platforma/static/css/master.css [deleted file]
platforma/static/css/summary.css [deleted file]
platforma/static/css/xmlcolors_15032010.css [deleted file]
platforma/static/filebrowser/css/filebrowser.css [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_delete.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_delete_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_imagegenerator.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_makethumb.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_rename.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_rename_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_select.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_select_disabled.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_select_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_show.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_show_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_showversions.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_icon_showversions_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_code.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_document.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_folder.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_image.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_sound.gif [deleted file]
platforma/static/filebrowser/img/filebrowser_type_video.gif [deleted file]
platforma/static/filebrowser/img/tableheader_arrow_down.gif [deleted file]
platforma/static/filebrowser/img/tableheader_arrow_up.gif [deleted file]
platforma/static/filebrowser/img/tableheader_arrows.gif [deleted file]
platforma/static/filebrowser/js/AddFileBrowser.js [deleted file]
platforma/static/filebrowser/js/FB_CKEditor.js [deleted file]
platforma/static/filebrowser/js/FB_FileBrowseField.js [deleted file]
platforma/static/filebrowser/js/FB_TinyMCE.js [deleted file]
platforma/static/filebrowser/js/TinyMCEAdmin.js [deleted file]
platforma/static/filebrowser/js/jquery-1.3.2.min.js [deleted file]
platforma/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf [deleted file]
platforma/static/filebrowser/uploadify/cancel.png [deleted file]
platforma/static/filebrowser/uploadify/check.php [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/images/BitString.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/URI.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as [deleted file]
platforma/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as [deleted file]
platforma/static/filebrowser/uploadify/example/_notes/dwsync.xml [deleted file]
platforma/static/filebrowser/uploadify/example/cancel.png [deleted file]
platforma/static/filebrowser/uploadify/example/css/_notes/dwsync.xml [deleted file]
platforma/static/filebrowser/uploadify/example/css/default.css [deleted file]
platforma/static/filebrowser/uploadify/example/css/uploadify.css [deleted file]
platforma/static/filebrowser/uploadify/example/index.php [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/check.php [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/expressInstall.swf [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/swfobject.js [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/uploadify.php [deleted file]
platforma/static/filebrowser/uploadify/example/scripts/uploadify.swf [deleted file]
platforma/static/filebrowser/uploadify/expressInstall.swf [deleted file]
platforma/static/filebrowser/uploadify/jquery-1.3.2.min.js [deleted file]
platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js [deleted file]
platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js [deleted file]
platforma/static/filebrowser/uploadify/swfobject.js [deleted file]
platforma/static/filebrowser/uploadify/uploadify.allglyphs.swf [deleted file]
platforma/static/filebrowser/uploadify/uploadify.css [deleted file]
platforma/static/filebrowser/uploadify/uploadify.fla [deleted file]
platforma/static/filebrowser/uploadify/uploadify.php [deleted file]
platforma/static/filebrowser/uploadify/uploadify.swf [deleted file]
platforma/static/icons/close.png [deleted file]
platforma/static/icons/go-next.png [deleted file]
platforma/static/icons/go-previous.png [deleted file]
platforma/static/icons/zoom.png [deleted file]
platforma/static/icons/zoom_in.png [deleted file]
platforma/static/icons/zoom_out.png [deleted file]
platforma/static/img/gallery.png [deleted file]
platforma/static/img/logo.png [deleted file]
platforma/static/img/sample_cover.png [deleted file]
platforma/static/img/spinner.gif [deleted file]
platforma/static/js/button_scripts.js [deleted file]
platforma/static/js/jquery-1.4.2.min.js [deleted file]
platforma/static/js/jquery.autocomplete.js [deleted file]
platforma/static/js/jquery.blockui.js [deleted file]
platforma/static/js/jquery.elastic.js [deleted file]
platforma/static/js/lib/codemirror/codemirror.js [deleted file]
platforma/static/js/lib/codemirror/editor.js [deleted file]
platforma/static/js/lib/codemirror/parsexml.js [deleted file]
platforma/static/js/lib/codemirror/select.js [deleted file]
platforma/static/js/lib/codemirror/stringstream.js [deleted file]
platforma/static/js/lib/codemirror/tokenize.js [deleted file]
platforma/static/js/lib/codemirror/undo.js [deleted file]
platforma/static/js/lib/codemirror/util.js [deleted file]
platforma/static/js/slugify.js [deleted file]
platforma/static/js/wiki/base.js [deleted file]
platforma/static/js/wiki/dialog_addtag.js [deleted file]
platforma/static/js/wiki/dialog_save.js [deleted file]
platforma/static/js/wiki/loader.js [deleted file]
platforma/static/js/wiki/loader_readonly.js [deleted file]
platforma/static/js/wiki/view_column_diff.js [deleted file]
platforma/static/js/wiki/view_editor_source.js [deleted file]
platforma/static/js/wiki/view_editor_wysiwyg.js [deleted file]
platforma/static/js/wiki/view_gallery.js [deleted file]
platforma/static/js/wiki/view_history.js [deleted file]
platforma/static/js/wiki/view_summary.js [deleted file]
platforma/static/js/wiki/wikiapi.js [deleted file]
platforma/static/js/wiki/xslt.js [deleted file]
platforma/static/xsl/wl2html_client.xsl [deleted file]
platforma/templates/404.html [deleted file]
platforma/templates/500.html [deleted file]
platforma/templates/503.html [deleted file]
platforma/templates/admin/index.html [deleted file]
platforma/templates/base.html [deleted file]
platforma/templates/registration/head_login.html [deleted file]
platforma/templates/registration/login.html [deleted file]
platforma/urls.py [deleted file]
redakcja.vhost.template [new file with mode: 0644]
redakcja.wsgi.template [new file with mode: 0644]
redakcja/__init__.py [new file with mode: 0644]
redakcja/compress_settings.py [new file with mode: 0644]
redakcja/context_processors.py [new file with mode: 0644]
redakcja/locale/pl/LC_MESSAGES/django.mo [new file with mode: 0644]
redakcja/locale/pl/LC_MESSAGES/django.po [new file with mode: 0644]
redakcja/manage.py [new file with mode: 0755]
redakcja/settings.py [new file with mode: 0644]
redakcja/static/css/dialogs.css [new file with mode: 0644]
redakcja/static/css/filelist.css [new file with mode: 0644]
redakcja/static/css/gallery.css [new file with mode: 0644]
redakcja/static/css/history.css [new file with mode: 0644]
redakcja/static/css/html.css [new file with mode: 0644]
redakcja/static/css/html_print.css [new file with mode: 0644]
redakcja/static/css/jquery.autocomplete.css [new file with mode: 0644]
redakcja/static/css/master.css [new file with mode: 0644]
redakcja/static/css/summary.css [new file with mode: 0644]
redakcja/static/css/xmlcolors_15032010.css [new file with mode: 0644]
redakcja/static/filebrowser/css/filebrowser.css [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_delete.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_delete_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_makethumb.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_rename.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_rename_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_select.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_select_disabled.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_select_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_show.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_show_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_showversions.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_icon_showversions_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_code.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_document.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_folder.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_image.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_sound.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/filebrowser_type_video.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/tableheader_arrow_down.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/tableheader_arrow_up.gif [new file with mode: 0644]
redakcja/static/filebrowser/img/tableheader_arrows.gif [new file with mode: 0644]
redakcja/static/filebrowser/js/AddFileBrowser.js [new file with mode: 0644]
redakcja/static/filebrowser/js/FB_CKEditor.js [new file with mode: 0644]
redakcja/static/filebrowser/js/FB_FileBrowseField.js [new file with mode: 0644]
redakcja/static/filebrowser/js/FB_TinyMCE.js [new file with mode: 0644]
redakcja/static/filebrowser/js/TinyMCEAdmin.js [new file with mode: 0644]
redakcja/static/filebrowser/js/jquery-1.3.2.min.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/cancel.png [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/check.php [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/images/BitString.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/URI.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/_notes/dwsync.xml [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/cancel.png [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/css/_notes/dwsync.xml [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/css/default.css [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/css/uploadify.css [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/index.php [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/check.php [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/expressInstall.swf [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/swfobject.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/uploadify.php [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/example/scripts/uploadify.swf [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/expressInstall.swf [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/jquery-1.3.2.min.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/swfobject.js [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/uploadify.allglyphs.swf [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/uploadify.css [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/uploadify.fla [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/uploadify.php [new file with mode: 0644]
redakcja/static/filebrowser/uploadify/uploadify.swf [new file with mode: 0644]
redakcja/static/icons/close.png [new file with mode: 0644]
redakcja/static/icons/go-next.png [new file with mode: 0644]
redakcja/static/icons/go-previous.png [new file with mode: 0644]
redakcja/static/icons/zoom.png [new file with mode: 0644]
redakcja/static/icons/zoom_in.png [new file with mode: 0644]
redakcja/static/icons/zoom_out.png [new file with mode: 0644]
redakcja/static/img/gallery.png [new file with mode: 0644]
redakcja/static/img/logo.png [new file with mode: 0644]
redakcja/static/img/sample_cover.png [new file with mode: 0644]
redakcja/static/img/spinner.gif [new file with mode: 0644]
redakcja/static/js/button_scripts.js [new file with mode: 0644]
redakcja/static/js/jquery-1.4.2.min.js [new file with mode: 0644]
redakcja/static/js/jquery.autocomplete.js [new file with mode: 0644]
redakcja/static/js/jquery.blockui.js [new file with mode: 0644]
redakcja/static/js/jquery.elastic.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/codemirror.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/editor.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/parsexml.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/select.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/stringstream.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/tokenize.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/undo.js [new file with mode: 0644]
redakcja/static/js/lib/codemirror/util.js [new file with mode: 0644]
redakcja/static/js/slugify.js [new file with mode: 0644]
redakcja/static/js/wiki/base.js [new file with mode: 0644]
redakcja/static/js/wiki/dialog_addtag.js [new file with mode: 0644]
redakcja/static/js/wiki/dialog_save.js [new file with mode: 0644]
redakcja/static/js/wiki/loader.js [new file with mode: 0644]
redakcja/static/js/wiki/loader_readonly.js [new file with mode: 0644]
redakcja/static/js/wiki/view_column_diff.js [new file with mode: 0644]
redakcja/static/js/wiki/view_editor_source.js [new file with mode: 0644]
redakcja/static/js/wiki/view_editor_wysiwyg.js [new file with mode: 0644]
redakcja/static/js/wiki/view_gallery.js [new file with mode: 0644]
redakcja/static/js/wiki/view_history.js [new file with mode: 0644]
redakcja/static/js/wiki/view_summary.js [new file with mode: 0644]
redakcja/static/js/wiki/wikiapi.js [new file with mode: 0644]
redakcja/static/js/wiki/xslt.js [new file with mode: 0644]
redakcja/static/xsl/wl2html_client.xsl [new file with mode: 0644]
redakcja/templates/404.html [new file with mode: 0644]
redakcja/templates/500.html [new file with mode: 0644]
redakcja/templates/503.html [new file with mode: 0644]
redakcja/templates/admin/index.html [new file with mode: 0644]
redakcja/templates/base.html [new file with mode: 0644]
redakcja/templates/registration/head_login.html [new file with mode: 0644]
redakcja/templates/registration/login.html [new file with mode: 0644]
redakcja/urls.py [new file with mode: 0644]
requirements.txt [new file with mode: 0644]
setup.py [deleted file]

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..47fad0c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+====================
+Platforma Redakcyjna
+====================
+
+Opis projektu
+=============
+Platforma to serwis służący do grupowej edycji książek na potrzeby serwisu WolneLektury.pl.
+
+Instalacja i użycie
+===================
+#. Ściągnij i zainstaluj `pip <http://pypi.python.org/pypi/pip>`_
+#. Przejdź do katalogu serwisu w konsoli
+#. Zainstaluj wymagane biblioteki komendą::
+
+       pip install -r requirements.txt
+
+#. Wypełnij bazę danych (Django poprosi o utworzenie pierwszego użytkownika)::
+
+       ./project/manage.py syncdb
+
+#. Skopiuj zawartość pliku `project/localsettings.sample` do `project/localsettings.py` i zmień go zgodnie ze swoimi potrzebami.
+
+#. Uruchom serwer deweloperski::
+
+       ./project/manage.py runserver
+
+#. Zalecane jest serwowanie aplikacji przez `modwsgi <http://code.google.com/p/modwsgi/>`_ na serwerze `Apache2 <http://httpd.apache.org/>`_ przy pomocy załączonego skryptu `dispatch.fcgi`. Inne strategie wdrożeniowe opisane są w `Dokumentacji Django <http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index>`_.
+
+Wdrożenie
+=========
+#. Ściągnij i zainstaluj `fabric <http://docs.fabfile.org/>`_
+#. Przejdź do katalogu serwisu w konsoli
+#. Aby wdrożyć serwis na serwer deweloperski wpisz komendę::
+
+       fab staging deploy
+       
+ Aby wdrożyć serwis na serwer produkcyjny wpisz::
+
+       fab production deploy
+
diff --git a/README.rst b/README.rst
deleted file mode 100644 (file)
index 47fad0c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-====================
-Platforma Redakcyjna
-====================
-
-Opis projektu
-=============
-Platforma to serwis służący do grupowej edycji książek na potrzeby serwisu WolneLektury.pl.
-
-Instalacja i użycie
-===================
-#. Ściągnij i zainstaluj `pip <http://pypi.python.org/pypi/pip>`_
-#. Przejdź do katalogu serwisu w konsoli
-#. Zainstaluj wymagane biblioteki komendą::
-
-       pip install -r requirements.txt
-
-#. Wypełnij bazę danych (Django poprosi o utworzenie pierwszego użytkownika)::
-
-       ./project/manage.py syncdb
-
-#. Skopiuj zawartość pliku `project/localsettings.sample` do `project/localsettings.py` i zmień go zgodnie ze swoimi potrzebami.
-
-#. Uruchom serwer deweloperski::
-
-       ./project/manage.py runserver
-
-#. Zalecane jest serwowanie aplikacji przez `modwsgi <http://code.google.com/p/modwsgi/>`_ na serwerze `Apache2 <http://httpd.apache.org/>`_ przy pomocy załączonego skryptu `dispatch.fcgi`. Inne strategie wdrożeniowe opisane są w `Dokumentacji Django <http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index>`_.
-
-Wdrożenie
-=========
-#. Ściągnij i zainstaluj `fabric <http://docs.fabfile.org/>`_
-#. Przejdź do katalogu serwisu w konsoli
-#. Aby wdrożyć serwis na serwer deweloperski wpisz komendę::
-
-       fab staging deploy
-       
- Aby wdrożyć serwis na serwer produkcyjny wpisz::
-
-       fab production deploy
-
diff --git a/deployment.py b/deployment.py
new file mode 100644 (file)
index 0000000..bdfbb43
--- /dev/null
@@ -0,0 +1,65 @@
+#!/srv/internal/cas/pythonenv/bin/python
+from __future__ import with_statement
+
+import shutil
+import os
+import sys
+
+from string import Template
+
+def render_template(source, dest, context={}):
+    print "Rendering template:",
+    with open(source, 'rb') as source_file:
+        t = Template(source_file.read())
+    with open(dest, 'wb') as dest_file:
+        dest_file.write(t.safe_substitute(context))
+    print "done."
+
+def restart_wsgi():
+    print "Restarting wsgi application:",
+    os.system("touch %s" % WSGI_TARGET)
+    print "done."
+
+def update_application():
+    print "Updating repository.",
+    os.system("cd %s; git pull" % PROJECT_ROOT)
+    print "Installing requirements"
+    os.system("pip install -r %s" % os.path.join(PROJECT_ROOT, 'requirements.txt'))
+    print "Installing local requirements"
+    os.system("pip install -r %s" % os.path.join(ROOT, 'etc', 'requirements.txt'))
+    print "done."
+
+ROOT = os.path.dirname(os.path.abspath(__file__))
+
+PYTHON = os.path.join(ROOT, 'pythonenv', 'bin', 'python')
+PYTHON_SITE = os.path.join(ROOT, 'pythonenv', 'lib', 'python2.6', 'site-packages')
+
+PROJECT_NAME = 'redakcja'
+PROJECT_ROOT = os.path.join(ROOT, 'app')
+
+MEDIA_ROOT = os.path.join(ROOT, 'www', 'media')
+
+ADMIN_EMAIL = 'lrekucki@gmail.com'
+
+WSGI_TARGET = os.path.join(ROOT, 'www', 'wsgi', PROJECT_NAME + '.wsgi')
+WSGI_DIR = os.path.dirname(WSGI_TARGET)
+
+WSGI_USER = PROJECT_NAME
+WSGI_PROCESSES = 5
+WSGI_THREADS = 1
+
+DOMAIN = 'redakcja.wolnelektury.pl'
+DOMAIN_ALIASES = 'redakcja.nowoczesnapolska.org.pl'
+
+#
+# Load local configuration
+#
+sys.path = [ os.path.join(ROOT, 'etc') ] + sys.path
+
+from local_deployment import *
+
+if __name__ == '__main__':
+    update_application()
+    render_template(os.path.join(PROJECT_ROOT, PROJECT_NAME + '.wsgi.template'), WSGI_TARGET, context=globals())
+    render_template(os.path.join(PROJECT_ROOT, PROJECT_NAME + '.vhost.template'), os.path.join(ROOT, 'etc', PROJECT_NAME + '.vhost'), context=globals())
+    restart_wsgi()
diff --git a/fabfile.py b/fabfile.py
deleted file mode 100644 (file)
index 399f1c2..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-from __future__ import with_statement  # needed for python 2.5
-from fabric.api import *
-from fabric.contrib import files
-
-import os
-import time
-
-# ==========
-# = Config =
-# ==========
-# Globals
-env.project_name = 'platforma'
-env.use_south = True
-env.giturl = "git://github.com/fnp/redakcja.git"
-
-
-# Servers
-def staging():
-    """Use staging server"""
-    env.hosts = ['stigma.nowoczesnapolska.org.pl:2222']
-    env.user = 'platforma'
-    env.path = '/var/services/platforma'
-    env.python = '/usr/bin/python'
-    env.virtualenv = '/usr/bin/virtualenv'
-    env.pip = '/usr/bin/pip'
-    env.gitbranch = "staging"
-    common()
-
-
-def production():
-    """Use production server"""
-    env.hosts = ['szo.nowoczesnapolska.org.pl:2225']
-    env.user = 'librarian'
-    env.gitbranch = 'master'
-    env.sandbox = '/srv/library-in-a-box/sandbox/'
-    env.virtualenv = os.path.join(env.sandbox, 'bin', 'virtualenv')
-
-    env.pip = os.path.join(env.sandbox, 'python', 'bin', 'pip')
-    env.python = os.path.join(env.sandbox, 'python', 'bin', 'python')
-    common()
-
-
-def common():
-    env.path = os.path.join(env.sandbox, env.project_name)
-    env.target = os.path.join(env.path, 'bin', 'python')
-
-
-# =========
-# = Tasks =
-# =========
-def test():
-    "Run the test suite and bail out if it fails"
-    require('hosts', 'path', provided_by=[staging, production])
-    result = run('cd %(path)s/%(project_name)s; %(python)s manage.py test' % env)
-
-
-def setup():
-    """
-    Setup a fresh virtualenv as well as a few useful directories, then run
-    a full deployment. virtualenv and pip should be already installed.
-    """
-    require('hosts', 'sandbox', provided_by=[staging, production])
-
-    run("mkdir -p %(path)s; mkdir -p %(path)s/www/wsgi; mkdir -p %(path)s/www/media" % env)
-
-    # make a git mirror
-    run("""cd %(path)s;
-git clone %(giturl)s mirror;
-cd %(path)s/mirror;
-git pull""" % env, pty=True)
-
-    run('%(virtualenv)s %(path)s' % env, pty=True)
-    run('cd %(path)s; rm -rf releases shared packages; mkdir -p releases; mkdir -p shared; mkdir -p packages;' % env, pty=True)
-
-    # symlink static content
-    run("""cd %(path)s/www/media;
-ln -sf %(path)s/releases/current/%(project_name)s/static static
-ln -sf %(path)s/lib/python2.6/site-packages/django/contrib/admin/media admin-media
-mkdir -p dynamic
-""" % env)
-
-    run('cd %(path)s/releases; ln -s . current; ln -s . previous' % env, pty=True)
-
-    deploy()
-
-
-def deploy():
-    """
-    Deploy the latest version of the site to the servers,
-    install any required third party modules,
-    install the virtual host and then restart the webserver
-    """
-    require('hosts', 'sandbox', 'gitbranch', provided_by=[staging, production])
-
-    env.release = time.strftime('%Y-%m-%dT%H%M')
-
-    prepare_package_from_git()
-
-    upload_wsgi_script()
-#    upload_vhost_sample()
-    install_requirements()
-    hardlink_localsettings()
-    symlink_current_release()
-    migrate()
-    django_compress()
-    restart_webserver()
-
-
-def deploy_version(version):
-    "Specify a specific version to be made live"
-    require('hosts', 'path', provided_by=[localhost, webserver])
-    env.version = version
-    with cd(env.path):
-        run('rm releases/previous; mv releases/current releases/previous;', pty=True)
-        run('ln -s %(version)s releases/current' % env, pty=True)
-
-    restart_webserver()
-
-
-def rollback():
-    """
-    Limited rollback capability. Simple loads the previously current
-    version of the code. Rolling back again will swap between the two.
-    """
-    require('hosts', provided_by=[staging, production])
-    require('path')
-    with cd(env.path):
-        run('mv releases/current releases/_previous;', pty=True)
-        run('mv releases/previous releases/current;', pty=True)
-        run('mv releases/_previous releases/previous;', pty=True)
-    restart_webserver()
-
-
-# =====================================================================
-# = Helpers. These are called by other functions rather than directly =
-# =====================================================================
-def prepare_package_from_git():
-    "Create an archive from the current Git master branch and upload it"
-    print '>>> upload tar from git'
-
-    require('release', provided_by=[deploy])
-
-    run('mkdir -p %(path)s/releases/%(release)s' % env, pty=True)
-    run('mkdir -p %(path)s/packages' % env, pty=True)
-    run('cd %(path)s/mirror; git pull; git archive --format=tar %(gitbranch)s | gzip > %(path)s/packages/%(release)s.tar.gz' % env)
-    run('cd %(path)s/releases/%(release)s && tar zxf ../../packages/%(release)s.tar.gz' % env, pty=True)
-
-
-#def upload_vhost_sample():
-#    "Create and upload Apache virtual host configuration sample"
-#    print ">>> upload vhost sample"
-#    files.upload_template('%(project_name)s.vhost.template' % env, '%(path)s/%(project_name)s.vhost.sample' % env, context=env)
-
-
-def upload_wsgi_script():
-    "Create and upload a wsgi script sample"
-    print ">>> upload wsgi script sample"
-    files.upload_template('%(project_name)s/config/%(project_name)s.wsgi.template' % env, '%(path)s/www/wsgi/%(project_name)s.wsgi' % env, context=env)
-    run('chmod ug+x %(path)s/www/wsgi/%(project_name)s.wsgi' % env)
-
-
-def install_requirements():
-    "Install the required packages from the requirements file using pip"
-
-    print '>>> Instaling global requirements'
-    require('release', provided_by=[deploy])
-    run('cd %(path)s; %(path)s/bin/pip install -r %(path)s/releases/%(release)s/%(project_name)s/config/requirements.txt' % env, pty=True)
-
-    print '>>> Instaling site requirements'
-
-    with settings(warn_only=True):
-        run('cd %(path)s; %(path)s/bin/pip install -r %(sandbox)s/etc/%(project_name)s/requirements.txt' % env, pty=True)
-
-
-def hardlink_localsettings():
-    "Hardlink localsettings.py from root directory to release directory (if this file exists)"
-    print ">>> Hardlink localsettings"
-    require('release', 'path', provided_by=[deploy])
-    require('sandbox', provided_by=[staging, production])
-
-    # hardlink localsettings
-    with settings(warn_only=True):
-        run('ln %(sandbox)s/etc/%(project_name)s/localsettings.py %(path)s/releases/%(release)s/%(project_name)s' % env)
-
-
-def symlink_current_release():
-    "Symlink our current release"
-    print '>>> symlink current release'
-    require('release', provided_by=[deploy])
-    require('path', provided_by=[staging, production])
-    with cd(env.path):
-        run('rm releases/previous; mv releases/current releases/previous')
-        run('ln -s %(release)s releases/current' % env)
-
-
-def migrate():
-    "Update the database"
-    print '>>> migrate'
-    require('project_name', provided_by=[staging, production])
-    with cd('%(path)s/releases/current/%(project_name)s' % env):
-        run('%(target)s manage.py syncdb --noinput' % env, pty=True)
-
-        if env.use_south:
-            run('%(target)s manage.py migrate' % env, pty=True)
-
-
-def django_compress():
-    "Update static files"
-    print '>>> migrate'
-    require('project_name', provided_by=[staging, production])
-    with cd('%(path)s/releases/current/%(project_name)s' % env):
-        run('%(target)s manage.py synccompress --force' % env, pty=True)
-
-
-def restart_webserver():
-    "Restart the web server"
-    print '>>> restart webserver'
-    run('touch %(path)s/www/wsgi/%(project_name)s.wsgi' % env)
diff --git a/localsettings.sample b/localsettings.sample
new file mode 100644 (file)
index 0000000..c174cf9
--- /dev/null
@@ -0,0 +1,18 @@
+# 
+#  localsettings template for Platforma
+#
+#  Duplicate this file as localsettings.py and change it to your liking.
+#  Settings defined in localsettings.py will override settings from 
+#  settings.py file. localsettings.py should never be commited 
+#  to a version control system. Please make changes to settings.py 
+#  or localsettings.sample instead.
+#
+
+# Path to repository with managed documents
+REPOSITORY_PATH = '/home/user/repository'
+
+# Subdirectory of STATIC_ROOT containing images
+IMAGE_DIR = 'images'
+
+CAS_SERVICE_URL = 'http://stigma.nowoczesnapolska.org.pl/cas/'
+
diff --git a/logging.cfg b/logging.cfg
new file mode 100644 (file)
index 0000000..9bfa56c
--- /dev/null
@@ -0,0 +1,29 @@
+[loggers]
+keys=root,fnp
+
+[handlers]
+keys=console
+
+[formatters]
+keys=default
+
+[logger_root]
+level=DEBUG
+handlers=console
+
+[logger_fnp]
+level=DEBUG
+handlers=console
+qualname=fnp
+propagate=0
+
+[formatter_default]
+format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
+datefmt=
+class=logging.Formatter
+
+[handler_console]
+class=StreamHandler
+level=DEBUG
+formatter=default
+args=(sys.stderr, ) 
\ No newline at end of file
diff --git a/logging.cfg.dev b/logging.cfg.dev
new file mode 100644 (file)
index 0000000..9bfa56c
--- /dev/null
@@ -0,0 +1,29 @@
+[loggers]
+keys=root,fnp
+
+[handlers]
+keys=console
+
+[formatters]
+keys=default
+
+[logger_root]
+level=DEBUG
+handlers=console
+
+[logger_fnp]
+level=DEBUG
+handlers=console
+qualname=fnp
+propagate=0
+
+[formatter_default]
+format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
+datefmt=
+class=logging.Formatter
+
+[handler_console]
+class=StreamHandler
+level=DEBUG
+formatter=default
+args=(sys.stderr, ) 
\ No newline at end of file
diff --git a/platforma/__init__.py b/platforma/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/platforma/compress_settings.py b/platforma/compress_settings.py
deleted file mode 100644 (file)
index fa416c4..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-# CSS and JS files to compress
-COMPRESS_CSS = {
-    'detail': {
-         'source_filenames': (
-            'css/master.css',
-            'css/gallery.css',
-            'css/history.css',
-            'css/summary.css',
-            'css/html.css',
-            'css/jquery.autocomplete.css',
-            'css/dialogs.css',
-        ),
-        'output_filename': 'compressed/detail_styles_?.css',
-    },
-    'listing': {
-        'source_filenames': (
-            'css/filelist.css',
-        ),
-        'output_filename': 'compressed/listing_styles_?.css',
-     }
-}
-
-COMPRESS_JS = {
-    # everything except codemirror
-    'detail': {
-        'source_filenames': (
-                # libraries
-                'js/jquery-1.4.2.min.js',
-                'js/jquery.autocomplete.js',
-                'js/jquery.blockui.js',
-                'js/jquery.elastic.js',
-                'js/button_scripts.js',
-                'js/slugify.js',
-
-                # wiki scripts
-                'js/wiki/wikiapi.js',
-                'js/wiki/xslt.js',
-
-                # base UI
-                'js/wiki/base.js',
-
-                # dialogs
-                'js/wiki/dialog_save.js',
-                'js/wiki/dialog_addtag.js',
-
-                # views
-                'js/wiki/view_history.js',
-                'js/wiki/view_summary.js',
-                'js/wiki/view_editor_source.js',
-                'js/wiki/view_editor_wysiwyg.js',
-                'js/wiki/view_gallery.js',
-                'js/wiki/view_column_diff.js',
-        ),
-        'output_filename': 'compressed/detail_scripts_?.js',
-     },
-    'listing': {
-        'source_filenames': (
-                'js/jquery-1.4.2.min.js',
-                'js/slugify.js',
-        ),
-        'output_filename': 'compressed/listing_scripts_?.js',
-     }
-}
-
-COMPRESS = True
-COMPRESS_CSS_FILTERS = None
-COMPRESS_JS_FILTERS = None
-COMPRESS_AUTO = False
-COMPRESS_VERSION = True
-COMPRESS_VERSIONING = 'compress.versioning.hash.MD5Versioning'
diff --git a/platforma/config/localsettings.sample b/platforma/config/localsettings.sample
deleted file mode 100644 (file)
index c174cf9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# 
-#  localsettings template for Platforma
-#
-#  Duplicate this file as localsettings.py and change it to your liking.
-#  Settings defined in localsettings.py will override settings from 
-#  settings.py file. localsettings.py should never be commited 
-#  to a version control system. Please make changes to settings.py 
-#  or localsettings.sample instead.
-#
-
-# Path to repository with managed documents
-REPOSITORY_PATH = '/home/user/repository'
-
-# Subdirectory of STATIC_ROOT containing images
-IMAGE_DIR = 'images'
-
-CAS_SERVICE_URL = 'http://stigma.nowoczesnapolska.org.pl/cas/'
-
diff --git a/platforma/config/logging.cfg b/platforma/config/logging.cfg
deleted file mode 100644 (file)
index 9bfa56c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[loggers]
-keys=root,fnp
-
-[handlers]
-keys=console
-
-[formatters]
-keys=default
-
-[logger_root]
-level=DEBUG
-handlers=console
-
-[logger_fnp]
-level=DEBUG
-handlers=console
-qualname=fnp
-propagate=0
-
-[formatter_default]
-format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
-datefmt=
-class=logging.Formatter
-
-[handler_console]
-class=StreamHandler
-level=DEBUG
-formatter=default
-args=(sys.stderr, ) 
\ No newline at end of file
diff --git a/platforma/config/logging.cfg.dev b/platforma/config/logging.cfg.dev
deleted file mode 100644 (file)
index 9bfa56c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[loggers]
-keys=root,fnp
-
-[handlers]
-keys=console
-
-[formatters]
-keys=default
-
-[logger_root]
-level=DEBUG
-handlers=console
-
-[logger_fnp]
-level=DEBUG
-handlers=console
-qualname=fnp
-propagate=0
-
-[formatter_default]
-format=%(asctime)s %(name)s/%(levelname)s :: %(module)s.%(funcName)s:%(lineno)d :: %(message)s
-datefmt=
-class=logging.Formatter
-
-[handler_console]
-class=StreamHandler
-level=DEBUG
-formatter=default
-args=(sys.stderr, ) 
\ No newline at end of file
diff --git a/platforma/config/platforma.vhost.template b/platforma/config/platforma.vhost.template
deleted file mode 100644 (file)
index 7d44557..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<VirtualHost *:80>
-    ServerName %(project_name)s.example.com
-    ServerAdmin admin@example.com
-
-    WSGIDaemonProcess %(project_name)s user=%(user)s group=%(user)s processes=2 threads=15 display-name=%%{GROUP} python-path=%(path)s/lib/python2.5/site-packages
-    WSGIProcessGroup %(project_name)s
-
-    WSGIScriptAlias / %(path)s/%(project_name)s.wsgi
-    <Directory %(path)s>
-        Order allow,deny
-        allow from all
-    </Directory>
-
-    Alias /media %(path)s/media
-    <Directory %(path)s/media>
-        Options Indexes
-        Order allow,deny
-        Allow from all
-    </Directory>
-        
-    Alias /admin-media %(path)s/admin-media
-    <Directory %(path)s/admin-media>
-        Options Indexes
-        Order allow,deny
-        Allow from all
-    </Directory>
-
-    Alias /static %(path)s/releases/current/%(project_name)s/static
-    <Directory %(path)s/releases/current/%(project_name)s/static>
-        Options Indexes
-        Order allow,deny
-        Allow from all
-    </Directory>
-
-    LogLevel warn
-    ErrorLog /var/log/apache2/error.log
-    CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
diff --git a/platforma/config/platforma.wsgi.template b/platforma/config/platforma.wsgi.template
deleted file mode 100644 (file)
index 6a1770c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!%(python)s
-import site
-site.addsitedir('%(path)s/lib/python2.6/site-packages')
-
-import os
-from os.path import abspath, dirname, join
-import sys
-
-# Redirect sys.stdout to sys.stderr for bad libraries like geopy that use
-# print statements for optional import exceptions.
-sys.stdout = sys.stderr
-
-# Add apps and lib directories to PYTHONPATH
-sys.path = [
-       '%(path)s/releases/current',
-       '%(path)s/releases/current/apps',
-       '%(path)s/releases/current/lib',
-] + sys.path
-
-# Run Django
-os.environ['DJANGO_SETTINGS_MODULE'] = '%(project_name)s.settings'
-
-from django.core.handlers.wsgi import WSGIHandler
-application = WSGIHandler()
diff --git a/platforma/config/requirements.txt b/platforma/config/requirements.txt
deleted file mode 100644 (file)
index d247c76..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-## Python libraries
-lxml>=2.2
-mercurial>=1.3.1
-PyYAML>=3.0
-PIL>=1.1
-
-## Book conversion library
-git+git://github.com/fnp/librarian.git@master#egg=librarian
-
-## Django 
-Django>=1.1.1,<1.2
-sorl-thumbnail>=3.2
-django-maintenancemode>=0.9
-
-# migrations
-south>=0.6
-
-## Debugging utils, uncomment this if you want tests
-# django-nose>=0.0.3
-# django-debug-toolbar>=0.8
\ No newline at end of file
diff --git a/platforma/context_processors.py b/platforma/context_processors.py
deleted file mode 100644 (file)
index 813d8f3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- coding: utf-8
-
-
-def settings(request):
-    from django.conf import settings
-    return {
-        'MEDIA_URL': settings.MEDIA_URL,
-        'STATIC_URL': settings.STATIC_URL,
-    }
diff --git a/platforma/locale/pl/LC_MESSAGES/django.mo b/platforma/locale/pl/LC_MESSAGES/django.mo
deleted file mode 100644 (file)
index a0cefb7..0000000
Binary files a/platforma/locale/pl/LC_MESSAGES/django.mo and /dev/null differ
diff --git a/platforma/locale/pl/LC_MESSAGES/django.po b/platforma/locale/pl/LC_MESSAGES/django.po
deleted file mode 100644 (file)
index 52d7a6d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# Polskie tłumaczenie dla platformy wolnych lektur.
-# Copyright (C) 2009
-# This file is distributed under the same license as the 'platforma' package.
-# lrekucki@gmail.com, 2009.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 10:52+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: templates/explorer/editor.html:53
-msgid "Refresh panel"
-msgstr "Odśwież panel"
-
-#: templates/explorer/editor.html:67
-msgid "Print version"
-msgstr "Wersja do druku"
-
-#: templates/explorer/editor.html:96
-msgid "Next page"
-msgstr "Następna strona"
-
-#: templates/explorer/editor.html:100
-msgid "Zoom in"
-msgstr "Powiększ"
-
-#: templates/explorer/editor.html:103
-msgid "Zoom out"
-msgstr "Zmniejsz"
-
-#: templates/explorer/editor.html:106
-msgid "Reset zoom"
-msgstr "Oryginalny rozmiar"
-
-#: templates/explorer/editor.html:155
-msgid "History"
-msgstr "Historia"
-
-#: templates/explorer/editor.html:156
-msgid "Push"
-msgstr "Zatwierdź"
-
-#: templates/explorer/editor.html:157
-msgid "Pull"
-msgstr "Uaktualnij"
-
-#: templates/explorer/editor.html:158
-msgid "Save"
-msgstr "Zapisz"
-
-#: templates/explorer/editor.html:159
-msgid "Quick save"
-msgstr "Szybki zapis"
-
-#: templates/registration/head_login.html:5
-msgid "Log Out"
-msgstr "Wyloguj"
-
-#: templates/registration/head_login.html:9
-msgid "Log In"
-msgstr "Logowanie"
diff --git a/platforma/manage.py b/platforma/manage.py
deleted file mode 100755 (executable)
index 1fc25dd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-from django.core.management import execute_manager
-try:
-    import settings  # Assumed to be in the same directory.
-except ImportError:
-    import sys
-    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
-    sys.exit(1)
-
-if __name__ == "__main__":
-    # Append lib and apps directories to PYTHONPATH
-    from os import path
-    import sys
-
-    PROJECT_ROOT = path.realpath(path.dirname(__file__))
-    sys.path += [PROJECT_ROOT + '/../apps', PROJECT_ROOT + '/../lib']
-
-    execute_manager(settings)
diff --git a/platforma/settings.py b/platforma/settings.py
deleted file mode 100644 (file)
index 1f9d5d0..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-# -*- coding: utf-8 -*-
-import os.path
-
-PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
-
-DEBUG = False
-TEMPLATE_DEBUG = DEBUG
-
-MAINTENANCE_MODE = False
-
-ADMINS = (
-    # (u'Marek Stępniowski', 'marek@stepniowski.com'),
-    (u'Łukasz Rekucki', 'lrekucki@gmail.com'),
-)
-
-MANAGERS = ADMINS
-
-DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = PROJECT_ROOT + '/dev.sqlite'             # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
-
-# Local time zone for this installation. Choices can be found here:
-# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
-# although not all choices may be available on all operating systems.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = 'Europe/Warsaw'
-
-# Language code for this installation. All choices can be found here:
-# http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'pl'
-
-#import locale
-#locale.setlocale(locale.LC_ALL, '')
-
-SITE_ID = 1
-
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
-USE_I18N = True
-
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = PROJECT_ROOT + '/media/'
-STATIC_ROOT = PROJECT_ROOT + '/static/'
-
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash if there is a path component (optional in other cases).
-# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = '/media/'
-STATIC_URL = '/static/'
-
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/admin-media/'
-
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = 'ife@x^_lak+x84=lxtr!-ur$5g$+s6xt85gbbm@e_fk6q3r8=+'
-SESSION_COOKIE_NAME = "redakcja_sessionid"
-
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-#     'django.template.loaders.eggs.load_template_source',
-)
-
-TEMPLATE_CONTEXT_PROCESSORS = (
-    "django.core.context_processors.auth",
-    "django.core.context_processors.debug",
-    "django.core.context_processors.i18n",
-    "platforma.context_processors.settings",
-    "django.core.context_processors.request",
-)
-
-
-MIDDLEWARE_CLASSES = (
-    'django.middleware.common.CommonMiddleware',
-    'django.contrib.sessions.middleware.SessionMiddleware',
-
-    'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'django_cas.middleware.CASMiddleware',
-
-    'django.middleware.doc.XViewMiddleware',
-    'maintenancemode.middleware.MaintenanceModeMiddleware',
-    # 'debug_toolbar.middleware.DebugToolbarMiddleware' #
-)
-
-AUTHENTICATION_BACKENDS = (
-    'django.contrib.auth.backends.ModelBackend',
-    'django_cas.backends.CASBackend',
-)
-
-ROOT_URLCONF = 'platforma.urls'
-
-TEMPLATE_DIRS = (
-    PROJECT_ROOT + '/templates',
-)
-
-
-#
-# Central Auth System
-#
-## Set this to where the CAS server lives
-# CAS_SERVER_URL = "http://cas.fnp.pl/
-CAS_LOGOUT_COMPLETELY = True
-
-from compress_settings import *
-
-INSTALLED_APPS = (
-    'django.contrib.auth',
-    'django.contrib.contenttypes',
-    'django.contrib.sessions',
-    'django.contrib.sites',
-    'django.contrib.admin',
-    'django.contrib.admindocs',
-
-    'django_cas',
-    'compress',
-    'south',
-    'sorl.thumbnail',
-    'filebrowser',
-
-    'wiki',
-    'toolbar',
-)
-
-
-#
-# Nose tests
-#
-
-TEST_RUNNER = 'django_nose.run_tests'
-TEST_MODULES = ('wiki', 'toolbar', 'vstorage')
-NOSE_ARGS = (
-    '--tests=' + ','.join(TEST_MODULES),
-    '--cover-package=' + ','.join(TEST_MODULES),
-    '-d',
-    '--with-coverage',
-    '--with-doctest',
-)
-
-
-FILEBROWSER_URL_FILEBROWSER_MEDIA = STATIC_URL + 'filebrowser/'
-FILEBROWSER_DIRECTORY = 'images/'
-FILEBROWSER_ADMIN_VERSIONS = []
-FILEBROWSER_VERSIONS_BASEDIR = 'thumbnails/'
-FILEBROWSER_DEFAULT_ORDER = "path_relative"
-
-# REPOSITORY_PATH = '/Users/zuber/Projekty/platforma/files/books'
-IMAGE_DIR = 'images'
-
-
-WL_API_CONFIG = {
-    "URL": "http://localhost:7000/api/",
-    "AUTH_REALM": "WL API",
-    "AUTH_USER": "platforma",
-    "AUTH_PASSWD": "platforma",
-}
-
-# Import localsettings file, which may override settings defined here
-try:
-    from localsettings import *
-except ImportError:
-    pass
-
-try:
-    LOGGING_CONFIG_FILE
-except NameError:
-    LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, 'config',
-                                ('logging.cfg' if not DEBUG else 'logging.cfg.dev'))
-try:
-    import logging
-    import logging.config
-
-    logging.config.fileConfig(LOGGING_CONFIG_FILE)
-except ImportError, exc:
-    raise
diff --git a/platforma/static/css/dialogs.css b/platforma/static/css/dialogs.css
deleted file mode 100644 (file)
index 1c22868..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-.dialog {
-       display: none;
-       padding: 5px;
-       text-align: left;
-       cursor: auto;
-       background-color: #E1E1E1; /* #e0ffb8; */
-}
-
-.dialog .help_text {
-       font-size: 11px;
-       color: #2e3536;  
-}
-
-.dialog .action_area {
-       padding: 1em 0.5em 0.5em;
-       border-top: 1px solid black;
-       margin-top: 0.5em;      
-}
-
-.dialog p {
-       margin: 0.5em;
-}
-
-*[data-ui-error-for] {
-       color: red;
-       font-weight: bold;
-}
-
-#save_dialog textarea {
-       width: 90%;
-       margin: 0.2em 4%;
-}
\ No newline at end of file
diff --git a/platforma/static/css/filelist.css b/platforma/static/css/filelist.css
deleted file mode 100644 (file)
index a0b4995..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 
-    Document   : filelist
-    Created on : 2009-09-04, 20:44:44
-    Author     : lreqc
-    Description:
-        Dodatkowe style dla listy plików na stronie głównej.
-*/
-
-body {
-       background-color: #84BF2A;
-}
-
-#content {
-    background: #EFEFEF;
-    border: 1px solid black;
-    padding: 0.5em 2em;
-    margin: 1em;
-       overflow: hidden;    
-}
-
-#content h1 img {
-       vertical-align: middle;
-}
-
-#content h1 {
-       border-bottom: 2px solid black;
-       padding: 0.5em;
-       font-size: 2opt;
-       font-family: sans-serif;
-}
-
-#file-list {
-       overflow: visible;
-       float: left;
-       max-width: 50%;
-       padding-right: 2%;
-       border-right: 1px dashed black; 
-       
-}
-
-#last-edited-list {
-       float: left;
-       max-width: 35%;
-       margin-left: 5%;
-}
-
-#last-edited-list ul {
-       margin: 0px;
-}      
-
-#last-edited-list li {
-       margin-bottom: 1em;
-}
-
-#last-edited-list .date {
-       font-size: 70%;
-       color: grey;
-}
-
-a, a:visited, a:active {
-       color: blue;
-       text-decoration: none;  
-}
-
-a:hover {
-       text-decoration: underline;
-}
\ No newline at end of file
diff --git a/platforma/static/css/gallery.css b/platforma/static/css/gallery.css
deleted file mode 100644 (file)
index 379abcc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* =========== */
-/* = Gallery = */
-/* =========== */
-
-#side-gallery {
-    position: absolute;
-    /* overflow: hidden; */
-    top: 0px;
-    right: 0px;
-    bottom: 0px;
-    width: 480px;
-    display: none;
-    background-color: #FFF;
-}
-
-#side-gallery .error_message 
-{
-       background-color: white;
-       color: black;
-       padding: 0.5em 1em;
-}
-
-.change-gallery-panel {
-    width: 100%;
-    border-bottom: 1px solid #777;
-    background-color: #C1C1C1;
-    margin: 0;
-    padding: 2px;
-    z-index: 10;
-}
-
-.gallery-image {
-    position: absolute;
-    top: 30px;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    margin: 0;
-    border: none;
-    background-color: transparent;
-    overflow: hidden;
-}
-
-.gallery-image img {
-    position: absolute;
-    -moz-drag: none;
-    user-select: none;
-    -webkit-user-select: none;
-    -khtml-user-select: none;
-    -moz-user-select: none;
-    cursor: pointer;
-       
-       background-color: white;
-       min-height: 100px;
-       min-width: 100px;
-}
-
-.gallery-image img[src=''] {
-       background-color: red;  
-}
diff --git a/platforma/static/css/history.css b/platforma/static/css/history.css
deleted file mode 100644 (file)
index b319116..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-#history-view {
-    overflow: auto;
-    position: absolute;
-    top: 30px; /* 0 for no toolbar, 30 for toolbar */
-    bottom: 0px;
-    left: 0px;
-    right: 0px;
-    z-index: 1;
-}
-
-/*
- * File History
- */
-#changes-list-container {
-    margin: 1em auto;
-    width: 70%;
-}
-
-table#changes-list-container {
-    border-spacing: 0px 15px;
-}
-
-#changes-list {
-    margin: 0.5em 0.2em;
-}
-
-#changes-list td {
-    padding: 0.5em 1em;
-}
-
-#changes-list .entry {
-    position: relative;
-    padding: 0.5em;
-    padding-left: 3em;
-    margin: 0.5em;
-}
-
-#changes-list .entry:hover {
-    background-color: #f0f0f0;
-}
-
-#changes-list .entry.selected {
-    background-color: #ffec63;
-}
-
-#changes-list .tag {
-    display: inline-block;
-    visibility: hidden;
-    width: 60px;
-    margin: 0 0.5em 0 0;
-    font-size: 11px;
-    padding: 3px 2px;
-    text-align: center;
-    color: black;
-    background: #add8e6;
-    cursor: pointer;
-    vertical-align: middle;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 10px;
-    border-radius: 10px;
-}
-
-#changes-list .entry:hover .tag {
-    visibility: visible;
-}
-
-#changes-list .tag:hover {
-    background: #bde8f6;
-}
-
-#changes-list *[data-version-tag] {
-    visibility: visible;
-    border: 1px solid black;
-    color: black;
-}
-
-#changes-list *[data-stub-value =
-'version'] {
-    font-weight: bold;
-}
-
-#changes-list td[data-stub-value =
-'version'] {
-    vertical-align: text-top;
-}
-
-#changes-list *[data-stub-value =
-'date'], #changes-list *[data-stub-value = 'author'] {
-    font-size: 11px;
-    color: gray;
-}
-
-/*
- * Graphical DIFF view
- *
- */
-#history-view .diff_table {
-    width: 90%;
-}
-
-.editor.DiffPerspective {
-    overflow-y: scroll;
-}
-
-.diff_table {
-    border-width: 1px;
-    border-style: solid;
-    border-color: black;
-    empty-cells: show;
-    border-spacing: 0px;
-}
-
-.diff_table td {
-    border-width: 0px 1px 1px 0px;
-    border-style: dotted;
-    border-color: grey;
-    font-size: 10px;
-    line-height: 20px;
-    font-family: monospace;
-    padding: 0px;
-    white-space: pre-line;
-    /*word-wrap:break-word;
-     word-break:break-all; */
-}
-
-.diff_table th {
-    border-width: 0px 1px 1px 0px;
-    border-style: solid;
-    border-color: black;
-    background: #e5ffe5;
-}
-
-/* .diff_table td.left, .diff_table td.right {
- width: 50%;
- }*/
-.diff_table tr.change {
-    background-color: #dcdcdc;
-}
-
-.diff_mark {
-    display: inline-block;
-    padding: 2px;
-}
-
-.diff_mark_removed {
-    background-color: #ff9c94;
-}
-
-.diff_mark_added {
-    background-color: #90ee90;
-}
-
-.diff_mark_changed {
-    background-color: yellow;
-}
\ No newline at end of file
diff --git a/platforma/static/css/html.css b/platforma/static/css/html.css
deleted file mode 100644 (file)
index bd710a8..0000000
+++ /dev/null
@@ -1,569 +0,0 @@
-/* Style widoku HTML. Nie należy tu ustawiać position ani marginesów */
-.htmlview {
-    counter-reset: main;
-    font-size: 16px;
-    font-family: "Georgia", "Times New Roman", serif;
-    line-height: 1.5em;
-    padding: 3em;
-    padding-left: 45px;
-    overflow-y: scroll;
-    overflow-x: auto;
-}
-
-.htmlview[data-tag-names-visible] {
-    padding-left: 90px;
-}
-
-/*
- .htmlview[data-tag-names-visible] *[x-editable]:not(*[x-common])::before {
- display: block;
- float: left;
- clear: left;
- content: attr(x-node);
- font-weight: bold;
- font-style: normal;
- font-variant:normal;
- font-size: 8px;
- line-height: 8px;
- margin-bottom: 4px;
- padding: 3px 4px;
- vertical-align: super;
- background-color:#add8e6;
- margin-left: -80px;
- width: 70px;
- text-align: center;
- -webkit-border-radius: 4px;
- }
- */
-.htmlview *[x-node = 'RDF'] {
-    display: none;
-}
-
-.htmlview * {
-    position: relative;
-}
-
-.htmlview div {
-    max-width: 36em;
-}
-
-.htmlview #toc {
-    display: none;
-}
-
-.htmlview a {
-    color: blue;
-    text-decoration: none;
-}
-
-.htmlview a:hover {
-    text-decoration: none;
-}
-
-.htmlview h1 {
-    font-size: 3em;
-    margin: 1.5em 0;
-    text-align: center;
-    line-height: 1.5em;
-    font-weight: bold;
-}
-
-.htmlview h2 {
-    font-size: 2em;
-    margin: 1.5em 0 0;
-    font-weight: bold;
-    line-height: 1.5em;
-}
-
-.htmlview h3 {
-    font-size: 1.5em;
-    margin: 1.5em 0 0;
-    font-weight: normal;
-    line-height: 1.5em;
-}
-
-.htmlview h4 {
-    font-size: 1em;
-    margin: 1.5em 0 0;
-    line-height: 1.5em;
-}
-
-.htmlview p {
-    margin: 0;
-}
-
-.htmlview #footnotes div {
-    margin: 1.5em 0 0 0;
-}
-
-.htmlview #footnotes p {
-    margin-left: 2.5em;
-    font-size: 0.875em;
-}
-
-.htmlview blockquote {
-    font-size: 0.875em;
-}
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.htmlview .anchor {
-    position: relative;
-    margin: 0em;
-    left: -2.2em;
-    color: #777;
-    font-size: 12px;
-    width: 2em;
-    text-align: center;
-    padding: 0.25em 0.7em;
-    line-height: 1.5em;
-}
-
-.htmlview .anchor:hover, .htmlview .anchor:active {
-    color: #FFF;
-    background-color: #CCC;
-}
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-.htmlview .autor_utwor {
-    font-size: 0.5em;
-    display: block;
-    line-height: 1.5em;
-    margin-bottom: 0.25em;
-}
-
-.htmlview .dzielo_nadrzedne {
-    /* */
-}
-
-.htmlview .podtytul {
-    /* */
-}
-
-.htmlview .didaskalia {
-    font-style: italic;
-    margin: 0.5em 0 0 1.5em;
-}
-
-.htmlview .kwestia {
-    margin: 0.5em 0 0;
-}
-
-.htmlview .strofa {
-    margin: 1.5em 0 0.5em auto;
-}
-
-/* wersy */
-.htmlview .strofa .wers_wciety, .htmlview .strofa .wers_wciety[data-wlf-typ='1'] {
-    margin-left: 1em;
-}
-
-.htmlview .strofa .wers_wciety[data-wlf-typ='2'], .htmlview .strofa .wers_cd {
-    margin-left: 2em;
-}
-
-.htmlview .strofa .wers_wciety[data-wlf-typ='3'] {
-    margin-left: 3em;
-}
-
-.htmlview .strofa .wers_wciety[data-wlf-typ='4'] {
-    margin-left: 4em;
-}
-
-.htmlview .strofa .wers_wciety[data-wlf-typ='5'] {
-    margin-left: 5em;
-}
-
-.htmlview .strofa .wers_wciety[data-wlf-typ='6'] {
-    margin-left: 6em;
-}
-
-/* błędne wersy */
-.htmlview *:
-not(.strofa) > *[x-verse]::after {
-    content: "Ten wers znajduje się poza strofą.";
-    display: inline;
-    background: red;
-    font-size: 8pt;
-    border: 1px solid black;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 10px;
-    padding: 1px 1em;
-    margin-left: 1em;
-    vertical-align: super;
-}
-
-.htmlview .kwestia .strofa {
-    margin: 0;
-}
-
-.htmlview .akap, .htmlview .akap_cd, .htmlview .akap_dialog {
-    text-align: justify;
-    margin: 1.5em 0 0;
-}
-
-.htmlview .motto_container {
-       display: inline-block;
-       margin: 1.5em 0 0;
-       clear: right;   
-}
-
-.htmlview .motto {
-    text-align: justify;
-    font-style: italic;    
-}
-
-.htmlview p.motto_podpis {
-       position: relative;
-       right: -3em;
-       text-align: right;      
-}
-
-.htmlview div.fragment {
-    border-bottom: 0.1em solid #999;
-    padding-bottom: 1.5em;
-}
-
-.htmlview div.nota p, .htmlview div.dedykacja p {
-    text-align: right;
-    font-style: italic;
-}
-
-.htmlview br.sekcja_swiatlo {
-    height: 3em;
-    /* visibility: hidden; */
-}
-
-.htmlview hr.separator_linia {
-    margin: 1.5em 0;
-    border: none;
-    border-bottom: 0.1em solid #000;
-}
-
-.htmlview p.sekcja_asterysk {
-    padding: 0;
-    margin: 1.5em 0;
-    text-align: center;
-}
-
-.htmlview div.lista_osob ol {
-    list-style: none;
-    padding: 0 0 0 1.5em;
-}
-
-.htmlview p.miejsce_czas {
-    font-style: italic;
-}
-
-.htmlview .mat, .htmlview .slowo_obce, .htmlview .tytul_dziela, .htmlview .didaskalia {
-    font-style: italic;
-}
-
-.htmlview .wyroznienie {
-    letter-spacing: 0.1em;
-}
-
-.htmlview .osoba {
-    font-style: normal;
-    font-variant: small-caps;
-}
-
-.htmlview .parse-warning {
-    display: block;
-    font-size: 10pt;
-    background: #C0C0C0;
-    margin: 1em;
-}
-
-.parse-warning .message {
-    color: purple;
-    font-weight: bold;
-}
-
-/* Uwaga/Extra */
-.htmlview .uwaga {
-    background-color: #96e0e4;
-    border: 1px solid black;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 10px;
-    display: block;
-    font-size: 10pt;
-    line-height: 12pt;
-    padding: 2px 1em;
-    float: right;
-    max-width: 20%;
-    max-height: 24pt;
-    margin-left: 0.5em;
-    overflow: hidden;
-       z-index: 500;
-}
-
-div[x-node] > .uwaga {
-    float: none;
-    padding: 0.5em 1em;
-    margin: 1em;
-    max-width: 100%;
-    max-height: 100%;
-}
-
-.htmlview .uwaga:hover {
-    max-height: 100%;
-}
-
-.htmlview .annotation-inline-box .uwaga {
-    max-height: 100%;
-}
-
-/* Motywy */
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-.htmlview .begin, .htmlview .end {
-    background: green;
-}
-
-.htmlview .motyw {
-    /* position: absolute; */
-    float: right;
-    left: auto;
-    clear: right;
-    width: 10em;
-    font-weight: normal;
-    font-size: 13px;
-    line-height: 18px;
-    font-variant: normal;
-    text-decoration: none;
-    background-color: #fff;
-    /*    border: 1px solid gray;
-     
-     border-right: none;
-     */
-    z-index: 1;
-    -moz-user-select: -moz-none;
-    -webkit-user-select: none;
-    user-select: none;
-    margin-right: -12em;
-    text-align: left;
-}
-
-.htmlview .motyw[x-editable] {
-    border-left: 4px solid #DDD;
-    padding: 0.2em 0.2em 0.2em 0.5em;
-    margin-top: 0.2em;
-}
-
-/*
- * Przypisy
- */
-/* Znaczniki w tekście */
-.htmlview .annotation:before {
-    content: "[" counter(main) "]";
-    counter-increment: main;
-       vertical-align: super;
-    text-decoration: none;
-       font-size: 66%;
-}
-
-.htmlview .annotation:hover {
-    background-color: #96e0e4;
-}
-*.htmlview *.annotation-inline-box {
-    position: static;
-}
-
-/*
- * Przypisy w tekście
- */
-.htmlview .annotation-inline-box > span[x-annotation-box] {
-    display: none;
-    position: absolute;
-    width: 300px;
-    font-size: 10pt;
-    line-height: 12pt;
-    font-weight: normal;
-    font-style: normal;
-    background: #fffe93;
-    border-color: black;
-    border-width: 1px;
-    border-style: solid;
-    border-radius: 10px;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 10px;
-    padding: 3px 5px;
-    text-decoration: none;
-    z-index: 600;
-}
-
-/*
- * Przypisy na końcu utworu (aktualnie nieuzywane)
- */
-.htmlview .annotations-block {
-    counter-reset: secondary;
-}
-
-.htmlview .annotations-block .annotation-body {
-    position: relative;
-    padding-left: 2.5em;
-    padding-top: 0.2em;
-}
-
-.htmlview .annotations-block .annotation-backref {
-    position: absolute;
-    top: 0.4em;
-    left: -0.4em;
-    width: 2.5em;
-    text-align: right;
-}
-
-.htmlview .annotations-block .annotation-backref:before {
-    content: "[" counter(secondary) "]";
-    counter-increment: secondary;
-}
-
-/*
- * EDITABLE ELEMENTS
- */
-.htmlview *[x-editable] {
-    position: relative;
-    padding: 2px;
-    margin-left: 0;
-    border: 1px solid #FFF;
-}
-
-/* focused editable element */
-.htmlview *[x-editable]:hover {
-    z-index: 900;
-}
-
-.htmlview *[x-editable][x-open] {
-    visibility: hidden;
-}
-
-.edit-button, .delete-button, .accept-button {
-    position: absolute;
-    top: -21px;
-    left: -1px;
-    width: 72px;
-    height: 21px;
-    display: block;
-    /*    margin: 4px 0 2px 0;*/
-    padding: 5px 5px 2px 5px;
-    border: none;
-    background-color: #FAFAFA;
-    /*    z-index: 3000;*/
-    /*    color: #FFF;
-     z-index: 1500;
-     */
-    border: 1px solid #DDD;
-    border-bottom: none;
-}
-
-.delete-button {
-    left: 70px;
-}
-
-.edit-button:hover, .edit-button:active, 
-.delete-button:hover, .delete-button:active, 
-.accept-button:hover, .accept-button:active {
-    /*    color: #FFF;*/
-    background-color: #999;
-    color: #FFF;
-}
-
-/*
- * VISIBILITY RULES
- */
-.default-menu {
-    visibility: inherit;
-    opacity: 0.2;
-}
-
-.default-menu:hover {
-    opacity: 1;
-    z-index: 5000;
-}
-
-.htmlview *[x-annotation-box] > .default-menu {
-    opacity: 1;
-}
-
-.htmlview *[x-editable][x-open] > .default-menu {
-    visibility: hidden;
-}
-
-.htmlview *[x-editable][x-open] *[x-annotation-box] > .default-menu {
-    visibility: hidden;
-}
-
-.htmlview *[x-editable] > .edit-menu {
-    visibility: hidden;
-}
-
-.htmlview *[x-editable] *[x-annotation-box] > .edit-menu {
-    visibility: hidden;
-}
-
-.htmlview *[x-editable][x-open] > .edit-menu {
-    visibility: visible;
-}
-
-.htmlview *[x-editable][x-open] *[x-annotation-box] > .edit-menu {
-    visibility: visible;
-}
-
-.html-editarea {
-    border: 0px;
-    background-color: gray;
-    padding: 1px;
-    z-index: 2000;
-    position: absolute;
-}
-
-.html-editarea textarea {
-    position: absolute;
-    top: 0;
-    margin: 0px;
-    padding: 0px;
-    width: 100%;
-    height: 100%;
-    z-index: 0;
-    font-size: 10pt;
-    /*    background-color: ivory;*/
-}
-
-.htmlview .out-of-flow-text {
-    display: block;
-    font-face: monospace;
-    border: 2px solid red !important;
-    white-space: pre-line;
-}
-
-.htmlview .out-of-flow-text::before {
-    content: "Tekst w tej ramce nie jest otagowany!";
-    background-color: #ff6c6c;
-    color: black;
-    font-size: 10pt;
-    line-height: 12pt;
-    border: 1px solid black;
-    -moz-border-radius: 10px;
-    -webkit-border-radius: 10px;
-    padding: 5px 1em;
-    margin: 0em;
-    margin-left: 1em;
-    text-align: justify;
-    display: inline;
-    float: right;
-    max-width: 25%;
-}
-
-.unknown-tag {
-    background-color: yellow;
-    margin: -0.25em;
-    padding: 0.25em;
-    border: 1px solid orange;
-}
\ No newline at end of file
diff --git a/platforma/static/css/html_print.css b/platforma/static/css/html_print.css
deleted file mode 100644 (file)
index 38cb596..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/* Style widoku HTML. Nie należy tu ustawiać position ani marginesów */
-.htmlview {
-    font-size: 16px;
-    font: Georgia, "Times New Roman", serif;
-    line-height: 1.5em;
-    padding: 3em;    
-}
-
-.htmlview div {
-    max-width: 36em;
-}
-
-.htmlview #toc {
-    display: none;
-}
-
-.htmlview a {
-    color: blue;
-    text-decoration: none;
-}
-
-.htmlview h1 {
-    font-size: 3em;
-    margin: 1.5em 0;
-    text-align: center;
-    line-height: 1.5em;
-    font-weight: bold;
-}
-
-.htmlview h2 {
-    font-size: 2em;
-    margin: 1.5em 0 0;
-    font-weight: bold;
-    line-height: 1.5em;
-}
-
-.htmlview h3 {
-    font-size: 1.5em;
-    margin: 1.5em 0 0;
-    font-weight: normal;
-    line-height: 1.5em;
-}
-
-.htmlview h4 {
-    font-size: 1em;
-    margin: 1.5em 0 0;
-    line-height: 1.5em;
-}
-
-.htmlview p {
-    margin: 0;
-}
-
-/* ======================== */
-/* = Footnotes and themes = */
-/* ======================== */
-.htmlview .theme-begin {
-    border-left: 0.1em solid #DDDDDD;
-    color: #777;
-    padding: 0 0.5em;
-    width: 7.5em;
-    font-style: normal;
-    font-weight: normal;
-    font-size: 16px;
-    float: right;
-    margin-right: -9.5em;
-    clear: both;
-    left: 40em;
-    line-height: 1.5em;
-    text-align: left;
-}
-
-.htmlview .annotation {
-    font-style: normal;
-    font-weight: normal;
-    font-size: 12px;
-}
-
-.htmlview #footnotes .annotation {
-    display: block;
-    float: left;
-    width: 2.5em;
-    clear: both;
-}
-
-.htmlview #footnotes div {
-    margin: 1.5em 0 0 0;
-}
-
-.htmlview #footnotes p {
-    margin-left: 2.5em;
-    font-size: 0.875em;
-}
-
-.htmlview blockquote {
-    font-size: 0.875em;
-}
-
-/* ============= */
-/* = Numbering = */
-/* ============= */
-.htmlview p {
-    position: relative;
-}
-
-.htmlview .anchor {
-    position: absolute;
-    margin: 0em;
-    left: -3em;
-    color: #777;
-    font-size: 12px;
-    width: 2em;
-    text-align: center;
-    padding: 0.25em 0.5em;
-    line-height: 1.5em;
-}
-
-.htmlview .anchor:hover, .htmlview .anchor:active {
-    color: #FFF;
-    background-color: #CCC;
-}
-
-/* =================== */
-/* = Custom elements = */
-/* =================== */
-.htmlview span.author {
-    font-size: 0.5em;
-    display: block;
-    line-height: 1.5em;
-    margin-bottom: 0.25em;
-}
-
-.htmlview span.collection {
-    font-size: 0.375em;
-    display: block;
-    line-height: 1.5em;
-    margin-bottom: -0.25em;
-}
-
-.htmlview span.subtitle {
-    font-size: 0.5em;
-    display: block;
-    line-height: 1.5em;
-    margin-top: -0.25em;
-}
-
-.htmlview div.didaskalia {
-    font-style: italic;
-    margin: 0.5em 0 0 1.5em;
-}
-
-.htmlview div.kwestia {
-    margin: 0.5em 0 0;
-}
-
-.htmlview div.stanza {
-    margin: 1.5em 0 0;
-}
-
-.htmlview div.kwestia div.stanza {
-    margin: 0;
-}
-
-.htmlview p.paragraph {
-    text-align: justify;
-    margin: 1.5em 0 0;
-}
-
-.htmlview p.motto {
-    text-align: justify;
-    font-style: italic;
-    margin: 1.5em 0 0;
-}
-
-.htmlview p.motto_podpis {
-    font-size: 0.875em;
-    text-align: right;
-}
-
-.htmlview div.fragment {
-    border-bottom: 0.1em solid #999;
-    padding-bottom: 1.5em;
-}
-
-.htmlview div.note p, .htmlview div.dedication p,
-.htmlview div.note p.paragraph, .htmlview div.dedication p.paragraph {
-    text-align: right;
-    font-style: italic;
-}
-
-.htmlview hr.spacer {
-    height: 3em;
-    visibility: hidden;
-}
-
-.htmlview hr.spacer-line {
-    margin: 1.5em 0;
-    border: none;
-    border-bottom: 0.1em solid #000;
-}
-
-.htmlview p.spacer-asterisk {
-    padding: 0;
-    margin: 1.5em 0;
-    text-align: center;
-}
-
-.htmlview div.person-list ol {
-    list-style: none;
-    padding: 0 0 0 1.5em;
-}
-
-.htmlview p.place-and-time {
-    font-style: italic;
-}
-
-.htmlview em.math, .htmlview em.foreign-word,
-.htmlview em.book-title, .htmlview em.didaskalia {
-    font-style: italic;
-}
-
-.htmlview em.author-emphasis {
-    letter-spacing: 0.1em;
-}
-
-.htmlview em.person {
-    font-style: normal;
-    font-variant: small-caps;
-}
diff --git a/platforma/static/css/jquery.autocomplete.css b/platforma/static/css/jquery.autocomplete.css
deleted file mode 100644 (file)
index 91b6228..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-.ac_results {
-       padding: 0px;
-       border: 1px solid black;
-       background-color: white;
-       overflow: hidden;
-       z-index: 99999;
-}
-
-.ac_results ul {
-       width: 100%;
-       list-style-position: outside;
-       list-style: none;
-       padding: 0;
-       margin: 0;
-}
-
-.ac_results li {
-       margin: 0px;
-       padding: 2px 5px;
-       cursor: default;
-       display: block;
-       /* 
-       if width will be 100% horizontal scrollbar will apear 
-       when scroll mode will be used
-       */
-       /*width: 100%;*/
-       font: menu;
-       font-size: 12px;
-       /* 
-       it is very important, if line-height not setted or setted 
-       in relative units scroll will be broken in firefox
-       */
-       line-height: 16px;
-       overflow: hidden;
-}
-
-.ac_loading {
-       background: white url('indicator.gif') right center no-repeat;
-}
-
-.ac_odd {
-       background-color: #eee;
-}
-
-.ac_over {
-       background-color: #0A246A;
-       color: white;
-}
diff --git a/platforma/static/css/master.css b/platforma/static/css/master.css
deleted file mode 100644 (file)
index ae74266..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-a, a:visited, a:active {
-       color: blue;
-       text-decoration: none;  
-}
-
-a:hover {
-       text-decoration: underline;
-}
-
-
-body {
-    margin: 0;
-    overflow: hidden;
-    padding: 0;
-    min-width: 960px;
-    width: 100%;
-    height: 100%;
-}
-
-.vsplitbar {
-    position: absolute;
-    top: 0px;
-    bottom: 0;
-    right: 0;
-    width: 26px;
-    background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;        
-    border-left: 2px solid #999;
-    border-right: 2px solid #999;
-    cursor: pointer;   
-}
-
-.vsplitbar:hover {
-       background-color: yellow;
-       border-color: orange;
-}
-
-.editor {
-    position: absolute;
-    top: 0px;
-    bottom: 0;
-    left: 0;
-    right: 30px;
-    overflow: hidden;
-}
-
-#editor.readonly .editor {
-       right: 0px;
-}
-
-#html-view {
-    overflow: auto;
-    position: absolute;
-    top: 33px;
-    bottom: 0;
-    left: 0;
-    right: 0;
-       z-index: 1;
-}
-
-#splitter {
-       position: fixed;
-       top: 31px;
-       left: 0px;
-       right: 0px;
-       bottom: 0px;
-       overflow: hidden;
-}
-
-
-#header {
-       position: fixed;
-       top: 0px;
-       right: 0px;
-       left: 0px;
-       height: 30px;
-       border-bottom: 1px solid #999; 
-       
-    margin: 0;
-    padding: 0;
-    background-color: #C1C1C1;
-    background-image: -webkit-gradient(linear, left top, left bottom, from(#C1C1C1), color-stop(0.9, #A2A2A2));
-       
-       /* Firefox 3.6 */
-       background-image: -moz-linear-gradient(top left, #C1C1C1, #A2A2A2, 90%);
-       
-    font: 11px Helvetica, Verdana, sans-serif;
-    font-weight: bold;
-}
-
-#header h1, #header h1 a {
-    margin: 0;
-    padding: 0;
-    font: 17px Helvetica, Verdana, sans-serif;
-    font-weight: bold;
-    float: left;
-    padding: 3px 6px 2px 6px;
-    color: #222;
-    line-height: 20px;
-}
-
-#header h1 a {
-    text-decoration: none;
-    color: #222;
-}
-
-#tabs {
-       overflow: hidden;
-    margin: 0;
-       padding: 0;
-       height: 31px;
-       border: 0px;    
-       padding-left: 1em;      
-}
-
-#tabs li {
-       height: 18px;
-       margin-top: 6px;
-       margin-bottom: 0px;     
-       
-    -webkit-user-select: none; 
-    cursor: pointer;
-    display: block;
-    float: left;
-       
-       padding-left: 12px;
-       padding-right: 12px;
-       padding-top: 5px;
-       
-    font-weight: bold;
-    color: #222;
-    margin-left: 4px;    
-       
-    background-color: #A2A2A2;
-       
-       -moz-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
-    -webkit-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
-
-    border: 1px solid #999;
-       border-bottom-width: 0px;       
-       -moz-border-radius: 4px 4px 0px 0px;
-       -webkit-border-radius: 4px;
-    -webkit-border-bottom-left-radius: 0px;
-    -webkit-border-bottom-right-radius: 0px;
-}
-
-#tabs li.active {
-    background-color: #C1C1C1;    
-}
-
-#tools {
-       float: right;
-       clear: right;
-       overflow: hidden;
-    margin: 0;
-       padding: 0;
-       height: 30px;  
-       margin-right: 5px;
-       line-height: 30px;
-       font-size: 10px;
-       vertical-align: middle;
-}
-
-
-/*
- * Toolbars
- */
-
-.toolbar {
-    width: 100%;
-    border-bottom: 1px solid #777;
-    background-color: #C1C1C1;
-    margin: 0;
-    padding: 2px;
-    z-index: 100;
-    height: 28px;
-}
-
-.toolbar button {
-    display: block;
-    float: left;
-    margin: 4px 0 2px 0;
-    padding: 2px 5px;
-    border: none;
-    background: none;
-}
-
-.toolbar button img {
-       margin: 0;
-       padding: 0;     
-       margin-bottom: -3px;
-}
-
-
-.toolbar select {
-    float: left;
-    margin: 1px 5px 1px 0;
-    background: none;
-    border: 1px solid #999;
-    padding: 1px;
-}
-
-.toolbar input {
-    float: left;
-    font-size: 11px;
-    padding: 0;
-    margin: 4px 5px 0px 5px;
-       vertical-align:baseline;
-}
-
-.toolbar-end {
-    clear: both;
-}
-
-.toolbar button:hover, .toolbar button:active {
-    background: #777;
-    color: #FFF;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-}
-
-/* Remove extra padding in Firefox */
-button::-moz-focus-inner { 
-    border: 0;
-    padding: 0;
-}
-
-p { margin: 0;}
-
-#body-wrap {
-    height: 100%;
-    width: 100%;
-}
-
-#content {
-    height: 100%;
-    width: 100%;
-}
-
-#loading-overlay {
-    background-color: #FFF;
-    position: absolute;
-    z-index: 1000;
-    padding: 0;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-}
-
-#loading-message {
-    position: absolute;
-    height: 20px;
-    width: 120px;
-    left: 50%;
-    margin-left: -60px;
-    top: 50%;
-    margin-top: -10px;
-/*    text-align: center;*/
-}
-
-#loading-message img {
-    float: left;
-    margin-right: 10px;
-    margin-top: -6px;
-}
-
-/*
- * CodeMirror 
- */
-
-.CodeMirror-line-numbers {
-       padding: 0px;
-       padding-top: 5px;               
-       text-align: right;
-       overflow: hidden;
-       width: 40px;
-       border-right: 1px solid black;
-       background-color: #e6e6fa;
-}
-
-.CodeMirror-line-numbers div {
-       display: block;  
-       font-family:"Lucida Console", monospace;
-    font-size: 13px;
-    line-height: 18px;
-       padding-right: 5px;
-}
-
-img.tabclose {
-       padding-left: 8px;
-       width: 16px;
-       height: 16px;   
-       vertical-align: middle;
-       vertical-align: text-bottom;
-}
-
-
-/*
- * HTML Editor view
- */ 
-.htmlview {
-       z-index: 1;
-       overflow: hidden;
-}
-
-.htmlview *[x-editable] {
-    background-color: white;
-       
-}
-.htmlview .active[x-editable] {
-    background-color: #FAFAFA;
-    border: 1px solid #DDD;
-/*    -webkit-transition: all 1s linear;*/
-}
-
-.blockOverlay {
-       background-color: black;
-       opacity: 0.4;
-}
diff --git a/platforma/static/css/summary.css b/platforma/static/css/summary.css
deleted file mode 100644 (file)
index 8fac6e1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#summary-view-editor {
-       background: white;
-}
-
-#summary-view {
-       padding: 1em;                   
-}
-
-#summary-view .book-cover {
-       float: left;
-       margin: 1em;
-       margin-right: 2em;
-       
-       height: 300px;
-       width: 212px;
-       
-       
-       border: 1px dashed black;
-}
-
-#summary-view p {
-       margin: 0.5em; 
-}
-
-#summary-view label {
-       font-weight: bold; 
-}  
-
-#summary-view .book-cover {
-       
-}
diff --git a/platforma/static/css/xmlcolors_15032010.css b/platforma/static/css/xmlcolors_15032010.css
deleted file mode 100644 (file)
index 099f94a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-.editbox {  
-  margin: .4em;
-  margin-top: 5px;
-  margin-left: 5px;
-  padding: 0;
-  font-family:"Lucida Console", monospace;
-  font-size: 13px;
-  line-height: 18px;  
-  color: black;
-}
-
-.editbox p {
-  margin: 0;
-}
-
-.editbox span {
-       display: inline;  
-       font-size: 13px;
-    line-height: 18px; 
-}
-
-span.xml-tagname {
-  color: #0e5f0e;
-}
-
-span.xml-attribute {
-  color: #8b8b8b;
-}
-
-span.xml-punctuation {
-  color: black;
-}
-
-span.xml-attname {
-  color: #817aff;
-}
-
-span.xml-comment {
-  color: #A70;
-}
-
-span.xml-cdata {
-  color: #48A;
-}
-
-span.xml-processing {
-  color: #999;
-}
-
-span.xml-entity {
-  color: #A22;
-}
-
-span.xml-error {
-  color: #F00;
-  font-weight: bolder;
-}
-
-span.xml-text {
-  color: black;
-}
diff --git a/platforma/static/filebrowser/css/filebrowser.css b/platforma/static/filebrowser/css/filebrowser.css
deleted file mode 100644 (file)
index c68126e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-.filebrowser table td { font-size: 10px; }
-.filebrowser table a { font-size: 11px; }
-.filebrowser thead th.sorted a { padding-right: 13px; }
-.filebrowser td { padding: 9px 10px 7px 10px !important; }
-.filebrowser td.fb_icon { padding: 6px 5px 5px 5px !important; }
-
-table a.fb_deletelink, table a.fb_renamelink, table a.fb_selectlink, table a.fb_showversionslink {
-    cursor: pointer;
-    display: block; padding: 0; margin: 0;
-    width: 23px; height: 17px;
-    background-color: transparent;
-    background-position: 0 center;
-    background-repeat: no-repeat;
-}
-
-table .fb_deletelink:link, table .fb_deletelink:visited {
-    width: 15px;
-    background-image: url('../img/filebrowser_icon_delete.gif');
-}
-table .fb_deletelink:hover, table .fb_deletelink:active { background-image: url('../img/filebrowser_icon_delete_hover.gif'); }
-table .fb_renamelink:link, table .fb_renamelink:visited {
-    width: 14px;
-    background-image: url('../img/filebrowser_icon_rename.gif');
-}
-table .fb_renamelink:hover, table .fb_renamelink:active { background-image: url('../img/filebrowser_icon_rename_hover.gif'); }
-table .fb_selectlink:link, table .fb_selectlink:visited { background-image: url('../img/filebrowser_icon_select.gif'); }
-table .fb_selectlink:hover, table .fb_selectlink:active { background-image: url('../img/filebrowser_icon_select_hover.gif'); }
-table .fb_showversionslink:link, table .fb_showversionslink:visited { background-image: url('../img/filebrowser_icon_showversions.gif'); }
-table .fb_showversionslink:hover, table .fb_showversionslink:active { background-image: url('../img/filebrowser_icon_showversions_hover.gif'); }
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_delete.gif b/platforma/static/filebrowser/img/filebrowser_icon_delete.gif
deleted file mode 100644 (file)
index 221a6e1..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_delete.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_delete_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_delete_hover.gif
deleted file mode 100644 (file)
index 2a2142c..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_delete_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator.gif b/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator.gif
deleted file mode 100644 (file)
index 9b19a42..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif
deleted file mode 100644 (file)
index aaa256f..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_makethumb.gif b/platforma/static/filebrowser/img/filebrowser_icon_makethumb.gif
deleted file mode 100644 (file)
index 837f6cc..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_makethumb.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif
deleted file mode 100644 (file)
index d1d4d4a..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_rename.gif b/platforma/static/filebrowser/img/filebrowser_icon_rename.gif
deleted file mode 100644 (file)
index bc45fe4..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_rename.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_rename_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_rename_hover.gif
deleted file mode 100644 (file)
index be8ea08..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_rename_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_select.gif b/platforma/static/filebrowser/img/filebrowser_icon_select.gif
deleted file mode 100644 (file)
index a838427..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_select.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_select_disabled.gif b/platforma/static/filebrowser/img/filebrowser_icon_select_disabled.gif
deleted file mode 100644 (file)
index 60ad2d5..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_select_disabled.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_select_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_select_hover.gif
deleted file mode 100644 (file)
index 319558e..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_select_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_show.gif b/platforma/static/filebrowser/img/filebrowser_icon_show.gif
deleted file mode 100644 (file)
index dded982..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_show.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_show_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_show_hover.gif
deleted file mode 100644 (file)
index fbd1f33..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_show_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_showversions.gif b/platforma/static/filebrowser/img/filebrowser_icon_showversions.gif
deleted file mode 100644 (file)
index 71525d7..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_showversions.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_icon_showversions_hover.gif b/platforma/static/filebrowser/img/filebrowser_icon_showversions_hover.gif
deleted file mode 100644 (file)
index 1fbe2e4..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_icon_showversions_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif
deleted file mode 100644 (file)
index 9b19a42..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif
deleted file mode 100644 (file)
index aaa256f..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif
deleted file mode 100644 (file)
index bcd98d9..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif
deleted file mode 100644 (file)
index f9938c7..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif
deleted file mode 100644 (file)
index a6863cb..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif
deleted file mode 100644 (file)
index b9aba7c..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif
deleted file mode 100644 (file)
index 6de016b..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif b/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif
deleted file mode 100644 (file)
index eaaf254..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_.gif b/platforma/static/filebrowser/img/filebrowser_type_.gif
deleted file mode 100644 (file)
index 6a908e2..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_code.gif b/platforma/static/filebrowser/img/filebrowser_type_code.gif
deleted file mode 100644 (file)
index 9650839..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_code.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_document.gif b/platforma/static/filebrowser/img/filebrowser_type_document.gif
deleted file mode 100644 (file)
index 65ebd99..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_document.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_folder.gif b/platforma/static/filebrowser/img/filebrowser_type_folder.gif
deleted file mode 100644 (file)
index 115e3fb..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_folder.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_image.gif b/platforma/static/filebrowser/img/filebrowser_type_image.gif
deleted file mode 100644 (file)
index 000b31c..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_image.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_sound.gif b/platforma/static/filebrowser/img/filebrowser_type_sound.gif
deleted file mode 100644 (file)
index 8a8970a..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_sound.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/filebrowser_type_video.gif b/platforma/static/filebrowser/img/filebrowser_type_video.gif
deleted file mode 100644 (file)
index f456d59..0000000
Binary files a/platforma/static/filebrowser/img/filebrowser_type_video.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/tableheader_arrow_down.gif b/platforma/static/filebrowser/img/tableheader_arrow_down.gif
deleted file mode 100644 (file)
index 5ae95a6..0000000
Binary files a/platforma/static/filebrowser/img/tableheader_arrow_down.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/tableheader_arrow_up.gif b/platforma/static/filebrowser/img/tableheader_arrow_up.gif
deleted file mode 100644 (file)
index 85f1e12..0000000
Binary files a/platforma/static/filebrowser/img/tableheader_arrow_up.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/img/tableheader_arrows.gif b/platforma/static/filebrowser/img/tableheader_arrows.gif
deleted file mode 100644 (file)
index 39b8780..0000000
Binary files a/platforma/static/filebrowser/img/tableheader_arrows.gif and /dev/null differ
diff --git a/platforma/static/filebrowser/js/AddFileBrowser.js b/platforma/static/filebrowser/js/AddFileBrowser.js
deleted file mode 100644 (file)
index 888885f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-var FileBrowser = {
-    // this is set automatically
-    admin_media_prefix: '',
-    // change this
-    thumb_prefix: 'thumb_',
-    no_thumb: 'filebrowser/img/no_thumb.gif',
-
-    init: function() {
-        // Deduce admin_media_prefix by looking at the <script>s in the
-        // current document and finding the URL of *this* module.
-        var scripts = document.getElementsByTagName('script');
-        for (var i=0; i<scripts.length; i++) {
-            if (scripts[i].src.match(/AddFileBrowser/)) {
-                var idx = scripts[i].src.indexOf('filebrowser/js/AddFileBrowser');
-                FileBrowser.admin_media_prefix = scripts[i].src.substring(0, idx);
-                break;
-            }
-        }
-    },
-    // show FileBrowser
-    show: function(id, href) {
-        // var id2=String(id).split(".").join("___");
-        var id2=String(id).replace(/\-/g,"____").split(".").join("___");
-        FBWindow = window.open(href, String(id2), 'height=600,width=960,resizable=yes,scrollbars=yes');
-        FBWindow.focus();
-    }
-}
-
-addEvent(window, 'load', FileBrowser.init);
-
diff --git a/platforma/static/filebrowser/js/FB_CKEditor.js b/platforma/static/filebrowser/js/FB_CKEditor.js
deleted file mode 100644 (file)
index 74d8d64..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-function ProtectPath(path) {
-    path = path.replace( /\\/g,'\\\\');
-    path = path.replace( /'/g,'\\\'');
-    return path ;
-}
-
-function gup( name ) {
-  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
-  var regexS = "[\\?&]"+name+"=([^&#]*)";
-  var regex = new RegExp(regexS);
-  var results = regex.exec(window.location.href);
-  if(results == null)
-    return "";
-  else
-    return results[1];
-}
-
-function OpenFile(fileUrl) {
-    var CKEditorFuncNum = gup('CKEditorFuncNum');
-    window.top.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,encodeURI(fileUrl).replace('#','%23'));
-    window.top.close();
-    window.top.opener.focus();
-}
-
diff --git a/platforma/static/filebrowser/js/FB_FileBrowseField.js b/platforma/static/filebrowser/js/FB_FileBrowseField.js
deleted file mode 100644 (file)
index 5e3aa9f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-function FileSubmit(FileURL, ThumbURL, FileType) {
-
-    // var input_id=window.name.split("___").join(".");
-    var input_id=window.name.replace(/____/g,'-').split("___").join(".");
-    var preview_id = 'image_' + input_id;
-    var link_id = 'link_' + input_id;
-    var help_id = 'help_' + input_id;
-    input = opener.document.getElementById(input_id);
-    preview = opener.document.getElementById(preview_id);
-    link = opener.document.getElementById(link_id);
-    help = opener.document.getElementById(help_id);
-    // set new value for input field
-    input.value = FileURL;
-
-    if (ThumbURL && FileType != "") {
-        // selected file is an image and thumbnail is available:
-        // display the preview-image (thumbnail)
-        // link the preview-image to the original image
-        link.setAttribute("href", FileURL);
-        link.setAttribute("target", "_blank");
-        preview.setAttribute("src", ThumbURL);
-        help.setAttribute("style", "display:block");
-    } else {
-        // hide preview elements
-        link.setAttribute("href", "");
-        link.setAttribute("target", "");
-        preview.setAttribute("src", "");
-        help.setAttribute("style", "display:none");
-    }
-    this.close();
-}
-
diff --git a/platforma/static/filebrowser/js/FB_TinyMCE.js b/platforma/static/filebrowser/js/FB_TinyMCE.js
deleted file mode 100644 (file)
index b2d4d60..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-var FileBrowserDialogue = {
-    init : function () {
-        // remove tinymce stylesheet.
-        var allLinks = document.getElementsByTagName("link");
-        allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
-    },
-    fileSubmit : function (FileURL) {
-        var URL = FileURL;
-        var win = tinyMCEPopup.getWindowArg("window");
-
-        // insert information now
-        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
-
-        // change width/height & show preview
-        if (win.ImageDialog){
-            if (win.ImageDialog.getImageData)
-                win.ImageDialog.getImageData();
-            if (win.ImageDialog.showPreviewImage)
-                win.ImageDialog.showPreviewImage(URL);
-        }
-
-        // close popup window
-        tinyMCEPopup.close();
-    }
-}
-
-tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
-
diff --git a/platforma/static/filebrowser/js/TinyMCEAdmin.js b/platforma/static/filebrowser/js/TinyMCEAdmin.js
deleted file mode 100644 (file)
index 902fc9f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-function CustomFileBrowser(field_name, url, type, win) {
-
-    var cmsURL = "/admin/filebrowser/browse/?pop=2";
-    cmsURL = cmsURL + "&type=" + type;
-
-    tinyMCE.activeEditor.windowManager.open({
-        file: cmsURL,
-        width: 820,  // Your dimensions may differ - toy around with them!
-        height: 500,
-        resizable: "yes",
-        scrollbars: "yes",
-        inline: "no",  // This parameter only has an effect if you use the inlinepopups plugin!
-        close_previous: "no"
-    }, {
-        window: win,
-        input: field_name,
-        editor_id: tinyMCE.selectedInstance.editorId
-    });
-    return false;
-}
-
-
-tinyMCE.init({
-    mode: "textareas",
-    theme: "advanced",
-    language: "en",
-    skin: "o2k7",
-    browsers: "gecko",
-    dialog_type: "modal",
-    object_resizing: true,
-    cleanup_on_startup: true,
-    forced_root_block: "p",
-    remove_trailing_nbsp: true,
-    theme_advanced_toolbar_location: "top",
-    theme_advanced_toolbar_align: "left",
-    theme_advanced_statusbar_location: "none",
-    theme_advanced_buttons1: "formatselect,bold,italic,underline,bullist,numlist,undo,redo,link,unlink,image,code,fullscreen,pasteword,media,charmap",
-    theme_advanced_buttons2: "",
-    theme_advanced_buttons3: "",
-    theme_advanced_path: false,
-    theme_advanced_blockformats: "p,h2,h3,h4,h5,h6",
-    width: '700',
-    height: '200',
-    plugins: "advimage,advlink,fullscreen,visualchars,paste,media,template,searchreplace",
-    advimage_styles: "Linksbündig neben Text=img_left;Rechtsbündig neben Text=img_right;Eigener Block=img_block",
-    advlink_styles: "internal (sehmaschine.net)=internal;external (link to an external site)=external",
-    advimage_update_dimensions_onchange: true,
-    file_browser_callback: "CustomFileBrowser",
-    relative_urls: false,
-    valid_elements : "" +
-    "-p," +
-    "a[href|target=_blank|class]," +
-    "-strong/-b," +
-    "-em/-i," +
-    "-u," +
-    "-ol," +
-    "-ul," +
-    "-li," +
-    "br," +
-    "img[class|src|alt=|width|height]," +
-    "-h2,-h3,-h4," +
-    "-pre," +
-    "-code," +
-    "-div",
-    extended_valid_elements: "" +
-    "a[name|class|href|target|title|onclick]," +
-    "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]," +
-    "br[clearfix]," +
-    "-p[class<clearfix?summary?code]," +
-    "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," +
-    "ul[class<clearfix],ol[class<clearfix]," +
-    "div[class],"
-});
-
-
diff --git a/platforma/static/filebrowser/js/jquery-1.3.2.min.js b/platforma/static/filebrowser/js/jquery-1.3.2.min.js
deleted file mode 100644 (file)
index b1ae21d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * Sizzle CSS Selector Engine - v0.9.3
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf b/platforma/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf
deleted file mode 100644 (file)
index c8b2565..0000000
Binary files a/platforma/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/cancel.png b/platforma/static/filebrowser/uploadify/cancel.png
deleted file mode 100644 (file)
index 1c062ae..0000000
Binary files a/platforma/static/filebrowser/uploadify/cancel.png and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/check.php b/platforma/static/filebrowser/uploadify/check.php
deleted file mode 100644 (file)
index d7dc571..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php\r
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-$fileArray = array();\r
-foreach ($_POST as $key => $value) {\r
-       if ($key != 'folder') {\r
-               if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) {\r
-                       $fileArray[$key] = $value;\r
-               }\r
-       }\r
-}\r
-echo json_encode($fileArray);\r
-?>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as b/platforma/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as
deleted file mode 100644 (file)
index 0dda3eb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.air.logging
-{
-       import mx.logging.AbstractTarget;
-       import flash.filesystem.File;
-       import flash.filesystem.FileStream;
-       import flash.filesystem.FileMode;
-       import mx.logging.LogEvent;
-       import flash.system.System;
-       import flash.system.Capabilities;
-       import mx.logging.targets.LineFormattedTarget;
-       import mx.core.mx_internal;
-       
-       use namespace mx_internal;
-
-       /**
-        * An Adobe AIR only class that provides a log target for the Flex logging
-        * framework, that logs files to a file on the user's system.
-        * 
-        * This class will only work when running within Adobe AIR>
-        */
-       public class FileTarget extends LineFormattedTarget
-       {
-               private const DEFAULT_LOG_PATH:String = "app-storage:/application.log";
-               
-               private var log:File;
-               
-               public function FileTarget(logFile:File = null)
-               {
-                       if(logFile != null)
-                       {
-                               log = logFile;
-                       }
-                       else
-                       {
-                               log = new File(DEFAULT_LOG_PATH);
-                       }
-               }
-               
-               public function get logURI():String
-               {
-                       return log.url;
-               }
-               
-               mx_internal override function internalLog(message:String):void
-           {
-                       write(message);
-           }           
-               
-               private function write(msg:String):void
-               {               
-                       var fs:FileStream = new FileStream();
-                               fs.open(log, FileMode.APPEND);
-                               fs.writeUTFBytes(msg + "\n");
-                               fs.close();
-               }       
-               
-               public function clear():void
-               {
-                       var fs:FileStream = new FileStream();
-                               fs.open(log, FileMode.WRITE);
-                               fs.writeUTFBytes("");
-                               fs.close();                     
-               }
-               
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as
deleted file mode 100644 (file)
index 72f9bff..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto {\r
-       import flash.utils.ByteArray;\r
-       import flash.utils.Endian;\r
-       import flash.utils.describeType;\r
-       /**\r
-        * Keyed-Hashing for Message Authentication\r
-        * Implementation based on algorithm description at \r
-        * http://www.faqs.org/rfcs/rfc2104.html\r
-        */\r
-       public class HMAC \r
-       {\r
-               /**\r
-                * Performs the HMAC hash algorithm using byte arrays.\r
-                *\r
-                * @param secret The secret key\r
-                * @param message The message to hash\r
-                * @param algorithm Hash object to use\r
-                * @return A string containing the hash value of message\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 8.5\r
-                * @tiptext\r
-                */\r
-               public static function hash( secret:String, message:String, algorithm:Object = null ):String\r
-               {\r
-                       var text:ByteArray = new ByteArray();\r
-                       var k_secret:ByteArray = new ByteArray();\r
-                       \r
-                       text.writeUTFBytes(message);\r
-                       k_secret.writeUTFBytes(secret);\r
-                       \r
-                       return hashBytes(k_secret, text, algorithm);\r
-               }\r
-               \r
-               /**\r
-                * Performs the HMAC hash algorithm using string.\r
-                *\r
-                * @param secret The secret key\r
-                * @param message The message to hash\r
-                * @param algorithm Hash object to use\r
-                * @return A string containing the hash value of message\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 8.5\r
-                * @tiptext\r
-                */\r
-               public static function hashBytes( secret:ByteArray, message:ByteArray, algorithm:Object = null ):String\r
-               {\r
-                       var ipad:ByteArray = new ByteArray();\r
-                       var opad:ByteArray = new ByteArray();\r
-                       var endian:String = Endian.BIG_ENDIAN;\r
-                       \r
-                       if(algorithm == null){\r
-                               algorithm = MD5;\r
-                       }\r
-                       \r
-                       if ( describeType(algorithm).@name.toString() == "com.adobe.crypto::MD5" ) {\r
-                               endian = Endian.LITTLE_ENDIAN;\r
-                       }\r
-                       \r
-                       if ( secret.length > 64 ) {\r
-                               algorithm.hashBytes(secret);\r
-                               secret = new ByteArray();\r
-                               secret.endian = endian;\r
-                               \r
-                               while ( algorithm.digest.bytesAvailable != 0 ) {\r
-                                       secret.writeInt(algorithm.digest.readInt());\r
-                               }\r
-                       }\r
-\r
-                       secret.length = 64\r
-                       secret.position = 0;\r
-                       for ( var x:int = 0; x < 64; x++ ) {\r
-                               var byte:int = secret.readByte();\r
-                               ipad.writeByte(0x36 ^ byte);\r
-                               opad.writeByte(0x5c ^ byte);\r
-                       }\r
-                       \r
-                       ipad.writeBytes(message);\r
-                       algorithm.hashBytes(ipad);\r
-                       var tmp:ByteArray = new ByteArray();\r
-                       tmp.endian = endian;    \r
-                       \r
-                       while ( algorithm.digest.bytesAvailable != 0 ) {\r
-                               tmp.writeInt(algorithm.digest.readInt());\r
-                       }\r
-                       tmp.position = 0;\r
-                       \r
-                       while ( tmp.bytesAvailable != 0 ) {\r
-                               opad.writeByte(tmp.readUnsignedByte());\r
-                       }\r
-                       return algorithm.hashBytes( opad );\r
-               }\r
-               \r
-       }\r
-       \r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5.as
deleted file mode 100644 (file)
index da533cc..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.crypto {
-       
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;   
-       /**
-        * The MD5 Message-Digest Algorithm
-        *
-        * Implementation based on algorithm description at 
-        * http://www.faqs.org/rfcs/rfc1321.html
-        */
-       public class MD5 {
-               
-               public static var digest:ByteArray;
-               /**
-                * Performs the MD5 hash algorithm on a string.
-                *
-                * @param s The string to hash
-                * @return A string containing the hash value of s
-                * @langversion ActionScript 3.0
-                * @playerversion Flash 8.5
-                * @tiptext
-                */
-                
-               public static function hash(s:String) :String{
-                       //Convert to byteArray and send through hashBinary function
-                       // so as to only have complex code in one location
-                       var ba:ByteArray = new ByteArray();
-                       ba.writeUTFBytes(s);    
-                       return hashBinary(ba);
-               }
-               
-               public static function hashBytes(s:ByteArray) :String{  
-                       return hashBinary(s);
-               }
-               
-               /**
-                * Performs the MD5 hash algorithm on a ByteArray.
-                *
-                * @param s The string to hash
-                * @return A string containing the hash value of s
-                * @langversion ActionScript 3.0
-                * @playerversion Flash 8.5
-                * @tiptext
-                */      
-               public static function hashBinary( s:ByteArray ):String {
-                       // initialize the md buffers
-                       var a:int = 1732584193;
-                       var b:int = -271733879;
-                       var c:int = -1732584194;
-                       var d:int = 271733878;
-                       
-                       // variables to store previous values
-                       var aa:int;
-                       var bb:int;
-                       var cc:int;
-                       var dd:int;
-                       
-                       // create the blocks from the string and
-                       // save the length as a local var to reduce
-                       // lookup in the loop below
-                       var x:Array = createBlocks( s );
-                       var len:int = x.length;
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16) {
-                               // save previous values
-                               aa = a;
-                               bb = b;
-                               cc = c;
-                               dd = d;                         
-                               
-                               // Round 1
-                               a = ff( a, b, c, d, x[int(i+ 0)],  7, -680876936 );     // 1
-                               d = ff( d, a, b, c, x[int(i+ 1)], 12, -389564586 );     // 2
-                               c = ff( c, d, a, b, x[int(i+ 2)], 17, 606105819 );      // 3
-                               b = ff( b, c, d, a, x[int(i+ 3)], 22, -1044525330 );    // 4
-                               a = ff( a, b, c, d, x[int(i+ 4)],  7, -176418897 );     // 5
-                               d = ff( d, a, b, c, x[int(i+ 5)], 12, 1200080426 );     // 6
-                               c = ff( c, d, a, b, x[int(i+ 6)], 17, -1473231341 );    // 7
-                               b = ff( b, c, d, a, x[int(i+ 7)], 22, -45705983 );      // 8
-                               a = ff( a, b, c, d, x[int(i+ 8)],  7, 1770035416 );     // 9
-                               d = ff( d, a, b, c, x[int(i+ 9)], 12, -1958414417 );    // 10
-                               c = ff( c, d, a, b, x[int(i+10)], 17, -42063 );                 // 11
-                               b = ff( b, c, d, a, x[int(i+11)], 22, -1990404162 );    // 12
-                               a = ff( a, b, c, d, x[int(i+12)],  7, 1804603682 );     // 13
-                               d = ff( d, a, b, c, x[int(i+13)], 12, -40341101 );      // 14
-                               c = ff( c, d, a, b, x[int(i+14)], 17, -1502002290 );    // 15
-                               b = ff( b, c, d, a, x[int(i+15)], 22, 1236535329 );     // 16
-                               
-                               // Round 2
-                               a = gg( a, b, c, d, x[int(i+ 1)],  5, -165796510 );     // 17
-                               d = gg( d, a, b, c, x[int(i+ 6)],  9, -1069501632 );    // 18
-                               c = gg( c, d, a, b, x[int(i+11)], 14, 643717713 );      // 19
-                               b = gg( b, c, d, a, x[int(i+ 0)], 20, -373897302 );     // 20
-                               a = gg( a, b, c, d, x[int(i+ 5)],  5, -701558691 );     // 21
-                               d = gg( d, a, b, c, x[int(i+10)],  9, 38016083 );       // 22
-                               c = gg( c, d, a, b, x[int(i+15)], 14, -660478335 );     // 23
-                               b = gg( b, c, d, a, x[int(i+ 4)], 20, -405537848 );     // 24
-                               a = gg( a, b, c, d, x[int(i+ 9)],  5, 568446438 );      // 25
-                               d = gg( d, a, b, c, x[int(i+14)],  9, -1019803690 );    // 26
-                               c = gg( c, d, a, b, x[int(i+ 3)], 14, -187363961 );     // 27
-                               b = gg( b, c, d, a, x[int(i+ 8)], 20, 1163531501 );     // 28
-                               a = gg( a, b, c, d, x[int(i+13)],  5, -1444681467 );    // 29
-                               d = gg( d, a, b, c, x[int(i+ 2)],  9, -51403784 );      // 30
-                               c = gg( c, d, a, b, x[int(i+ 7)], 14, 1735328473 );     // 31
-                               b = gg( b, c, d, a, x[int(i+12)], 20, -1926607734 );    // 32
-                               
-                               // Round 3
-                               a = hh( a, b, c, d, x[int(i+ 5)],  4, -378558 );        // 33
-                               d = hh( d, a, b, c, x[int(i+ 8)], 11, -2022574463 );    // 34
-                               c = hh( c, d, a, b, x[int(i+11)], 16, 1839030562 );     // 35
-                               b = hh( b, c, d, a, x[int(i+14)], 23, -35309556 );      // 36
-                               a = hh( a, b, c, d, x[int(i+ 1)],  4, -1530992060 );    // 37
-                               d = hh( d, a, b, c, x[int(i+ 4)], 11, 1272893353 );     // 38
-                               c = hh( c, d, a, b, x[int(i+ 7)], 16, -155497632 );     // 39
-                               b = hh( b, c, d, a, x[int(i+10)], 23, -1094730640 );    // 40
-                               a = hh( a, b, c, d, x[int(i+13)],  4, 681279174 );      // 41
-                               d = hh( d, a, b, c, x[int(i+ 0)], 11, -358537222 );     // 42
-                               c = hh( c, d, a, b, x[int(i+ 3)], 16, -722521979 );     // 43
-                               b = hh( b, c, d, a, x[int(i+ 6)], 23, 76029189 );       // 44
-                               a = hh( a, b, c, d, x[int(i+ 9)],  4, -640364487 );     // 45
-                               d = hh( d, a, b, c, x[int(i+12)], 11, -421815835 );     // 46
-                               c = hh( c, d, a, b, x[int(i+15)], 16, 530742520 );      // 47
-                               b = hh( b, c, d, a, x[int(i+ 2)], 23, -995338651 );     // 48
-                               
-                               // Round 4
-                               a = ii( a, b, c, d, x[int(i+ 0)],  6, -198630844 );     // 49
-                               d = ii( d, a, b, c, x[int(i+ 7)], 10, 1126891415 );     // 50
-                               c = ii( c, d, a, b, x[int(i+14)], 15, -1416354905 );    // 51
-                               b = ii( b, c, d, a, x[int(i+ 5)], 21, -57434055 );      // 52
-                               a = ii( a, b, c, d, x[int(i+12)],  6, 1700485571 );     // 53
-                               d = ii( d, a, b, c, x[int(i+ 3)], 10, -1894986606 );    // 54
-                               c = ii( c, d, a, b, x[int(i+10)], 15, -1051523 );       // 55
-                               b = ii( b, c, d, a, x[int(i+ 1)], 21, -2054922799 );    // 56
-                               a = ii( a, b, c, d, x[int(i+ 8)],  6, 1873313359 );     // 57
-                               d = ii( d, a, b, c, x[int(i+15)], 10, -30611744 );      // 58
-                               c = ii( c, d, a, b, x[int(i+ 6)], 15, -1560198380 );    // 59
-                               b = ii( b, c, d, a, x[int(i+13)], 21, 1309151649 );     // 60
-                               a = ii( a, b, c, d, x[int(i+ 4)],  6, -145523070 );     // 61
-                               d = ii( d, a, b, c, x[int(i+11)], 10, -1120210379 );    // 62
-                               c = ii( c, d, a, b, x[int(i+ 2)], 15, 718787259 );      // 63
-                               b = ii( b, c, d, a, x[int(i+ 9)], 21, -343485551 );     // 64
-
-                               a += aa;
-                               b += bb;
-                               c += cc;
-                               d += dd;
-                       }
-                       digest = new ByteArray()
-                       digest.writeInt(a);
-                       digest.writeInt(b);
-                       digest.writeInt(c);
-                       digest.writeInt(d);
-                       digest.position = 0;
-                       // Finish up by concatening the buffers with their hex output
-                       return IntUtil.toHex( a ) + IntUtil.toHex( b ) + IntUtil.toHex( c ) + IntUtil.toHex( d );
-               }
-               
-               /**
-                * Auxiliary function f as defined in RFC
-                */
-               private static function f( x:int, y:int, z:int ):int {
-                       return ( x & y ) | ( (~x) & z );
-               }
-               
-               /**
-                * Auxiliary function g as defined in RFC
-                */
-               private static function g( x:int, y:int, z:int ):int {
-                       return ( x & z ) | ( y & (~z) );
-               }
-               
-               /**
-                * Auxiliary function h as defined in RFC
-                */
-               private static function h( x:int, y:int, z:int ):int {
-                       return x ^ y ^ z;
-               }
-               
-               /**
-                * Auxiliary function i as defined in RFC
-                */
-               private static function i( x:int, y:int, z:int ):int {
-                       return y ^ ( x | (~z) );
-               }
-               
-               /**
-                * A generic transformation function.  The logic of ff, gg, hh, and
-                * ii are all the same, minus the function used, so pull that logic
-                * out and simplify the method bodies for the transoformation functions.
-                */
-               private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {
-                       var tmp:int = a + int( func( b, c, d ) ) + x + t;
-                       return IntUtil.rol( tmp, s ) +  b;
-               }
-               
-               /**
-                * ff transformation function
-                */
-               private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( f, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * gg transformation function
-                */
-               private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( g, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * hh transformation function
-                */
-               private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( h, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * ii transformation function
-                */
-               private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( i, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * Converts a string to a sequence of 16-word blocks
-                * that we'll do the processing on.  Appends padding
-                * and length in the process.
-                *
-                * @param s The string to split into blocks
-                * @return An array containing the blocks that s was
-                *                      split into.
-                */
-               private static function createBlocks( s:ByteArray ):Array {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ int(i >> 5) ] |= ( s[ i / 8 ] & mask ) << ( i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ int(len >> 5) ] |= 0x80 << ( len % 32 );
-                       blocks[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;
-                       return blocks;
-               }
-               
-       }
-}
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as
deleted file mode 100644 (file)
index 6e5eed0..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-    import com.adobe.utils.IntUtil;   \r
-    import flash.utils.ByteArray;\r
-\r
-    /**\r
-     * Perform MD5 hash of an input stream in chunks. This class is\r
-     * based on com.adobe.crypto.MD5 and can process data in\r
-     * chunks. Both block creation and hash computation are done\r
-     * together for whatever input is available so that the memory\r
-     * overhead at a time is always fixed. Memory usage is governed by\r
-     * two parameters: one is the amount of data passed in to update()\r
-     * and the other is memoryBlockSize. The latter comes into play\r
-     * only when the memory window exceeds the pre allocated memory\r
-     * window of flash player. Usage: create an instance, call\r
-     * update(data) repeatedly for all chunks and finally complete()\r
-     * which will return the md5 hash.\r
-     */      \r
-    public class MD5Stream\r
-    {\r
-        private static var mask:int = 0xFF;\r
-\r
-        private var arr:Array = [];\r
-\r
-        /* running count of length */\r
-        private var arrLen:int;\r
-        \r
-        // initialize the md buffers\r
-        private var a:int = 1732584193;\r
-        private var b:int = -271733879;\r
-        private var c:int = -1732584194;\r
-        private var d:int = 271733878;\r
-        \r
-        // variables to store previous values\r
-        private var aa:int;\r
-        private var bb:int;\r
-        private var cc:int;\r
-        private var dd:int;\r
-\r
-        /* index for data read */\r
-        private var arrIndexLen:int = 0;\r
-        /* index for hash computation */\r
-        private var arrProcessIndex:int = 0;\r
-        /* index for removing stale arr values */\r
-        private var cleanIndex:int = 0;\r
-        \r
-        /** \r
-         * Change this value from the default (16384) in the range of\r
-         * MBs to actually affect GC as GC allocates in pools of\r
-         * memory */\r
-        public var memoryBlockSize:int = 16384;\r
-        \r
-        \r
-        public function MD5Stream()\r
-        {\r
-            \r
-        }\r
-               \r
-        \r
-        /**\r
-         * Pass in chunks of the input data with update(), call\r
-         * complete() with an optional chunk which will return the\r
-         * final hash. Equivalent to the way\r
-         * java.security.MessageDigest works.\r
-         *\r
-         * @param input The optional bytearray chunk which is the final part of the input\r
-         * @return A string containing the hash value\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */\r
-        public function complete(input:ByteArray=null):String\r
-        {\r
-            if ( arr.length == 0 )\r
-            {\r
-                if ( input == null )\r
-                {\r
-                    throw new Error("null input to complete without prior call to update. At least an empty bytearray must be passed.");\r
-                }                              \r
-            }\r
-            \r
-            if ( input != null )\r
-            {\r
-                readIntoArray(input);\r
-            }\r
-\r
-            //pad, append length\r
-            padArray(arrLen);\r
-\r
-            hashRemainingChunks(false);\r
-            \r
-            var res:String = IntUtil.toHex( a ) + IntUtil.toHex( b ) + \r
-                                        IntUtil.toHex( c ) + IntUtil.toHex( d );\r
-            resetFields();\r
-            \r
-            return res;\r
-        }\r
-\r
-        /**\r
-         * Pass in chunks of the input data with update(), call\r
-         * complete() with an optional chunk which will return the\r
-         * final hash. Equivalent to the way\r
-         * java.security.MessageDigest works.\r
-         *\r
-         * @param input The bytearray chunk to perform the hash on\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */        \r
-        public function update(input:ByteArray):void\r
-        {\r
-            readIntoArray(input);\r
-            hashRemainingChunks();\r
-        }\r
-\r
-        /**\r
-         * Re-initialize this instance for use to perform hashing on\r
-         * another input stream. This is called automatically by\r
-         * complete().\r
-         *\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */               \r
-        public function resetFields():void\r
-        {\r
-            //truncate array\r
-            arr.length = 0;\r
-            arrLen = 0;\r
-            \r
-            // initialize the md buffers\r
-            a = 1732584193;\r
-            b = -271733879;\r
-            c = -1732584194;\r
-            d = 271733878;\r
-            \r
-            // variables to store previous values\r
-            aa = 0;\r
-            bb = 0;\r
-            cc = 0;\r
-            dd = 0;\r
-            \r
-            arrIndexLen = 0;            \r
-            arrProcessIndex = 0;\r
-            cleanIndex = 0;\r
-        }\r
-        \r
-        /** read into arr and free up used blocks of arr */\r
-        private function readIntoArray(input:ByteArray):void\r
-        {\r
-            var closestChunkLen:int = input.length * 8;\r
-            arrLen += closestChunkLen;\r
-            \r
-            /* clean up memory. if there are entries in the array that\r
-             * are already processed and the amount is greater than\r
-             * memoryBlockSize, create a new array, copy the last\r
-             * block into it and let the old one get picked up by\r
-             * GC. */\r
-            if ( arrProcessIndex - cleanIndex > memoryBlockSize )\r
-            {\r
-                var newarr:Array= new Array();\r
-                \r
-                /* AS Arrays in sparse arrays. arr[2002] can exist \r
-                 * without values for arr[0] - arr[2001] */\r
-                for ( var j:int = arrProcessIndex; j < arr.length; j++ )\r
-                {                                              \r
-                    newarr[j] = arr[j];\r
-                }\r
-                \r
-                cleanIndex = arrProcessIndex;\r
-                arr = null;\r
-                arr = newarr;\r
-            }\r
-            \r
-            for ( var k:int = 0; k < closestChunkLen; k+=8 )\r
-            {\r
-                //discard high bytes (convert to uint)\r
-                arr[ int(arrIndexLen >> 5) ] |= ( input[ k / 8 ] & mask ) << ( arrIndexLen % 32 );\r
-                arrIndexLen += 8;\r
-            }\r
-            \r
-            \r
-        }\r
-        \r
-        private function hashRemainingChunks(bUpdate:Boolean=true):void\r
-        {\r
-            var len:int = arr.length;\r
-\r
-            /* leave a 16 word block untouched if we are called from\r
-             * update. This is because, padArray() can modify the last\r
-             * block and this modification has to happen before we\r
-             * compute the hash.  */\r
-            if ( bUpdate )\r
-            {\r
-                len -= 16;\r
-            }\r
-\r
-            /* don't do anything if don't have a 16 word block. */\r
-            if ( arrProcessIndex >= len || len - arrProcessIndex < 15 )\r
-            {\r
-                return;\r
-            }\r
-\r
-            \r
-            for ( var i:int = arrProcessIndex; i < len ; i += 16, arrProcessIndex += 16) \r
-            {                  \r
-                // save previous values\r
-                aa = a;\r
-                bb = b;\r
-                cc = c;\r
-                dd = d;                         \r
-                \r
-                // Round 1\r
-                a = ff( a, b, c, d, arr[int(i+ 0)],  7, -680876936 );     // 1\r
-                d = ff( d, a, b, c, arr[int(i+ 1)], 12, -389564586 );     // 2\r
-                c = ff( c, d, a, b, arr[int(i+ 2)], 17, 606105819 );      // 3\r
-                b = ff( b, c, d, a, arr[int(i+ 3)], 22, -1044525330 );    // 4\r
-                a = ff( a, b, c, d, arr[int(i+ 4)],  7, -176418897 );     // 5\r
-                d = ff( d, a, b, c, arr[int(i+ 5)], 12, 1200080426 );     // 6\r
-                c = ff( c, d, a, b, arr[int(i+ 6)], 17, -1473231341 );    // 7\r
-                b = ff( b, c, d, a, arr[int(i+ 7)], 22, -45705983 );      // 8\r
-                a = ff( a, b, c, d, arr[int(i+ 8)],  7, 1770035416 );     // 9\r
-                d = ff( d, a, b, c, arr[int(i+ 9)], 12, -1958414417 );    // 10\r
-                c = ff( c, d, a, b, arr[int(i+10)], 17, -42063 );                 // 11\r
-                b = ff( b, c, d, a, arr[int(i+11)], 22, -1990404162 );    // 12\r
-                a = ff( a, b, c, d, arr[int(i+12)],  7, 1804603682 );     // 13\r
-                d = ff( d, a, b, c, arr[int(i+13)], 12, -40341101 );      // 14\r
-                c = ff( c, d, a, b, arr[int(i+14)], 17, -1502002290 );    // 15\r
-                b = ff( b, c, d, a, arr[int(i+15)], 22, 1236535329 );     // 16\r
-                \r
-                // Round 2\r
-                a = gg( a, b, c, d, arr[int(i+ 1)],  5, -165796510 );     // 17\r
-                d = gg( d, a, b, c, arr[int(i+ 6)],  9, -1069501632 );    // 18\r
-                c = gg( c, d, a, b, arr[int(i+11)], 14, 643717713 );      // 19\r
-                b = gg( b, c, d, a, arr[int(i+ 0)], 20, -373897302 );     // 20\r
-                a = gg( a, b, c, d, arr[int(i+ 5)],  5, -701558691 );     // 21\r
-                d = gg( d, a, b, c, arr[int(i+10)],  9, 38016083 );       // 22\r
-                c = gg( c, d, a, b, arr[int(i+15)], 14, -660478335 );     // 23\r
-                b = gg( b, c, d, a, arr[int(i+ 4)], 20, -405537848 );     // 24\r
-                a = gg( a, b, c, d, arr[int(i+ 9)],  5, 568446438 );      // 25\r
-                d = gg( d, a, b, c, arr[int(i+14)],  9, -1019803690 );    // 26\r
-                c = gg( c, d, a, b, arr[int(i+ 3)], 14, -187363961 );     // 27\r
-                b = gg( b, c, d, a, arr[int(i+ 8)], 20, 1163531501 );     // 28\r
-                a = gg( a, b, c, d, arr[int(i+13)],  5, -1444681467 );    // 29\r
-                d = gg( d, a, b, c, arr[int(i+ 2)],  9, -51403784 );      // 30\r
-                c = gg( c, d, a, b, arr[int(i+ 7)], 14, 1735328473 );     // 31\r
-                b = gg( b, c, d, a, arr[int(i+12)], 20, -1926607734 );    // 32\r
-                \r
-                // Round 3\r
-                a = hh( a, b, c, d, arr[int(i+ 5)],  4, -378558 );        // 33\r
-                d = hh( d, a, b, c, arr[int(i+ 8)], 11, -2022574463 );    // 34\r
-                c = hh( c, d, a, b, arr[int(i+11)], 16, 1839030562 );     // 35\r
-                b = hh( b, c, d, a, arr[int(i+14)], 23, -35309556 );      // 36\r
-                a = hh( a, b, c, d, arr[int(i+ 1)],  4, -1530992060 );    // 37\r
-                d = hh( d, a, b, c, arr[int(i+ 4)], 11, 1272893353 );     // 38\r
-                c = hh( c, d, a, b, arr[int(i+ 7)], 16, -155497632 );     // 39\r
-                b = hh( b, c, d, a, arr[int(i+10)], 23, -1094730640 );    // 40\r
-                a = hh( a, b, c, d, arr[int(i+13)],  4, 681279174 );      // 41\r
-                d = hh( d, a, b, c, arr[int(i+ 0)], 11, -358537222 );     // 42\r
-                c = hh( c, d, a, b, arr[int(i+ 3)], 16, -722521979 );     // 43\r
-                b = hh( b, c, d, a, arr[int(i+ 6)], 23, 76029189 );       // 44\r
-                a = hh( a, b, c, d, arr[int(i+ 9)],  4, -640364487 );     // 45\r
-                d = hh( d, a, b, c, arr[int(i+12)], 11, -421815835 );     // 46\r
-                c = hh( c, d, a, b, arr[int(i+15)], 16, 530742520 );      // 47\r
-                b = hh( b, c, d, a, arr[int(i+ 2)], 23, -995338651 );     // 48\r
-                \r
-                // Round 4\r
-                a = ii( a, b, c, d, arr[int(i+ 0)],  6, -198630844 );     // 49\r
-                d = ii( d, a, b, c, arr[int(i+ 7)], 10, 1126891415 );     // 50\r
-                c = ii( c, d, a, b, arr[int(i+14)], 15, -1416354905 );    // 51\r
-                b = ii( b, c, d, a, arr[int(i+ 5)], 21, -57434055 );      // 52\r
-                a = ii( a, b, c, d, arr[int(i+12)],  6, 1700485571 );     // 53\r
-                d = ii( d, a, b, c, arr[int(i+ 3)], 10, -1894986606 );    // 54\r
-                c = ii( c, d, a, b, arr[int(i+10)], 15, -1051523 );       // 55\r
-                b = ii( b, c, d, a, arr[int(i+ 1)], 21, -2054922799 );    // 56\r
-                a = ii( a, b, c, d, arr[int(i+ 8)],  6, 1873313359 );     // 57\r
-                d = ii( d, a, b, c, arr[int(i+15)], 10, -30611744 );      // 58\r
-                c = ii( c, d, a, b, arr[int(i+ 6)], 15, -1560198380 );    // 59\r
-                b = ii( b, c, d, a, arr[int(i+13)], 21, 1309151649 );     // 60\r
-                a = ii( a, b, c, d, arr[int(i+ 4)],  6, -145523070 );     // 61\r
-                d = ii( d, a, b, c, arr[int(i+11)], 10, -1120210379 );    // 62\r
-                c = ii( c, d, a, b, arr[int(i+ 2)], 15, 718787259 );      // 63\r
-                b = ii( b, c, d, a, arr[int(i+ 9)], 21, -343485551 );     // 64\r
-                \r
-                a += aa;\r
-                b += bb;\r
-                c += cc;\r
-                d += dd;\r
-                \r
-            }\r
-            \r
-        }\r
-        \r
-        private function padArray(len:int):void\r
-        {                      \r
-            arr[ int(len >> 5) ] |= 0x80 << ( len % 32 );\r
-            arr[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;\r
-            arrLen = arr.length;\r
-        }  \r
-        \r
-        /* Code below same as com.adobe.crypto.MD5 */ \r
-        \r
-        /**\r
-         * Auxiliary function f as defined in RFC\r
-         */\r
-        private static function f( x:int, y:int, z:int ):int {\r
-            return ( x & y ) | ( (~x) & z );\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function g as defined in RFC\r
-         */\r
-        private static function g( x:int, y:int, z:int ):int {\r
-            return ( x & z ) | ( y & (~z) );\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function h as defined in RFC\r
-         */\r
-        private static function h( x:int, y:int, z:int ):int {\r
-            return x ^ y ^ z;\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function i as defined in RFC\r
-         */\r
-        private static function i( x:int, y:int, z:int ):int {\r
-            return y ^ ( x | (~z) );\r
-        }\r
-        \r
-        /**\r
-         * A generic transformation function.  The logic of ff, gg, hh, and\r
-         * ii are all the same, minus the function used, so pull that logic\r
-         * out and simplify the method bodies for the transoformation functions.\r
-         */\r
-        private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {\r
-            var tmp:int = a + int( func( b, c, d ) ) + x + t;\r
-            return IntUtil.rol( tmp, s ) +  b;\r
-        }\r
-        \r
-        /**\r
-         * ff transformation function\r
-         */\r
-        private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( f, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * gg transformation function\r
-         */\r
-        private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( g, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * hh transformation function\r
-         */\r
-        private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( h, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * ii transformation function\r
-         */\r
-        private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( i, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-    }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as
deleted file mode 100644 (file)
index 952f3c7..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-       import com.adobe.utils.IntUtil;\r
-       import flash.utils.ByteArray;\r
-       import mx.utils.Base64Encoder;\r
-       \r
-       /**\r
-        *  US Secure Hash Algorithm 1 (SHA1)\r
-        *\r
-        *  Implementation based on algorithm description at \r
-        *  http://www.faqs.org/rfcs/rfc3174.html\r
-        */\r
-       public class SHA1\r
-       {\r
-               public static var digest:ByteArray;\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a string.\r
-                *\r
-                *  @param s            The string to hash\r
-                *  @return                     A string containing the hash value of s\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                *  @tiptext\r
-                */\r
-               public static function hash( s:String ):String\r
-               {\r
-                       var blocks:Array = createBlocksFromString( s );\r
-                       var byteArray:ByteArray = hashBlocks( blocks );\r
-                       \r
-                       return IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true );\r
-               }\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a ByteArray.\r
-                *\r
-                *  @param data         The ByteArray data to hash\r
-                *  @return                     A string containing the hash value of data\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                */\r
-               public static function hashBytes( data:ByteArray ):String\r
-               {\r
-                       var blocks:Array = SHA1.createBlocksFromByteArray( data );\r
-                       var byteArray:ByteArray = hashBlocks(blocks);\r
-                       \r
-                       return IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true );\r
-               }\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a string, then does\r
-                *  Base64 encoding on the result.\r
-                *\r
-                *  @param s            The string to hash\r
-                *  @return                     The base64 encoded hash value of s\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                *  @tiptext\r
-                */\r
-               public static function hashToBase64( s:String ):String\r
-               {\r
-                       var blocks:Array = SHA1.createBlocksFromString( s );\r
-                       var byteArray:ByteArray = hashBlocks(blocks);\r
-\r
-                       // ByteArray.toString() returns the contents as a UTF-8 string,\r
-                       // which we can't use because certain byte sequences might trigger\r
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters\r
-                       // one by one.\r
-                       var charsInByteArray:String = "";\r
-                       byteArray.position = 0;\r
-                       for (var j:int = 0; j < byteArray.length; j++)\r
-                       {\r
-                               var byte:uint = byteArray.readUnsignedByte();\r
-                               charsInByteArray += String.fromCharCode(byte);\r
-                       }\r
-\r
-                       var encoder:Base64Encoder = new Base64Encoder();\r
-                       encoder.encode(charsInByteArray);\r
-                       return encoder.flush();\r
-               }\r
-               \r
-               private static function hashBlocks( blocks:Array ):ByteArray\r
-               {\r
-                       // initialize the h's\r
-                       var h0:int = 0x67452301;\r
-                       var h1:int = 0xefcdab89;\r
-                       var h2:int = 0x98badcfe;\r
-                       var h3:int = 0x10325476;\r
-                       var h4:int = 0xc3d2e1f0;\r
-                       \r
-                       var len:int = blocks.length;\r
-                       var w:Array = new Array( 80 );\r
-                       \r
-                       // loop over all of the blocks\r
-                       for ( var i:int = 0; i < len; i += 16 ) {\r
-                       \r
-                               // 6.1.c\r
-                               var a:int = h0;\r
-                               var b:int = h1;\r
-                               var c:int = h2;\r
-                               var d:int = h3;\r
-                               var e:int = h4;\r
-                               \r
-                               // 80 steps to process each block\r
-                               // TODO: unroll for faster execution, or 4 loops of\r
-                               // 20 each to avoid the k and f function calls\r
-                               for ( var t:int = 0; t < 80; t++ ) {\r
-                                       \r
-                                       if ( t < 16 ) {\r
-                                               // 6.1.a\r
-                                               w[ t ] = blocks[ i + t ];\r
-                                       } else {\r
-                                               // 6.1.b\r
-                                               w[ t ] = IntUtil.rol( w[ t - 3 ] ^ w[ t - 8 ] ^ w[ t - 14 ] ^ w[ t - 16 ], 1 );\r
-                                       }\r
-                                       \r
-                                       // 6.1.d\r
-                                       var temp:int = IntUtil.rol( a, 5 ) + f( t, b, c, d ) + e + int( w[ t ] ) + k( t );\r
-                                       \r
-                                       e = d;\r
-                                       d = c;\r
-                                       c = IntUtil.rol( b, 30 );\r
-                                       b = a;\r
-                                       a = temp;\r
-                               }\r
-                               \r
-                               // 6.1.e\r
-                               h0 += a;\r
-                               h1 += b;\r
-                               h2 += c;\r
-                               h3 += d;\r
-                               h4 += e;                \r
-                       }\r
-                       \r
-                       var byteArray:ByteArray = new ByteArray();\r
-                       byteArray.writeInt(h0);\r
-                       byteArray.writeInt(h1);\r
-                       byteArray.writeInt(h2);\r
-                       byteArray.writeInt(h3);\r
-                       byteArray.writeInt(h4);\r
-                       byteArray.position = 0;\r
-                       \r
-                       digest = new ByteArray();\r
-                       digest.writeBytes(byteArray);\r
-                       digest.position = 0;\r
-                       return byteArray;\r
-               }\r
-\r
-               /**\r
-                *  Performs the logical function based on t\r
-                */\r
-               private static function f( t:int, b:int, c:int, d:int ):int {\r
-                       if ( t < 20 ) {\r
-                               return ( b & c ) | ( ~b & d );\r
-                       } else if ( t < 40 ) {\r
-                               return b ^ c ^ d;\r
-                       } else if ( t < 60 ) {\r
-                               return ( b & c ) | ( b & d ) | ( c & d );\r
-                       }\r
-                       return b ^ c ^ d;\r
-               }\r
-               \r
-               /**\r
-                *  Determines the constant value based on t\r
-                */\r
-               private static function k( t:int ):int {\r
-                       if ( t < 20 ) {\r
-                               return 0x5a827999;\r
-                       } else if ( t < 40 ) {\r
-                               return 0x6ed9eba1;\r
-                       } else if ( t < 60 ) {\r
-                               return 0x8f1bbcdc;\r
-                       }\r
-                       return 0xca62c1d6;\r
-               }\r
-                                       \r
-               /**\r
-                *  Converts a ByteArray to a sequence of 16-word blocks\r
-                *  that we'll do the processing on.  Appends padding\r
-                *  and length in the process.\r
-                *\r
-                *  @param data         The data to split into blocks\r
-                *  @return                     An array containing the blocks into which data was split\r
-                */\r
-               private static function createBlocksFromByteArray( data:ByteArray ):Array\r
-               {\r
-                       var oldPosition:int = data.position;\r
-                       data.position = 0;\r
-                       \r
-                       var blocks:Array = new Array();\r
-                       var len:int = data.length * 8;\r
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
-                       for( var i:int = 0; i < len; i += 8 )\r
-                       {\r
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );\r
-                       }\r
-                       \r
-                       // append padding and length\r
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
-                       \r
-                       data.position = oldPosition;\r
-                       \r
-                       return blocks;\r
-               }\r
-                                       \r
-               /**\r
-                *  Converts a string to a sequence of 16-word blocks\r
-                *  that we'll do the processing on.  Appends padding\r
-                *  and length in the process.\r
-                *\r
-                *  @param s    The string to split into blocks\r
-                *  @return             An array containing the blocks that s was split into.\r
-                */\r
-               private static function createBlocksFromString( s:String ):Array\r
-               {\r
-                       var blocks:Array = new Array();\r
-                       var len:int = s.length * 8;\r
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
-                       for( var i:int = 0; i < len; i += 8 ) {\r
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );\r
-                       }\r
-                       \r
-                       // append padding and length\r
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
-                       return blocks;\r
-               }\r
-               \r
-       }\r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as
deleted file mode 100644 (file)
index ee15453..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.crypto
-{
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;
-       import mx.utils.Base64Encoder;
-       
-       /**
-        * The SHA-224 algorithm
-        * 
-        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
-        */
-       public class SHA224
-       {
-               public static var digest:ByteArray;
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a string.
-                *
-                *  @param s            The string to hash
-                *  @return                     A string containing the hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hash( s:String ):String {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks( blocks );
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a ByteArray.
-                *
-                *  @param data         The ByteArray data to hash
-                *  @return                     A string containing the hash value of data
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                */
-               public static function hashBytes( data:ByteArray ):String
-               {
-                       var blocks:Array = createBlocksFromByteArray( data );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a string, then does
-                *  Base64 encoding on the result.
-                *
-                *  @param s            The string to hash
-                *  @return                     The base64 encoded hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hashToBase64( s:String ):String
-               {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-
-                       // ByteArray.toString() returns the contents as a UTF-8 string,
-                       // which we can't use because certain byte sequences might trigger
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
-                       // one by one.
-                       var charsInByteArray:String = "";
-                       byteArray.position = 0;
-                       for (var j:int = 0; j < byteArray.length; j++)
-                       {
-                               var byte:uint = byteArray.readUnsignedByte();
-                               charsInByteArray += String.fromCharCode(byte);
-                       }
-
-                       var encoder:Base64Encoder = new Base64Encoder();
-                       encoder.encode(charsInByteArray);
-                       return encoder.flush();
-               }
-               
-               private static function hashBlocks( blocks:Array ):ByteArray {
-                       var h0:int = 0xc1059ed8;
-                       var h1:int = 0x367cd507;
-                       var h2:int = 0x3070dd17;
-                       var h3:int = 0xf70e5939;
-                       var h4:int = 0xffc00b31;
-                       var h5:int = 0x68581511;
-                       var h6:int = 0x64f98fa7;
-                       var h7:int = 0xbefa4fa4;
-                       
-                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
-                       
-                       var len:int = blocks.length;
-                       var w:Array = new Array();
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16 ) {
-                               
-                               var a:int = h0;
-                               var b:int = h1;
-                               var c:int = h2;
-                               var d:int = h3;
-                               var e:int = h4;
-                               var f:int = h5;
-                               var g:int = h6;
-                               var h:int = h7;
-                               
-                               for(var t:int = 0; t < 64; t++) {
-                                       
-                                       if ( t < 16 ) {
-                                               w[t] = blocks[ i + t ];
-                                               if(isNaN(w[t])) { w[t] = 0; }
-                                       } else {
-                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
-                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
-                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
-                                       }
-                                       
-                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
-                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
-                                       var t2:int = s0 + maj;
-                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
-                                       var ch:int = (e & f) ^ ((~e) & g);
-                                       var t1:int = h + s1 + ch + k[t] + w[t];
-                                       
-                                       h = g;
-                                       g = f;
-                                       f = e;
-                                       e = d + t1;
-                                       d = c;
-                                       c = b;
-                                       b = a;
-                                       a = t1 + t2;
-                               }
-                                       
-                               //Add this chunk's hash to result so far:
-                               h0 += a;
-                               h1 += b;
-                               h2 += c;
-                               h3 += d;
-                               h4 += e;
-                               h5 += f;
-                               h6 += g;
-                               h7 += h;
-                       }
-                       
-                       var byteArray:ByteArray = new ByteArray();
-                       byteArray.writeInt(h0);
-                       byteArray.writeInt(h1);
-                       byteArray.writeInt(h2);
-                       byteArray.writeInt(h3);
-                       byteArray.writeInt(h4);
-                       byteArray.writeInt(h5);
-                       byteArray.writeInt(h6);
-                       byteArray.position = 0;
-                       
-                       digest = new ByteArray();
-                       digest.writeBytes(byteArray);
-                       digest.position = 0;
-                       return byteArray;
-               }
-               
-               /**
-                *  Converts a ByteArray to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param data         The data to split into blocks
-                *  @return                     An array containing the blocks into which data was split
-                */
-               private static function createBlocksFromByteArray( data:ByteArray ):Array
-               {
-                       var oldPosition:int = data.position;
-                       data.position = 0;
-                       
-                       var blocks:Array = new Array();
-                       var len:int = data.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 )
-                       {
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       
-                       data.position = oldPosition;
-                       
-                       return blocks;
-               }
-                                       
-               /**
-                *  Converts a string to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param s    The string to split into blocks
-                *  @return             An array containing the blocks that s was split into.
-                */
-               private static function createBlocksFromString( s:String ):Array
-               {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       return blocks;
-               }
-       }
-}
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as
deleted file mode 100644 (file)
index 09a2ba2..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.crypto
-{
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;
-       import mx.utils.Base64Encoder;
-       
-       /**
-        * The SHA-256 algorithm
-        * 
-        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
-        */
-       public class SHA256
-       {
-               public static var digest:ByteArray;
-               /**
-                *  Performs the SHA256 hash algorithm on a string.
-                *
-                *  @param s            The string to hash
-                *  @return                     A string containing the hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hash( s:String ):String {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks( blocks );
-                       
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA256 hash algorithm on a ByteArray.
-                *
-                *  @param data         The ByteArray data to hash
-                *  @return                     A string containing the hash value of data
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                */
-               public static function hashBytes( data:ByteArray ):String
-               {
-                       var blocks:Array = createBlocksFromByteArray( data );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-                       
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA256 hash algorithm on a string, then does
-                *  Base64 encoding on the result.
-                *
-                *  @param s            The string to hash
-                *  @return                     The base64 encoded hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hashToBase64( s:String ):String
-               {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-
-                       // ByteArray.toString() returns the contents as a UTF-8 string,
-                       // which we can't use because certain byte sequences might trigger
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
-                       // one by one.
-                       var charsInByteArray:String = "";
-                       byteArray.position = 0;
-                       for (var j:int = 0; j < byteArray.length; j++)
-                       {
-                               var byte:uint = byteArray.readUnsignedByte();
-                               charsInByteArray += String.fromCharCode(byte);
-                       }
-
-                       var encoder:Base64Encoder = new Base64Encoder();
-                       encoder.encode(charsInByteArray);
-                       return encoder.flush();
-               }
-               
-               private static function hashBlocks( blocks:Array ):ByteArray {
-                       var h0:int = 0x6a09e667;
-                       var h1:int = 0xbb67ae85;
-                       var h2:int = 0x3c6ef372;
-                       var h3:int = 0xa54ff53a;
-                       var h4:int = 0x510e527f;
-                       var h5:int = 0x9b05688c;
-                       var h6:int = 0x1f83d9ab;
-                       var h7:int = 0x5be0cd19;
-                       
-                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
-                       
-                       var len:int = blocks.length;
-                       var w:Array = new Array( 64 );
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16 ) {
-                               
-                               var a:int = h0;
-                               var b:int = h1;
-                               var c:int = h2;
-                               var d:int = h3;
-                               var e:int = h4;
-                               var f:int = h5;
-                               var g:int = h6;
-                               var h:int = h7;
-                               
-                               for(var t:int = 0; t < 64; t++) {
-                                       
-                                       if ( t < 16 ) {
-                                               w[t] = blocks[ i + t ];
-                                               if(isNaN(w[t])) { w[t] = 0; }
-                                       } else {
-                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
-                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
-                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
-                                       }
-                                       
-                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
-                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
-                                       var t2:int = s0 + maj;
-                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
-                                       var ch:int = (e & f) ^ ((~e) & g);
-                                       var t1:int = h + s1 + ch + k[t] + w[t];
-                                       
-                                       h = g;
-                                       g = f;
-                                       f = e;
-                                       e = d + t1;
-                                       d = c;
-                                       c = b;
-                                       b = a;
-                                       a = t1 + t2;
-                               }
-                                       
-                               //Add this chunk's hash to result so far:
-                               h0 += a;
-                               h1 += b;
-                               h2 += c;
-                               h3 += d;
-                               h4 += e;
-                               h5 += f;
-                               h6 += g;
-                               h7 += h;
-                       }
-                       
-                       var byteArray:ByteArray = new ByteArray();
-                       byteArray.writeInt(h0);
-                       byteArray.writeInt(h1);
-                       byteArray.writeInt(h2);
-                       byteArray.writeInt(h3);
-                       byteArray.writeInt(h4);
-                       byteArray.writeInt(h5);
-                       byteArray.writeInt(h6);
-                       byteArray.writeInt(h7);
-                       byteArray.position = 0;
-                       
-                       digest = new ByteArray();
-                       digest.writeBytes(byteArray);
-                       digest.position = 0;
-                       return byteArray;
-               }
-               
-               /**
-                *  Converts a ByteArray to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param data         The data to split into blocks
-                *  @return                     An array containing the blocks into which data was split
-                */
-               private static function createBlocksFromByteArray( data:ByteArray ):Array
-               {
-                       var oldPosition:int = data.position;
-                       data.position = 0;
-                       
-                       var blocks:Array = new Array();
-                       var len:int = data.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 )
-                       {
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       
-                       data.position = oldPosition;
-                       
-                       return blocks;
-               }
-                                       
-               /**
-                *  Converts a string to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param s    The string to split into blocks
-                *  @return             An array containing the blocks that s was split into.
-                */
-               private static function createBlocksFromString( s:String ):Array
-               {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       return blocks;
-               }
-       }
-}
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as b/platforma/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as
deleted file mode 100644 (file)
index 92bbba6..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-       import mx.formatters.DateFormatter;\r
-       import mx.utils.Base64Encoder;\r
-       \r
-       /**\r
-        * Web Services Security Username Token\r
-        *\r
-        * Implementation based on algorithm description at \r
-        * http://www.oasis-open.org/committees/wss/documents/WSS-Username-02-0223-merged.pdf\r
-        */\r
-       public class WSSEUsernameToken\r
-       {\r
-               /**\r
-                * Generates a WSSE Username Token.\r
-                *\r
-                * @param username The username\r
-                * @param password The password\r
-                * @param nonce A cryptographically random nonce (if null, the nonce\r
-                * will be generated)\r
-                * @param timestamp The time at which the token is generated (if null,\r
-                * the time will be set to the moment of execution)\r
-                * @return The generated token\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function getUsernameToken(username:String, password:String, nonce:String=null, timestamp:Date=null):String\r
-               {\r
-                       if (nonce == null)\r
-                       {\r
-                               nonce = generateNonce();\r
-                       }\r
-                       nonce = base64Encode(nonce);\r
-               \r
-                       var created:String = generateTimestamp(timestamp);\r
-               \r
-                       var password64:String = getBase64Digest(nonce,\r
-                               created,\r
-                               password);\r
-               \r
-                       var token:String = new String("UsernameToken Username=\"");\r
-                       token += username + "\", " +\r
-                                        "PasswordDigest=\"" + password64 + "\", " +\r
-                                        "Nonce=\"" + nonce + "\", " +\r
-                                        "Created=\"" + created + "\"";\r
-                       return token;\r
-               }\r
-               \r
-               private static function generateNonce():String\r
-               {\r
-                       // Math.random returns a Number between 0 and 1.  We don't want our\r
-                       // nonce to contain invalid characters (e.g. the period) so we\r
-                       // strip them out before returning the result.\r
-                       var s:String =  Math.random().toString();\r
-                       return s.replace(".", "");\r
-               }\r
-               \r
-               internal static function base64Encode(s:String):String\r
-               {\r
-                       var encoder:Base64Encoder = new Base64Encoder();\r
-                       encoder.encode(s);\r
-                       return encoder.flush();\r
-               }\r
-               \r
-               internal static function generateTimestamp(timestamp:Date):String\r
-               {\r
-                       if (timestamp == null)\r
-                       {\r
-                               timestamp = new Date();\r
-                       }\r
-                       var dateFormatter:DateFormatter = new DateFormatter();\r
-                       dateFormatter.formatString = "YYYY-MM-DDTJJ:NN:SS"\r
-                       return dateFormatter.format(timestamp) + "Z";\r
-               }\r
-               \r
-               internal static function getBase64Digest(nonce:String, created:String, password:String):String\r
-               {\r
-                       return SHA1.hashToBase64(nonce + created + password);\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as b/platforma/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as
deleted file mode 100644 (file)
index fa16191..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.errors\r
-{\r
-       /**\r
-       * This class represents an Error that is thrown when a method is called when\r
-       * the receiving instance is in an invalid state.\r
-       *\r
-       * For example, this may occur if a method has been called, and other properties\r
-       * in the instance have not been initialized properly.\r
-       *\r
-       * @langversion ActionScript 3.0\r
-       * @playerversion Flash 9.0\r
-       * @tiptext\r
-       *\r
-       */\r
-       public class IllegalStateError extends Error\r
-       {\r
-               /**\r
-               *       Constructor\r
-               *\r
-               *       @param message A message describing the error in detail.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */\r
-               public function IllegalStateError(message:String)\r
-               {\r
-                       super(message);\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as b/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as
deleted file mode 100644 (file)
index a368ffb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Address
-       {
-               public var type:String;
-               public var street:String;
-               public var city:String;
-               public var state:String;
-               public var postalCode:String;
-               
-               public function toString():String
-               {
-                       return (street + " " + city + ", " + state + " " + postalCode);
-               }
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as b/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as
deleted file mode 100644 (file)
index 071c39e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Email
-       {
-               public var type:String;
-               public var address:String;
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as b/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as
deleted file mode 100644 (file)
index 27f98e4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Phone
-       {
-               public var type:String;
-               public var number:String;
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as b/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as
deleted file mode 100644 (file)
index d6bc283..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.fileformats.vcard
-{
-       import flash.utils.ByteArray;
-
-       public class VCard
-       {
-               public var fullName:String;
-               public var orgs:Array;
-               public var title:String;
-               public var image:ByteArray;
-               public var phones:Array;
-               public var emails:Array;
-               public var addresses:Array;
-               
-               public function VCard()
-               {
-                       orgs = new Array();
-                       phones = new Array();
-                       emails = new Array();
-                       addresses = new Array();
-               }
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as b/platforma/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as
deleted file mode 100644 (file)
index 45c954a..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.fileformats.vcard
-{
-       import mx.utils.Base64Decoder;
-       import mx.utils.StringUtil;
-       
-       public class VCardParser
-       {
-               public static function parse(vcardStr:String):Array
-               {
-                       var vcards:Array = new Array();
-                       var lines:Array = vcardStr.split(/\r\n/);
-                       var vcard:VCard;
-                       var type:String;
-                       var typeTmp:String;
-                       var line:String;
-
-                       for (var i:uint = 0; i < lines.length; ++i)
-                       {
-                               line = lines[i];
-                               if (line == "BEGIN:VCARD")
-                               {
-                                       vcard = new VCard();
-                               }
-                               else if (line == "END:VCARD")
-                               {
-                                       if (vcard != null)
-                                       {
-                                               vcards.push(vcard);
-                                       }
-                               }
-                               else if(line.search(/^ORG/i) != -1)
-                               {
-                                       var org:String = line.substring(4, line.length);
-                                       var orgArray:Array = org.split(";");
-                                       for each (var orgToken:String in orgArray)
-                                       {
-                                               if (StringUtil.trim(orgToken).length > 0)
-                                               {
-                                                       vcard.orgs.push(orgToken);
-                                               }
-                                       }
-                               }
-                               else if(line.search(/^TITLE/i) != -1)
-                               {
-                                       var title:String = line.substring(6, line.length);
-                                       vcard.title = title;
-                               }
-                               else if (line.search(/^FN:/i) != -1)
-                               {
-                                       var fullName:String = line.substring(3, line.length);
-                                       vcard.fullName = fullName;
-                               }
-                               else if (line.search(/^TEL/i) != -1)
-                               {
-                                       type = new String();
-                                       typeTmp = new String();
-                                       var phone:Phone = new Phone();
-                                       var number:String;
-                                       var phoneTokens:Array = line.split(";");
-                                       for each (var phoneToken:String in phoneTokens)
-                                       {
-                                               if (phoneToken.search(/^TYPE=/i) != -1)
-                                               {
-                                                       if (phoneToken.indexOf(":") != -1)
-                                                       {
-                                                               typeTmp = phoneToken.substring(5, phoneToken.indexOf(":"));
-                                                               number = phoneToken.substring(phoneToken.indexOf(":")+1, phoneToken.length);
-                                                       }
-                                                       else
-                                                       {                                                                       
-                                                               typeTmp = phoneToken.substring(5, phoneToken.length);
-                                                       }
-
-                                                       typeTmp = typeTmp.toLocaleLowerCase();
-
-                                                       if (typeTmp == "pref")
-                                                       {
-                                                               continue;
-                                                       }
-                                                       if (type.length != 0)
-                                                       {
-                                                               type += (" ");
-                                                       }
-                                                       type += typeTmp;
-                                               }
-                                       }
-                                       if (type.length > 0 && number != null)
-                                       {
-                                               phone.type = type;
-                                               phone.number = number;
-                                       }
-                                       vcard.phones.push(phone);
-                               }
-                               else if (line.search(/^EMAIL/i) != -1)
-                               {
-                                       type = new String();
-                                       typeTmp = new String();
-                                       var email:Email = new Email();
-                                       var emailAddress:String;
-                                       var emailTokens:Array = line.split(";");
-                                       for each (var emailToken:String in emailTokens)
-                                       {
-                                               if (emailToken.search(/^TYPE=/i) != -1)
-                                               {
-                                                       if (emailToken.indexOf(":") != -1)
-                                                       {
-                                                               typeTmp = emailToken.substring(5, emailToken.indexOf(":"));
-                                                               emailAddress = emailToken.substring(emailToken.indexOf(":")+1, emailToken.length);
-                                                       }
-                                                       else
-                                                       {                                                                       
-                                                               typeTmp = emailToken.substring(5, emailToken.length);
-                                                       }
-
-                                                       typeTmp = typeTmp.toLocaleLowerCase();
-
-                                                       if (typeTmp == "pref" || typeTmp == "internet")
-                                                       {
-                                                               continue;
-                                                       }
-                                                       if (type.length != 0)
-                                                       {
-                                                               type += (" ");
-                                                       }
-                                                       type += typeTmp;
-                                               }
-                                       }
-                                       if (type.length > 0 && emailAddress != null)
-                                       {
-                                               email.type = type;
-                                               email.address = emailAddress;
-                                       }
-                                       vcard.emails.push(email);
-                               }
-                               else if (line.indexOf("ADR;") != -1)
-                               {
-                                       var addressTokens:Array = line.split(";");
-                                       var address:Address = new Address();
-                                       for (var j:uint = 0; j < addressTokens.length; ++j)
-                                       {
-                                               var addressToken:String = addressTokens[j];
-                                               if (addressToken.search(/^home:+$/i) != -1) // For Outlook, which uses non-standard vCards.
-                                               {
-                                                       address.type = "home";
-                                               }
-                                               else if (addressToken.search(/^work:+$/i) != -1) // For Outlook, which uses non-standard vCards.
-                                               {
-                                                       address.type = "work";
-                                               }
-                                               if (addressToken.search(/^type=/i) != -1)  // The "type" parameter is the standard way (which Address Book uses)
-                                               {
-                                                       // First, remove the optional ":" character.
-                                                       addressToken = addressToken.replace(/:/,"");
-                                                       var addressType:String = addressToken.substring(5, addressToken.length).toLowerCase();
-                                                       if (addressType == "pref") // Not interested in which one is preferred.
-                                                       {
-                                                               continue;
-                                                       }
-                                                       else if (addressType.indexOf("home") != -1) // home
-                                                       {
-                                                               addressType = "home";
-                                                       }
-                                                       else if (addressType.indexOf("work") != -1) // work
-                                                       {
-                                                               addressType = "work";
-                                                       }
-                                                       else if (addressType.indexOf(",") != -1) // if the comma technique is used, just use the first one
-                                                       {
-                                                               var typeTokens:Array = addressType.split(",");
-                                                               for each (var typeToken:String in typeTokens)
-                                                               {
-                                                                       if (typeToken != "pref")
-                                                                       {
-                                                                               addressType = typeToken;
-                                                                               break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       address.type = addressType;
-                                               }
-                                               else if (addressToken.search(/^\d/) != -1 && address.street == null)
-                                               {
-                                                       address.street = addressToken.replace(/\\n/, "");
-                                                       address.city = addressTokens[j+1];
-                                                       address.state = addressTokens[j+2];
-                                                       address.postalCode = addressTokens[j+3];
-                                               }
-                                       }
-                                       if (address.type != null && address.street != null)
-                                       {
-                                               vcard.addresses.push(address);
-                                       }
-
-                               }
-                               else if (line.search(/^PHOTO;BASE64/i) != -1)
-                               {
-                                       var imageStr:String = new String();
-                                       for (var k:uint = i+1; k < lines.length; ++k)
-                                       {
-                                               imageStr += lines[k];
-                                               //if (lines[k].search(/.+\=$/) != -1) // Very slow in Mac due to RegEx bug
-                                               if (lines[k].indexOf('=') != -1)
-                                               {
-                                                       var decoder:Base64Decoder = new Base64Decoder();
-                                                       decoder.decode(imageStr);
-                                                       vcard.image = decoder.flush();
-                                                       break;
-                                               }
-                                       }
-                               }
-                       }
-                       return vcards;
-               }
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/images/BitString.as b/platforma/static/filebrowser/uploadify/com/adobe/images/BitString.as
deleted file mode 100644 (file)
index b5c2b84..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       public class BitString\r
-       {\r
-               public var len:int = 0;\r
-               public var val:int = 0;\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as b/platforma/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as
deleted file mode 100644 (file)
index 100d7e9..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       import flash.geom.*;\r
-       import flash.display.*;\r
-       import flash.utils.*;\r
-       \r
-       /**\r
-        * Class that converts BitmapData into a valid JPEG\r
-        */             \r
-       public class JPGEncoder\r
-       {\r
-\r
-               // Static table initialization\r
-       \r
-               private var ZigZag:Array = [\r
-                        0, 1, 5, 6,14,15,27,28,\r
-                        2, 4, 7,13,16,26,29,42,\r
-                        3, 8,12,17,25,30,41,43,\r
-                        9,11,18,24,31,40,44,53,\r
-                       10,19,23,32,39,45,52,54,\r
-                       20,22,33,38,46,51,55,60,\r
-                       21,34,37,47,50,56,59,61,\r
-                       35,36,48,49,57,58,62,63\r
-               ];\r
-       \r
-               private var YTable:Array = new Array(64);\r
-               private var UVTable:Array = new Array(64);\r
-               private var fdtbl_Y:Array = new Array(64);\r
-               private var fdtbl_UV:Array = new Array(64);\r
-       \r
-               private function initQuantTables(sf:int):void\r
-               {\r
-                       var i:int;\r
-                       var t:Number;\r
-                       var YQT:Array = [\r
-                               16, 11, 10, 16, 24, 40, 51, 61,\r
-                               12, 12, 14, 19, 26, 58, 60, 55,\r
-                               14, 13, 16, 24, 40, 57, 69, 56,\r
-                               14, 17, 22, 29, 51, 87, 80, 62,\r
-                               18, 22, 37, 56, 68,109,103, 77,\r
-                               24, 35, 55, 64, 81,104,113, 92,\r
-                               49, 64, 78, 87,103,121,120,101,\r
-                               72, 92, 95, 98,112,100,103, 99\r
-                       ];\r
-                       for (i = 0; i < 64; i++) {\r
-                               t = Math.floor((YQT[i]*sf+50)/100);\r
-                               if (t < 1) {\r
-                                       t = 1;\r
-                               } else if (t > 255) {\r
-                                       t = 255;\r
-                               }\r
-                               YTable[ZigZag[i]] = t;\r
-                       }\r
-                       var UVQT:Array = [\r
-                               17, 18, 24, 47, 99, 99, 99, 99,\r
-                               18, 21, 26, 66, 99, 99, 99, 99,\r
-                               24, 26, 56, 99, 99, 99, 99, 99,\r
-                               47, 66, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99\r
-                       ];\r
-                       for (i = 0; i < 64; i++) {\r
-                               t = Math.floor((UVQT[i]*sf+50)/100);\r
-                               if (t < 1) {\r
-                                       t = 1;\r
-                               } else if (t > 255) {\r
-                                       t = 255;\r
-                               }\r
-                               UVTable[ZigZag[i]] = t;\r
-                       }\r
-                       var aasf:Array = [\r
-                               1.0, 1.387039845, 1.306562965, 1.175875602,\r
-                               1.0, 0.785694958, 0.541196100, 0.275899379\r
-                       ];\r
-                       i = 0;\r
-                       for (var row:int = 0; row < 8; row++)\r
-                       {\r
-                               for (var col:int = 0; col < 8; col++)\r
-                               {\r
-                                       fdtbl_Y[i]  = (1.0 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
-                                       fdtbl_UV[i] = (1.0 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
-                                       i++;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               private var YDC_HT:Array;\r
-               private var UVDC_HT:Array;\r
-               private var YAC_HT:Array;\r
-               private var UVAC_HT:Array;\r
-       \r
-               private function computeHuffmanTbl(nrcodes:Array, std_table:Array):Array\r
-               {\r
-                       var codevalue:int = 0;\r
-                       var pos_in_table:int = 0;\r
-                       var HT:Array = new Array();\r
-                       for (var k:int=1; k<=16; k++) {\r
-                               for (var j:int=1; j<=nrcodes[k]; j++) {\r
-                                       HT[std_table[pos_in_table]] = new BitString();\r
-                                       HT[std_table[pos_in_table]].val = codevalue;\r
-                                       HT[std_table[pos_in_table]].len = k;\r
-                                       pos_in_table++;\r
-                                       codevalue++;\r
-                               }\r
-                               codevalue*=2;\r
-                       }\r
-                       return HT;\r
-               }\r
-       \r
-               private var std_dc_luminance_nrcodes:Array = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\r
-               private var std_dc_luminance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
-               private var std_ac_luminance_nrcodes:Array = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\r
-               private var std_ac_luminance_values:Array = [\r
-                       0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\r
-                       0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\r
-                       0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\r
-                       0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\r
-                       0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\r
-                       0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\r
-                       0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\r
-                       0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\r
-                       0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\r
-                       0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\r
-                       0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\r
-                       0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\r
-                       0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\r
-                       0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\r
-                       0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\r
-                       0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\r
-                       0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\r
-                       0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\r
-                       0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\r
-                       0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
-                       0xf9,0xfa\r
-               ];\r
-       \r
-               private var std_dc_chrominance_nrcodes:Array = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\r
-               private var std_dc_chrominance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
-               private var std_ac_chrominance_nrcodes:Array = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\r
-               private var std_ac_chrominance_values:Array = [\r
-                       0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\r
-                       0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\r
-                       0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\r
-                       0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\r
-                       0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\r
-                       0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\r
-                       0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\r
-                       0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\r
-                       0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\r
-                       0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\r
-                       0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\r
-                       0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\r
-                       0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\r
-                       0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\r
-                       0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\r
-                       0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\r
-                       0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\r
-                       0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\r
-                       0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\r
-                       0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
-                       0xf9,0xfa\r
-               ];\r
-       \r
-               private function initHuffmanTbl():void\r
-               {\r
-                       YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\r
-                       UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\r
-                       YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\r
-                       UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\r
-               }\r
-       \r
-               private var bitcode:Array = new Array(65535);\r
-               private var category:Array = new Array(65535);\r
-       \r
-               private function initCategoryNumber():void\r
-               {\r
-                       var nrlower:int = 1;\r
-                       var nrupper:int = 2;\r
-                       var nr:int;\r
-                       for (var cat:int=1; cat<=15; cat++) {\r
-                               //Positive numbers\r
-                               for (nr=nrlower; nr<nrupper; nr++) {\r
-                                       category[32767+nr] = cat;\r
-                                       bitcode[32767+nr] = new BitString();\r
-                                       bitcode[32767+nr].len = cat;\r
-                                       bitcode[32767+nr].val = nr;\r
-                               }\r
-                               //Negative numbers\r
-                               for (nr=-(nrupper-1); nr<=-nrlower; nr++) {\r
-                                       category[32767+nr] = cat;\r
-                                       bitcode[32767+nr] = new BitString();\r
-                                       bitcode[32767+nr].len = cat;\r
-                                       bitcode[32767+nr].val = nrupper-1+nr;\r
-                               }\r
-                               nrlower <<= 1;\r
-                               nrupper <<= 1;\r
-                       }\r
-               }\r
-       \r
-               // IO functions\r
-       \r
-               private var byteout:ByteArray;\r
-               private var bytenew:int = 0;\r
-               private var bytepos:int = 7;\r
-       \r
-               private function writeBits(bs:BitString):void\r
-               {\r
-                       var value:int = bs.val;\r
-                       var posval:int = bs.len-1;\r
-                       while ( posval >= 0 ) {\r
-                               if (value & uint(1 << posval) ) {\r
-                                       bytenew |= uint(1 << bytepos);\r
-                               }\r
-                               posval--;\r
-                               bytepos--;\r
-                               if (bytepos < 0) {\r
-                                       if (bytenew == 0xFF) {\r
-                                               writeByte(0xFF);\r
-                                               writeByte(0);\r
-                                       }\r
-                                       else {\r
-                                               writeByte(bytenew);\r
-                                       }\r
-                                       bytepos=7;\r
-                                       bytenew=0;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               private function writeByte(value:int):void\r
-               {\r
-                       byteout.writeByte(value);\r
-               }\r
-       \r
-               private function writeWord(value:int):void\r
-               {\r
-                       writeByte((value>>8)&0xFF);\r
-                       writeByte((value   )&0xFF);\r
-               }\r
-       \r
-               // DCT & quantization core\r
-       \r
-               private function fDCTQuant(data:Array, fdtbl:Array):Array\r
-               {\r
-                       var tmp0:Number, tmp1:Number, tmp2:Number, tmp3:Number, tmp4:Number, tmp5:Number, tmp6:Number, tmp7:Number;\r
-                       var tmp10:Number, tmp11:Number, tmp12:Number, tmp13:Number;\r
-                       var z1:Number, z2:Number, z3:Number, z4:Number, z5:Number, z11:Number, z13:Number;\r
-                       var i:int;\r
-                       /* Pass 1: process rows. */\r
-                       var dataOff:int=0;\r
-                       for (i=0; i<8; i++) {\r
-                               tmp0 = data[dataOff+0] + data[dataOff+7];\r
-                               tmp7 = data[dataOff+0] - data[dataOff+7];\r
-                               tmp1 = data[dataOff+1] + data[dataOff+6];\r
-                               tmp6 = data[dataOff+1] - data[dataOff+6];\r
-                               tmp2 = data[dataOff+2] + data[dataOff+5];\r
-                               tmp5 = data[dataOff+2] - data[dataOff+5];\r
-                               tmp3 = data[dataOff+3] + data[dataOff+4];\r
-                               tmp4 = data[dataOff+3] - data[dataOff+4];\r
-       \r
-                               /* Even part */\r
-                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
-                               tmp13 = tmp0 - tmp3;\r
-                               tmp11 = tmp1 + tmp2;\r
-                               tmp12 = tmp1 - tmp2;\r
-       \r
-                               data[dataOff+0] = tmp10 + tmp11; /* phase 3 */\r
-                               data[dataOff+4] = tmp10 - tmp11;\r
-       \r
-                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
-                               data[dataOff+2] = tmp13 + z1; /* phase 5 */\r
-                               data[dataOff+6] = tmp13 - z1;\r
-       \r
-                               /* Odd part */\r
-                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
-                               tmp11 = tmp5 + tmp6;\r
-                               tmp12 = tmp6 + tmp7;\r
-       \r
-                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
-                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
-                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
-                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
-                               z3 = tmp11 * 0.707106781; /* c4 */\r
-       \r
-                               z11 = tmp7 + z3;        /* phase 5 */\r
-                               z13 = tmp7 - z3;\r
-       \r
-                               data[dataOff+5] = z13 + z2;     /* phase 6 */\r
-                               data[dataOff+3] = z13 - z2;\r
-                               data[dataOff+1] = z11 + z4;\r
-                               data[dataOff+7] = z11 - z4;\r
-       \r
-                               dataOff += 8; /* advance pointer to next row */\r
-                       }\r
-       \r
-                       /* Pass 2: process columns. */\r
-                       dataOff = 0;\r
-                       for (i=0; i<8; i++) {\r
-                               tmp0 = data[dataOff+ 0] + data[dataOff+56];\r
-                               tmp7 = data[dataOff+ 0] - data[dataOff+56];\r
-                               tmp1 = data[dataOff+ 8] + data[dataOff+48];\r
-                               tmp6 = data[dataOff+ 8] - data[dataOff+48];\r
-                               tmp2 = data[dataOff+16] + data[dataOff+40];\r
-                               tmp5 = data[dataOff+16] - data[dataOff+40];\r
-                               tmp3 = data[dataOff+24] + data[dataOff+32];\r
-                               tmp4 = data[dataOff+24] - data[dataOff+32];\r
-       \r
-                               /* Even part */\r
-                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
-                               tmp13 = tmp0 - tmp3;\r
-                               tmp11 = tmp1 + tmp2;\r
-                               tmp12 = tmp1 - tmp2;\r
-       \r
-                               data[dataOff+ 0] = tmp10 + tmp11; /* phase 3 */\r
-                               data[dataOff+32] = tmp10 - tmp11;\r
-       \r
-                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
-                               data[dataOff+16] = tmp13 + z1; /* phase 5 */\r
-                               data[dataOff+48] = tmp13 - z1;\r
-       \r
-                               /* Odd part */\r
-                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
-                               tmp11 = tmp5 + tmp6;\r
-                               tmp12 = tmp6 + tmp7;\r
-       \r
-                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
-                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
-                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
-                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
-                               z3 = tmp11 * 0.707106781; /* c4 */\r
-       \r
-                               z11 = tmp7 + z3;        /* phase 5 */\r
-                               z13 = tmp7 - z3;\r
-       \r
-                               data[dataOff+40] = z13 + z2; /* phase 6 */\r
-                               data[dataOff+24] = z13 - z2;\r
-                               data[dataOff+ 8] = z11 + z4;\r
-                               data[dataOff+56] = z11 - z4;\r
-       \r
-                               dataOff++; /* advance pointer to next column */\r
-                       }\r
-       \r
-                       // Quantize/descale the coefficients\r
-                       for (i=0; i<64; i++) {\r
-                               // Apply the quantization and scaling factor & Round to nearest integer\r
-                               data[i] = Math.round((data[i]*fdtbl[i]));\r
-                       }\r
-                       return data;\r
-               }\r
-       \r
-               // Chunk writing\r
-       \r
-               private function writeAPP0():void\r
-               {\r
-                       writeWord(0xFFE0); // marker\r
-                       writeWord(16); // length\r
-                       writeByte(0x4A); // J\r
-                       writeByte(0x46); // F\r
-                       writeByte(0x49); // I\r
-                       writeByte(0x46); // F\r
-                       writeByte(0); // = "JFIF",'\0'\r
-                       writeByte(1); // versionhi\r
-                       writeByte(1); // versionlo\r
-                       writeByte(0); // xyunits\r
-                       writeWord(1); // xdensity\r
-                       writeWord(1); // ydensity\r
-                       writeByte(0); // thumbnwidth\r
-                       writeByte(0); // thumbnheight\r
-               }\r
-       \r
-               private function writeSOF0(width:int, height:int):void\r
-               {\r
-                       writeWord(0xFFC0); // marker\r
-                       writeWord(17);   // length, truecolor YUV JPG\r
-                       writeByte(8);    // precision\r
-                       writeWord(height);\r
-                       writeWord(width);\r
-                       writeByte(3);    // nrofcomponents\r
-                       writeByte(1);    // IdY\r
-                       writeByte(0x11); // HVY\r
-                       writeByte(0);    // QTY\r
-                       writeByte(2);    // IdU\r
-                       writeByte(0x11); // HVU\r
-                       writeByte(1);    // QTU\r
-                       writeByte(3);    // IdV\r
-                       writeByte(0x11); // HVV\r
-                       writeByte(1);    // QTV\r
-               }\r
-       \r
-               private function writeDQT():void\r
-               {\r
-                       writeWord(0xFFDB); // marker\r
-                       writeWord(132);    // length\r
-                       writeByte(0);\r
-                       var i:int;\r
-                       for (i=0; i<64; i++) {\r
-                               writeByte(YTable[i]);\r
-                       }\r
-                       writeByte(1);\r
-                       for (i=0; i<64; i++) {\r
-                               writeByte(UVTable[i]);\r
-                       }\r
-               }\r
-       \r
-               private function writeDHT():void\r
-               {\r
-                       writeWord(0xFFC4); // marker\r
-                       writeWord(0x01A2); // length\r
-                       var i:int;\r
-       \r
-                       writeByte(0); // HTYDCinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_dc_luminance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=11; i++) {\r
-                               writeByte(std_dc_luminance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(0x10); // HTYACinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_ac_luminance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=161; i++) {\r
-                               writeByte(std_ac_luminance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(1); // HTUDCinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_dc_chrominance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=11; i++) {\r
-                               writeByte(std_dc_chrominance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(0x11); // HTUACinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_ac_chrominance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=161; i++) {\r
-                               writeByte(std_ac_chrominance_values[i]);\r
-                       }\r
-               }\r
-       \r
-               private function writeSOS():void\r
-               {\r
-                       writeWord(0xFFDA); // marker\r
-                       writeWord(12); // length\r
-                       writeByte(3); // nrofcomponents\r
-                       writeByte(1); // IdY\r
-                       writeByte(0); // HTY\r
-                       writeByte(2); // IdU\r
-                       writeByte(0x11); // HTU\r
-                       writeByte(3); // IdV\r
-                       writeByte(0x11); // HTV\r
-                       writeByte(0); // Ss\r
-                       writeByte(0x3f); // Se\r
-                       writeByte(0); // Bf\r
-               }\r
-       \r
-               // Core processing\r
-               private var DU:Array = new Array(64);\r
-       \r
-               private function processDU(CDU:Array, fdtbl:Array, DC:Number, HTDC:Array, HTAC:Array):Number\r
-               {\r
-                       var EOB:BitString = HTAC[0x00];\r
-                       var M16zeroes:BitString = HTAC[0xF0];\r
-                       var i:int;\r
-       \r
-                       var DU_DCT:Array = fDCTQuant(CDU, fdtbl);\r
-                       //ZigZag reorder\r
-                       for (i=0;i<64;i++) {\r
-                               DU[ZigZag[i]]=DU_DCT[i];\r
-                       }\r
-                       var Diff:int = DU[0] - DC; DC = DU[0];\r
-                       //Encode DC\r
-                       if (Diff==0) {\r
-                               writeBits(HTDC[0]); // Diff might be 0\r
-                       } else {\r
-                               writeBits(HTDC[category[32767+Diff]]);\r
-                               writeBits(bitcode[32767+Diff]);\r
-                       }\r
-                       //Encode ACs\r
-                       var end0pos:int = 63;\r
-                       for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {\r
-                       };\r
-                       //end0pos = first element in reverse order !=0\r
-                       if ( end0pos == 0) {\r
-                               writeBits(EOB);\r
-                               return DC;\r
-                       }\r
-                       i = 1;\r
-                       while ( i <= end0pos ) {\r
-                               var startpos:int = i;\r
-                               for (; (DU[i]==0) && (i<=end0pos); i++) {\r
-                               }\r
-                               var nrzeroes:int = i-startpos;\r
-                               if ( nrzeroes >= 16 ) {\r
-                                       for (var nrmarker:int=1; nrmarker <= nrzeroes/16; nrmarker++) {\r
-                                               writeBits(M16zeroes);\r
-                                       }\r
-                                       nrzeroes = int(nrzeroes&0xF);\r
-                               }\r
-                               writeBits(HTAC[nrzeroes*16+category[32767+DU[i]]]);\r
-                               writeBits(bitcode[32767+DU[i]]);\r
-                               i++;\r
-                       }\r
-                       if ( end0pos != 63 ) {\r
-                               writeBits(EOB);\r
-                       }\r
-                       return DC;\r
-               }\r
-       \r
-               private var YDU:Array = new Array(64);\r
-               private var UDU:Array = new Array(64);\r
-               private var VDU:Array = new Array(64);\r
-       \r
-               private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void\r
-               {\r
-                       var pos:int=0;\r
-                       for (var y:int=0; y<8; y++) {\r
-                               for (var x:int=0; x<8; x++) {\r
-                                       var P:uint = img.getPixel32(xpos+x,ypos+y);\r
-                                       var R:Number = Number((P>>16)&0xFF);\r
-                                       var G:Number = Number((P>> 8)&0xFF);\r
-                                       var B:Number = Number((P    )&0xFF);\r
-                                       YDU[pos]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-128;\r
-                                       UDU[pos]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));\r
-                                       VDU[pos]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));\r
-                                       pos++;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               /**\r
-                * Constructor for JPEGEncoder class\r
-                *\r
-                * @param quality The quality level between 1 and 100 that detrmines the\r
-                * level of compression used in the generated JPEG\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */             \r
-               public function JPGEncoder(quality:Number = 50)\r
-               {\r
-                       if (quality <= 0) {\r
-                               quality = 1;\r
-                       }\r
-                       if (quality > 100) {\r
-                               quality = 100;\r
-                       }\r
-                       var sf:int = 0;\r
-                       if (quality < 50) {\r
-                               sf = int(5000 / quality);\r
-                       } else {\r
-                               sf = int(200 - quality*2);\r
-                       }\r
-                       // Create tables\r
-                       initHuffmanTbl();\r
-                       initCategoryNumber();\r
-                       initQuantTables(sf);\r
-               }\r
-       \r
-               /**\r
-                * Created a JPEG image from the specified BitmapData\r
-                *\r
-                * @param image The BitmapData that will be converted into the JPEG format.\r
-                * @return a ByteArray representing the JPEG encoded image data.\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */     \r
-               public function encode(image:BitmapData):ByteArray\r
-               {\r
-                       // Initialize bit writer\r
-                       byteout = new ByteArray();\r
-                       bytenew=0;\r
-                       bytepos=7;\r
-       \r
-                       // Add JPEG headers\r
-                       writeWord(0xFFD8); // SOI\r
-                       writeAPP0();\r
-                       writeDQT();\r
-                       writeSOF0(image.width,image.height);\r
-                       writeDHT();\r
-                       writeSOS();\r
-\r
-       \r
-                       // Encode 8x8 macroblocks\r
-                       var DCY:Number=0;\r
-                       var DCU:Number=0;\r
-                       var DCV:Number=0;\r
-                       bytenew=0;\r
-                       bytepos=7;\r
-                       for (var ypos:int=0; ypos<image.height; ypos+=8) {\r
-                               for (var xpos:int=0; xpos<image.width; xpos+=8) {\r
-                                       RGB2YUV(image, xpos, ypos);\r
-                                       DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\r
-                                       DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\r
-                                       DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\r
-                               }\r
-                       }\r
-       \r
-                       // Do the bit alignment of the EOI marker\r
-                       if ( bytepos >= 0 ) {\r
-                               var fillbits:BitString = new BitString();\r
-                               fillbits.len = bytepos+1;\r
-                               fillbits.val = (1<<(bytepos+1))-1;\r
-                               writeBits(fillbits);\r
-                       }\r
-       \r
-                       writeWord(0xFFD9); //EOI\r
-                       return byteout;\r
-               }\r
-       }\r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as b/platforma/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as
deleted file mode 100644 (file)
index 83c95f6..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       import flash.geom.*;\r
-       import flash.display.Bitmap;\r
-       import flash.display.BitmapData;\r
-       import flash.utils.ByteArray;\r
-\r
-       /**\r
-        * Class that converts BitmapData into a valid PNG\r
-        */     \r
-       public class PNGEncoder\r
-       {\r
-               /**\r
-                * Created a PNG image from the specified BitmapData\r
-                *\r
-                * @param image The BitmapData that will be converted into the PNG format.\r
-                * @return a ByteArray representing the PNG encoded image data.\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */                     \r
-           public static function encode(img:BitmapData):ByteArray {\r
-               // Create output byte array\r
-               var png:ByteArray = new ByteArray();\r
-               // Write PNG signature\r
-               png.writeUnsignedInt(0x89504e47);\r
-               png.writeUnsignedInt(0x0D0A1A0A);\r
-               // Build IHDR chunk\r
-               var IHDR:ByteArray = new ByteArray();\r
-               IHDR.writeInt(img.width);\r
-               IHDR.writeInt(img.height);\r
-               IHDR.writeUnsignedInt(0x08060000); // 32bit RGBA\r
-               IHDR.writeByte(0);\r
-               writeChunk(png,0x49484452,IHDR);\r
-               // Build IDAT chunk\r
-               var IDAT:ByteArray= new ByteArray();\r
-               for(var i:int=0;i < img.height;i++) {\r
-                   // no filter\r
-                   IDAT.writeByte(0);\r
-                   var p:uint;\r
-                   var j:int;\r
-                   if ( !img.transparent ) {\r
-                       for(j=0;j < img.width;j++) {\r
-                           p = img.getPixel(j,i);\r
-                           IDAT.writeUnsignedInt(\r
-                               uint(((p&0xFFFFFF) << 8)|0xFF));\r
-                       }\r
-                   } else {\r
-                       for(j=0;j < img.width;j++) {\r
-                           p = img.getPixel32(j,i);\r
-                           IDAT.writeUnsignedInt(\r
-                               uint(((p&0xFFFFFF) << 8)|\r
-                               (p>>>24)));\r
-                       }\r
-                   }\r
-               }\r
-               IDAT.compress();\r
-               writeChunk(png,0x49444154,IDAT);\r
-               // Build IEND chunk\r
-               writeChunk(png,0x49454E44,null);\r
-               // return PNG\r
-               return png;\r
-           }\r
-       \r
-           private static var crcTable:Array;\r
-           private static var crcTableComputed:Boolean = false;\r
-       \r
-           private static function writeChunk(png:ByteArray, \r
-                   type:uint, data:ByteArray):void {\r
-               if (!crcTableComputed) {\r
-                   crcTableComputed = true;\r
-                   crcTable = [];\r
-                   var c:uint;\r
-                   for (var n:uint = 0; n < 256; n++) {\r
-                       c = n;\r
-                       for (var k:uint = 0; k < 8; k++) {\r
-                           if (c & 1) {\r
-                               c = uint(uint(0xedb88320) ^ \r
-                                   uint(c >>> 1));\r
-                           } else {\r
-                               c = uint(c >>> 1);\r
-                           }\r
-                       }\r
-                       crcTable[n] = c;\r
-                   }\r
-               }\r
-               var len:uint = 0;\r
-               if (data != null) {\r
-                   len = data.length;\r
-               }\r
-               png.writeUnsignedInt(len);\r
-               var p:uint = png.position;\r
-               png.writeUnsignedInt(type);\r
-               if ( data != null ) {\r
-                   png.writeBytes(data);\r
-               }\r
-               var e:uint = png.position;\r
-               png.position = p;\r
-               c = 0xffffffff;\r
-               for (var i:int = 0; i < (e-p); i++) {\r
-                   c = uint(crcTable[\r
-                       (c ^ png.readUnsignedByte()) & \r
-                       uint(0xff)] ^ uint(c >>> 8));\r
-               }\r
-               c = uint(c^uint(0xffffffff));\r
-               png.position = e;\r
-               png.writeUnsignedInt(c);\r
-           }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as b/platforma/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as
deleted file mode 100644 (file)
index 2a9eea1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       import flash.net.URLLoader;\r
-\r
-       /**\r
-       *       Class that provides a dynamic implimentation of the URLLoader class.\r
-       * \r
-       *       This class provides no API implimentations. However, since the class is\r
-       *       declared as dynamic, it can be used in place of URLLoader, and allow\r
-       *       you to dynamically attach properties to it (which URLLoader does not allow).\r
-       * \r
-       *       @langversion ActionScript 3.0\r
-       *       @playerversion Flash 9.0\r
-       *       @tiptext\r
-       */      \r
-       public dynamic class DynamicURLLoader extends URLLoader \r
-       {\r
-               public function DynamicURLLoader()\r
-               {\r
-                       super();\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as b/platforma/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as
deleted file mode 100644 (file)
index 3610cc2..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       /**\r
-        * The URI class cannot know about DNS aliases, virtual hosts, or\r
-        * symbolic links that may be involved.  The application can provide\r
-        * an implementation of this interface to resolve the URI before the\r
-        * URI class makes any comparisons.  For example, a web host has\r
-        * two aliases:\r
-        * \r
-        * <p><code>\r
-        *    http://www.site.com/\r
-        *    http://www.site.net/\r
-        * </code></p>\r
-        * \r
-        * <p>The application can provide an implementation that automatically\r
-        * resolves site.net to site.com before URI compares two URI objects.\r
-        * Only the application can know and understand the context in which\r
-        * the URI's are being used.</p>\r
-        * \r
-        * <p>Use the URI.resolver accessor to assign a custom resolver to\r
-        * the URI class.  Any resolver specified is global to all instances\r
-        * of URI.</p>\r
-        * \r
-        * <p>URI will call this before performing URI comparisons in the\r
-        * URI.getRelation() and URI.getCommonParent() functions.\r
-        * \r
-        * @see URI.getRelation\r
-        * @see URI.getCommonParent\r
-        * \r
-        * @langversion ActionScript 3.0\r
-        * @playerversion Flash 9.0\r
-        */\r
-       public interface IURIResolver\r
-       {\r
-               /**\r
-                * Implement this method to provide custom URI resolution for\r
-                * your application.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */\r
-               function resolve(uri:URI) : URI;\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as b/platforma/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as
deleted file mode 100644 (file)
index 32e40a4..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-package com.adobe.net
-{
-       public class MimeTypeMap
-       {
-               private var types:Array = 
-                       [["application/andrew-inset","ez"],
-                       ["application/atom+xml","atom"],
-                       ["application/mac-binhex40","hqx"],
-                       ["application/mac-compactpro","cpt"],
-                       ["application/mathml+xml","mathml"],
-                       ["application/msword","doc"],
-                       ["application/octet-stream","bin","dms","lha","lzh","exe","class","so","dll","dmg"],
-                       ["application/oda","oda"],
-                       ["application/ogg","ogg"],
-                       ["application/pdf","pdf"],
-                       ["application/postscript","ai","eps","ps"],
-                       ["application/rdf+xml","rdf"],
-                       ["application/smil","smi","smil"],
-                       ["application/srgs","gram"],
-                       ["application/srgs+xml","grxml"],
-                       ["application/vnd.adobe.apollo-application-installer-package+zip","air"],
-                       ["application/vnd.mif","mif"],
-                       ["application/vnd.mozilla.xul+xml","xul"],
-                       ["application/vnd.ms-excel","xls"],
-                       ["application/vnd.ms-powerpoint","ppt"],
-                       ["application/vnd.rn-realmedia","rm"],
-                       ["application/vnd.wap.wbxml","wbxml"],
-                       ["application/vnd.wap.wmlc","wmlc"],
-                       ["application/vnd.wap.wmlscriptc","wmlsc"],
-                       ["application/voicexml+xml","vxml"],
-                       ["application/x-bcpio","bcpio"],
-                       ["application/x-cdlink","vcd"],
-                       ["application/x-chess-pgn","pgn"],
-                       ["application/x-cpio","cpio"],
-                       ["application/x-csh","csh"],
-                       ["application/x-director","dcr","dir","dxr"],
-                       ["application/x-dvi","dvi"],
-                       ["application/x-futuresplash","spl"],
-                       ["application/x-gtar","gtar"],
-                       ["application/x-hdf","hdf"],
-                       ["application/x-javascript","js"],
-                       ["application/x-koan","skp","skd","skt","skm"],
-                       ["application/x-latex","latex"],
-                       ["application/x-netcdf","nc","cdf"],
-                       ["application/x-sh","sh"],
-                       ["application/x-shar","shar"],
-                       ["application/x-shockwave-flash","swf"],
-                       ["application/x-stuffit","sit"],
-                       ["application/x-sv4cpio","sv4cpio"],
-                       ["application/x-sv4crc","sv4crc"],
-                       ["application/x-tar","tar"],
-                       ["application/x-tcl","tcl"],
-                       ["application/x-tex","tex"],
-                       ["application/x-texinfo","texinfo","texi"],
-                       ["application/x-troff","t","tr","roff"],
-                       ["application/x-troff-man","man"],
-                       ["application/x-troff-me","me"],
-                       ["application/x-troff-ms","ms"],
-                       ["application/x-ustar","ustar"],
-                       ["application/x-wais-source","src"],
-                       ["application/xhtml+xml","xhtml","xht"],
-                       ["application/xml","xml","xsl"],
-                       ["application/xml-dtd","dtd"],
-                       ["application/xslt+xml","xslt"],
-                       ["application/zip","zip"],
-                       ["audio/basic","au","snd"],
-                       ["audio/midi","mid","midi","kar"],
-                       ["audio/mpeg","mp3","mpga","mp2"],
-                       ["audio/x-aiff","aif","aiff","aifc"],
-                       ["audio/x-mpegurl","m3u"],
-                       ["audio/x-pn-realaudio","ram","ra"],
-                       ["audio/x-wav","wav"],
-                       ["chemical/x-pdb","pdb"],
-                       ["chemical/x-xyz","xyz"],
-                       ["image/bmp","bmp"],
-                       ["image/cgm","cgm"],
-                       ["image/gif","gif"],
-                       ["image/ief","ief"],
-                       ["image/jpeg","jpg","jpeg","jpe"],
-                       ["image/png","png"],
-                       ["image/svg+xml","svg"],
-                       ["image/tiff","tiff","tif"],
-                       ["image/vnd.djvu","djvu","djv"],
-                       ["image/vnd.wap.wbmp","wbmp"],
-                       ["image/x-cmu-raster","ras"],
-                       ["image/x-icon","ico"],
-                       ["image/x-portable-anymap","pnm"],
-                       ["image/x-portable-bitmap","pbm"],
-                       ["image/x-portable-graymap","pgm"],
-                       ["image/x-portable-pixmap","ppm"],
-                       ["image/x-rgb","rgb"],
-                       ["image/x-xbitmap","xbm"],
-                       ["image/x-xpixmap","xpm"],
-                       ["image/x-xwindowdump","xwd"],
-                       ["model/iges","igs","iges"],
-                       ["model/mesh","msh","mesh","silo"],
-                       ["model/vrml","wrl","vrml"],
-                       ["text/calendar","ics","ifb"],
-                       ["text/css","css"],
-                       ["text/html","html","htm"],
-                       ["text/plain","txt","asc"],
-                       ["text/richtext","rtx"],
-                       ["text/rtf","rtf"],
-                       ["text/sgml","sgml","sgm"],
-                       ["text/tab-separated-values","tsv"],
-                       ["text/vnd.wap.wml","wml"],
-                       ["text/vnd.wap.wmlscript","wmls"],
-                       ["text/x-setext","etx"],
-                       ["video/mpeg","mpg","mpeg","mpe"],
-                       ["video/quicktime","mov","qt"],
-                       ["video/vnd.mpegurl","m4u","mxu"],
-                       ["video/x-flv","flv"],
-                       ["video/x-msvideo","avi"],
-                       ["video/x-sgi-movie","movie"],
-                       ["x-conference/x-cooltalk","ice"]];
-               
-               /**
-                * Returns the mimetype for the given extension.
-                */
-               public function getMimeType(extension:String):String
-               {
-                       extension = extension.toLocaleLowerCase();
-                       for each (var a:Array in types)
-                       {
-                               for each (var b:String in a)
-                               {
-                                       if (b == extension)
-                                       {
-                                               return a[0];
-                                       }
-                               }
-                       }
-                       return null;
-               }
-
-               /**
-                * Returns the prefered extension for the given mimetype.
-                */
-               public function getExtension(mimetype:String):String
-               {
-                       mimetype = mimetype.toLocaleLowerCase();
-                       for each (var a:Array in types)
-                       {
-                               if (a[0] == mimetype)
-                               {
-                                       return a[1];
-                               }
-                       }
-                       return null;
-               }
-
-               /**
-                * Adds a mimetype to the map. The order of the extensions matters. The most preferred should come first.
-                */
-               public function addMimeType(mimetype:String, extensions:Array):void
-               {
-                       var newType:Array = [mimetype];
-                       for each (var a:String in extensions)
-                       {
-                               newType.push(a);
-                       }
-                       types.push(newType);
-               }
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/URI.as b/platforma/static/filebrowser/uploadify/com/adobe/net/URI.as
deleted file mode 100644 (file)
index d43ce9f..0000000
+++ /dev/null
@@ -1,2466 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       import flash.utils.ByteArray;\r
-       \r
-       /**\r
-        * This class implements functions and utilities for working with URI's\r
-        * (Universal Resource Identifiers).  For technical description of the\r
-        * URI syntax, please see RFC 3986 at http://www.ietf.org/rfc/rfc3986.txt\r
-        * or do a web search for "rfc 3986".\r
-        * \r
-        * <p>The most important aspect of URI's to understand is that URI's\r
-        * and URL's are not strings.  URI's are complex data structures that\r
-        * encapsulate many pieces of information.  The string version of a\r
-        * URI is the serialized representation of that data structure.  This\r
-        * string serialization is used to provide a human readable\r
-        * representation and a means to transport the data over the network\r
-        * where it can then be parsed back into its' component parts.</p>\r
-        * \r
-        * <p>URI's fall into one of three categories:\r
-        * <ul>\r
-        *  <li>&lt;scheme&gt;:&lt;scheme-specific-part&gt;#&lt;fragment&gt;            (non-hierarchical)</li>\r
-        *  <li>&lt;scheme&gt;:<authority&gt;&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;        (hierarchical)</li>\r
-        *  <li>&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;                                             (relative hierarchical)</li>\r
-        * </ul></p>\r
-        * \r
-        * <p>The query and fragment parts are optional.</p>\r
-        * \r
-        * <p>This class supports both non-hierarchical and hierarchical URI's</p>\r
-        * \r
-        * <p>This class is intended to be used "as-is" for the vast majority\r
-        * of common URI's.  However, if your application requires a custom\r
-        * URI syntax (e.g. custom query syntax or special handling of\r
-        * non-hierarchical URI's), this class can be fully subclassed.  If you\r
-        * intended to subclass URI, please see the source code for complete\r
-        * documation on protected members and protected fuctions.</p>\r
-        * \r
-        * @langversion ActionScript 3.0\r
-        * @playerversion Flash 9.0 \r
-        */\r
-       public class URI\r
-       {       \r
-               // Here we define which characters must be escaped for each\r
-               // URI part.  The characters that must be escaped for each\r
-               // part differ depending on what would cause ambiguous parsing.\r
-               // RFC 3986 sec. 2.4 states that characters should only be\r
-               // encoded when they would conflict with subcomponent delimiters.\r
-               // We don't want to over-do the escaping.  We only want to escape\r
-               // the minimum needed to prevent parsing problems.\r
-               \r
-               // space and % must be escaped in all cases.  '%' is the delimiter\r
-               // for escaped characters.\r
-               public static const URImustEscape:String =      " %";\r
-               \r
-               // Baseline of what characters must be escaped\r
-               public static const URIbaselineEscape:String = URImustEscape + ":?#/@";\r
-               \r
-               // Characters that must be escaped in the part part.\r
-               public static const URIpathEscape:String = URImustEscape + "?#";\r
-               \r
-               // Characters that must be escaped in the query part, if setting\r
-               // the query as a whole string.  If the query is set by\r
-               // name/value, URIqueryPartEscape is used instead.\r
-               public static const URIqueryEscape:String = URImustEscape + "#";\r
-               \r
-               // This is what each name/value pair must escape "&=" as well\r
-               // so they don't conflict with the "param=value&param2=value2"\r
-               // syntax.\r
-               public static const URIqueryPartEscape:String = URImustEscape + "#&=";\r
-               \r
-               // Non-hierarchical URI's can have query and fragment parts, but\r
-               // we also want to prevent '/' otherwise it might end up looking\r
-               // like a hierarchical URI to the parser.\r
-               public static const URInonHierEscape:String =   URImustEscape + "?#/";\r
-               \r
-               // Baseline uninitialized setting for the URI scheme.\r
-               public static const UNKNOWN_SCHEME:String = "unknown";\r
-               \r
-               // The following bitmaps are used for performance enhanced\r
-               // character escaping.\r
-               \r
-               // Baseline characters that need to be escaped.  Many parts use\r
-               // this.\r
-               protected static const URIbaselineExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIbaselineEscape);\r
-               \r
-               // Scheme escaping bitmap\r
-               protected static const URIschemeExcludedBitmap:URIEncodingBitmap = \r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // User/pass escaping bitmap\r
-               protected static const URIuserpassExcludedBitmap:URIEncodingBitmap =\r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // Authority escaping bitmap\r
-               protected static const URIauthorityExcludedBitmap:URIEncodingBitmap =\r
-                       URIbaselineExcludedBitmap;\r
-                       \r
-               // Port escaping bitmap\r
-               protected static const URIportExludedBitmap:URIEncodingBitmap = \r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // Path escaping bitmap\r
-               protected static const URIpathExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIpathEscape);\r
-                       \r
-               // Query (whole) escaping bitmap\r
-               protected static const URIqueryExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIqueryEscape);\r
-                       \r
-               // Query (individual parts) escaping bitmap\r
-               protected static const URIqueryPartExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIqueryPartEscape);\r
-                       \r
-               // Fragments are the last part in the URI.  They only need to\r
-               // escape space, '#', and '%'.  Turns out that is what query\r
-               // uses too.\r
-               protected static const URIfragmentExcludedBitmap:URIEncodingBitmap =\r
-                       URIqueryExcludedBitmap;\r
-                       \r
-               // Characters that need to be escaped in the non-hierarchical part\r
-               protected static const URInonHierexcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URInonHierEscape);\r
-                       \r
-               // Values used by getRelation()\r
-               public static const NOT_RELATED:int = 0;\r
-               public static const CHILD:int = 1;\r
-               public static const EQUAL:int = 2;\r
-               public static const PARENT:int = 3;\r
-\r
-               //-------------------------------------------------------------------\r
-               // protected class members\r
-               //-------------------------------------------------------------------\r
-               protected var _valid:Boolean = false;\r
-               protected var _relative:Boolean = false;\r
-               protected var _scheme:String = "";\r
-               protected var _authority:String = "";\r
-               protected var _username:String = "";\r
-               protected var _password:String = "";\r
-               protected var _port:String = "";\r
-               protected var _path:String = "";\r
-               protected var _query:String = "";\r
-               protected var _fragment:String = "";\r
-               protected var _nonHierarchical:String = "";\r
-               protected static var _resolver:IURIResolver = null;\r
-\r
-\r
-               /**\r
-                *  URI Constructor.  If no string is given, this will initialize\r
-                *  this URI object to a blank URI.\r
-                */\r
-               public function URI(uri:String = null) : void   \r
-               {\r
-                       if (uri == null)\r
-                               initialize();\r
-                       else\r
-                               constructURI(uri);\r
-               }\r
-\r
-               \r
-               /**\r
-                * @private\r
-                * Method that loads the URI from the given string.\r
-                */\r
-               protected function constructURI(uri:String) : Boolean\r
-               {\r
-                       if (!parseURI(uri))\r
-                               _valid = false;\r
-                               \r
-                       return isValid();\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private Private initializiation.\r
-                */\r
-               protected function initialize() : void\r
-               {\r
-                       _valid = false;\r
-                       _relative = false;\r
-               \r
-                       _scheme = UNKNOWN_SCHEME;\r
-                       _authority = "";\r
-                       _username = "";\r
-                       _password = "";\r
-                       _port = "";\r
-                       _path = "";\r
-                       _query = "";\r
-                       _fragment = "";\r
-               \r
-                       _nonHierarchical = "";\r
-               }       \r
-               \r
-               /**\r
-                * @private Accessor to explicitly set/get the hierarchical\r
-                * state of the URI.\r
-                */\r
-               protected function set hierState(state:Boolean) : void\r
-               {\r
-                       if (state)\r
-                       {\r
-                               // Clear the non-hierarchical data\r
-                               _nonHierarchical = "";\r
-               \r
-                               // Also set the state vars while we are at it\r
-                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
-                                       _relative = true;\r
-                               else\r
-                                       _relative = false;\r
-               \r
-                               if (_authority.length == 0 && _path.length == 0)\r
-                                       _valid = false;\r
-                               else\r
-                                       _valid = true;\r
-                       }\r
-                       else\r
-                       {\r
-                               // Clear the hierarchical data\r
-                               _authority = "";\r
-                               _username = "";\r
-                               _password = "";\r
-                               _port = "";\r
-                               _path = "";\r
-               \r
-                               _relative = false;\r
-               \r
-                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
-                                       _valid = false;\r
-                               else\r
-                                       _valid = true;\r
-                       }\r
-               }\r
-               protected function get hierState() : Boolean\r
-               {\r
-                       return (_nonHierarchical.length == 0);\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private Functions that performs some basic consistency validation.\r
-                */\r
-               protected function validateURI() : Boolean\r
-               {\r
-                       // Check the scheme\r
-                       if (isAbsolute())\r
-                       {\r
-                               if (_scheme.length <= 1 || _scheme == UNKNOWN_SCHEME)\r
-                               {\r
-                                       // we probably parsed a C:\ type path or no scheme\r
-                                       return false;\r
-                               }\r
-                               else if (verifyAlpha(_scheme) == false)\r
-                                       return false;  // Scheme contains bad characters\r
-                       }\r
-                       \r
-                       if (hierState)\r
-                       {\r
-                               if (_path.search('\\') != -1)\r
-                                       return false;  // local path\r
-                               else if (isRelative() == false && _scheme == UNKNOWN_SCHEME)\r
-                                       return false;  // It's an absolute URI, but it has a bad scheme\r
-                       }\r
-                       else\r
-                       {\r
-                               if (_nonHierarchical.search('\\') != -1)\r
-                                       return false;  // some kind of local path\r
-                       }\r
-               \r
-                       // Looks like it's ok.\r
-                       return true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                *\r
-                * Given a URI in string format, parse that sucker into its basic\r
-                * components and assign them to this object.  A URI is of the form:\r
-                *    <scheme>:<authority><path>?<query>#<fragment>\r
-                *\r
-                * For simplicity, we parse the URI in the following order:\r
-                *              \r
-                *              1. Fragment (anchors)\r
-                *              2. Query        (CGI stuff)\r
-                *              3. Scheme       ("http")\r
-                *              4. Authority (host name)\r
-                *              5. Username/Password (if any)\r
-                *              6. Port         (server port if any)\r
-                *              7. Path         (/homepages/mypage.html)\r
-                *\r
-                * The reason for this order is to minimize any parsing ambiguities.\r
-                * Fragments and queries can contain almost anything (they are parts\r
-                * that can contain custom data with their own syntax).  Parsing\r
-                * them out first removes a large chance of parsing errors.  This\r
-                * method expects well formed URI's, but performing the parse in\r
-                * this order makes us a little more tolerant of user error.\r
-                * \r
-                * REGEXP\r
-                * Why doesn't this use regular expressions to parse the URI?  We\r
-                * have found that in a real world scenario, URI's are not always\r
-                * well formed.  Sometimes characters that should have been escaped\r
-                * are not, and those situations would break a regexp pattern.  This\r
-                * function attempts to be smart about what it is parsing based on\r
-                * location of characters relative to eachother.  This function has\r
-                * been proven through real-world use to parse the vast majority\r
-                * of URI's correctly.\r
-                *\r
-                * NOTE\r
-                * It is assumed that the string in URI form is escaped.  This function\r
-                * does not escape anything.  If you constructed the URI string by\r
-                * hand, and used this to parse in the URI and still need it escaped,\r
-                * call forceEscape() on your URI object.\r
-                *\r
-                * Parsing Assumptions\r
-                * This routine assumes that the URI being passed is well formed.\r
-                * Passing things like local paths, malformed URI's, and the such\r
-                * will result in parsing errors.  This function can handle\r
-                *       - absolute hierarchical (e.g. "http://something.com/index.html),\r
-                *   - relative hierarchical (e.g. "../images/flower.gif"), or\r
-                *   - non-hierarchical URIs (e.g. "mailto:jsmith@fungoo.com").\r
-                * \r
-                * Anything else will probably result in a parsing error, or a bogus\r
-                * URI object.\r
-                * \r
-                * Note that non-hierarchical URIs *MUST* have a scheme, otherwise\r
-                * they will be mistaken for relative URI's.\r
-                * \r
-                * If you are not sure what is being passed to you (like manually\r
-                * entered text from UI), you can construct a blank URI object and\r
-                * call unknownToURI() passing in the unknown string.\r
-                * \r
-                * @return      true if successful, false if there was some kind of\r
-                * parsing error\r
-                */\r
-               protected function parseURI(uri:String) : Boolean\r
-               {\r
-                       var baseURI:String = uri;\r
-                       var index:int, index2:int;\r
-               \r
-                       // Make sure this object is clean before we start.  If it was used\r
-                       // before and we are now parsing a new URI, we don't want any stale\r
-                       // info lying around.\r
-                       initialize();\r
-               \r
-                       // Remove any fragments (anchors) from the URI\r
-                       index = baseURI.indexOf("#");\r
-                       if (index != -1)\r
-                       {\r
-                               // Store the fragment piece if any\r
-                               if (baseURI.length > (index + 1)) // +1 is to skip the '#'\r
-                                       _fragment = baseURI.substr(index + 1, baseURI.length - (index + 1)); \r
-               \r
-                               // Trim off the fragment\r
-                               baseURI = baseURI.substr(0, index);\r
-                       }\r
-               \r
-                       // We need to strip off any CGI parameters (eg '?param=bob')\r
-                       index = baseURI.indexOf("?");\r
-                       if (index != -1)\r
-                       {\r
-                               if (baseURI.length > (index + 1))\r
-                                       _query = baseURI.substr(index + 1, baseURI.length - (index + 1)); // +1 is to skip the '?'\r
-               \r
-                               // Trim off the query\r
-                               baseURI = baseURI.substr(0, index);\r
-                       }\r
-               \r
-                       // Now try to find the scheme part\r
-                       index = baseURI.search(':');\r
-                       index2 = baseURI.search('/');\r
-               \r
-                       var containsColon:Boolean = (index != -1);\r
-                       var containsSlash:Boolean = (index2 != -1);\r
-               \r
-                       // This value is indeterminate if "containsColon" is false.\r
-                       // (if there is no colon, does the slash come before or\r
-                       // after said non-existing colon?)\r
-                       var colonBeforeSlash:Boolean = (!containsSlash || index < index2);\r
-               \r
-                       // If it has a colon and it's before the first slash, we will treat\r
-                       // it as a scheme.  If a slash is before a colon, there must be a\r
-                       // stray colon in a path or something.  In which case, the colon is\r
-                       // not the separator for the scheme.  Technically, we could consider\r
-                       // this an error, but since this is not an ambiguous state (we know\r
-                       // 100% that this has no scheme), we will keep going.\r
-                       if (containsColon && colonBeforeSlash)\r
-                       {\r
-                               // We found a scheme\r
-                               _scheme = baseURI.substr(0, index);\r
-                               \r
-                               // Normalize the scheme\r
-                               _scheme = _scheme.toLowerCase();\r
-               \r
-                               baseURI = baseURI.substr(index + 1);\r
-               \r
-                               if (baseURI.substr(0, 2) == "//")\r
-                               {\r
-                                       // This is a hierarchical URI\r
-                                       _nonHierarchical = "";\r
-               \r
-                                       // Trim off the "//"\r
-                                       baseURI = baseURI.substr(2, baseURI.length - 2);\r
-                               }\r
-                               else\r
-                               {\r
-                                       // This is a non-hierarchical URI like "mailto:bob@mail.com"\r
-                                       _nonHierarchical = baseURI;\r
-               \r
-                                       if ((_valid = validateURI()) == false)\r
-                                               initialize();  // Bad URI.  Clear it.\r
-               \r
-                                       // No more parsing to do for this case\r
-                                       return isValid();\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               // No scheme.  We will consider this a relative URI\r
-                               _scheme = "";\r
-                               _relative = true;\r
-                               _nonHierarchical = "";\r
-                       }\r
-               \r
-                       // Ok, what we have left is everything after the <scheme>://\r
-               \r
-                       // Now that we have stripped off any query and fragment parts, we\r
-                       // need to split the authority from the path\r
-               \r
-                       if (isRelative())\r
-                       {\r
-                               // Don't bother looking for the authority.  It's a relative URI\r
-                               _authority = "";\r
-                               _port = "";\r
-                               _path = baseURI;\r
-                       }\r
-                       else\r
-                       {\r
-                               // Check for malformed UNC style file://///server/type/path/\r
-                               // By the time we get here, we have already trimmed the "file://"\r
-                               // so baseURI will be ///server/type/path.  If baseURI only\r
-                               // has one slash, we leave it alone because that is valid (that\r
-                               // is the case of "file:///path/to/file.txt" where there is no\r
-                               // server - implicit "localhost").\r
-                               if (baseURI.substr(0, 2) == "//")\r
-                               {\r
-                                       // Trim all leading slashes\r
-                                       while(baseURI.charAt(0) == "/")\r
-                                               baseURI = baseURI.substr(1, baseURI.length - 1);\r
-                               }\r
-               \r
-                               index = baseURI.search('/');\r
-                               if (index == -1)\r
-                               {\r
-                                       // No path.  We must have passed something like "http://something.com"\r
-                                       _authority = baseURI;\r
-                                       _path = "";\r
-                               }\r
-                               else\r
-                               {\r
-                                       _authority = baseURI.substr(0, index);\r
-                                       _path = baseURI.substr(index, baseURI.length - index);\r
-                               }\r
-               \r
-                               // Check to see if the URI has any username or password information.\r
-                               // For example:  ftp://username:password@server.com\r
-                               index = _authority.search('@');\r
-                               if (index != -1)\r
-                               {\r
-                                       // We have a username and possibly a password\r
-                                       _username = _authority.substr(0, index);\r
-               \r
-                                       // Remove the username/password from the authority\r
-                                       _authority = _authority.substr(index + 1);  // Skip the '@'\r
-               \r
-                                       // Now check to see if the username also has a password\r
-                                       index = _username.search(':');\r
-                                       if (index != -1)\r
-                                       {\r
-                                               _password = _username.substring(index + 1, _username.length);\r
-                                               _username = _username.substr(0, index);\r
-                                       }\r
-                                       else\r
-                                               _password = "";\r
-                               }\r
-                               else\r
-                               {\r
-                                       _username = "";\r
-                                       _password = "";\r
-                               }\r
-               \r
-                               // Lastly, check to see if the authorty has a port number.\r
-                               // This is parsed after the username/password to avoid conflicting\r
-                               // with the ':' in the 'username:password' if one exists.\r
-                               index = _authority.search(':');\r
-                               if (index != -1)\r
-                               {\r
-                                       _port = _authority.substring(index + 1, _authority.length);  // skip the ':'\r
-                                       _authority = _authority.substr(0, index);\r
-                               }\r
-                               else\r
-                               {\r
-                                       _port = "";\r
-                               }\r
-                               \r
-                               // Lastly, normalize the authority.  Domain names\r
-                               // are case insensitive.\r
-                               _authority = _authority.toLowerCase();\r
-                       }\r
-               \r
-                       if ((_valid = validateURI()) == false)\r
-                               initialize();  // Bad URI.  Clear it\r
-               \r
-                       return isValid();\r
-               }\r
-               \r
-               \r
-               /********************************************************************\r
-                * Copy function.\r
-                */\r
-               public function copyURI(uri:URI) : void\r
-               {\r
-                       this._scheme = uri._scheme;\r
-                       this._authority = uri._authority;\r
-                       this._username = uri._username;\r
-                       this._password = uri._password;\r
-                       this._port = uri._port;\r
-                       this._path = uri._path;\r
-                       this._query = uri._query;\r
-                       this._fragment = uri._fragment;\r
-                       this._nonHierarchical = uri._nonHierarchical;\r
-               \r
-                       this._valid = uri._valid;\r
-                       this._relative = uri._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                * Checks if the given string only contains a-z or A-Z.\r
-                */\r
-               protected function verifyAlpha(str:String) : Boolean\r
-               {\r
-                       var pattern:RegExp = /[^a-z]/;\r
-                       var index:int;\r
-                       \r
-                       str = str.toLowerCase();\r
-                       index = str.search(pattern);\r
-                       \r
-                       if (index == -1)\r
-                               return true;\r
-                       else\r
-                               return false;\r
-               }\r
-               \r
-               /**\r
-                * Is this a valid URI?\r
-                * \r
-                * @return true if this object represents a valid URI, false\r
-                * otherwise.\r
-                */\r
-               public function isValid() : Boolean\r
-               { \r
-                       return this._valid;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI an absolute URI?  An absolute URI is a complete, fully\r
-                * qualified reference to a resource.  e.g. http://site.com/index.htm\r
-                * Non-hierarchical URI's are always absolute.\r
-                */\r
-               public function isAbsolute() : Boolean\r
-               { \r
-                       return !this._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI a relative URI?  Relative URI's do not have a scheme\r
-                * and only contain a relative path with optional anchor and query\r
-                * parts.  e.g. "../reports/index.htm".  Non-hierarchical URI's\r
-                * will never be relative.\r
-                */\r
-               public function isRelative() : Boolean\r
-               { \r
-                       return this._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Does this URI point to a resource that is a directory/folder?\r
-                * The URI specification dictates that any path that ends in a slash\r
-                * is a directory.  This is needed to be able to perform correct path\r
-                * logic when combining relative URI's with absolute URI's to\r
-                * obtain the correct absolute URI to a resource.\r
-                * \r
-                * @see URI.chdir\r
-                * \r
-                * @return true if this URI represents a directory resource, false\r
-                * if this URI represents a file resource.\r
-                */\r
-               public function isDirectory() : Boolean\r
-               {\r
-                       if (_path.length == 0)\r
-                               return false;\r
-               \r
-                       return (_path.charAt(path.length - 1) == '/');\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI a hierarchical URI? URI's can be  \r
-                */\r
-               public function isHierarchical() : Boolean\r
-               { \r
-                       return hierState;\r
-               }\r
-                               \r
-               \r
-               /**\r
-                * The scheme of the URI.\r
-                */\r
-               public function get scheme() : String\r
-               { \r
-                       return URI.unescapeChars(_scheme);\r
-               }\r
-               public function set scheme(schemeStr:String) : void\r
-               {\r
-                       // Normalize the scheme\r
-                       var normalized:String = schemeStr.toLowerCase();\r
-                       _scheme = URI.fastEscapeChars(normalized, URI.URIschemeExcludedBitmap);\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The authority (host) of the URI.  Only valid for\r
-                * hierarchical URI's.  If the URI is relative, this will\r
-                * be an empty string. When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.\r
-                */\r
-               public function get authority() : String\r
-               { \r
-                       return URI.unescapeChars(_authority);\r
-               }\r
-               public function set authority(authorityStr:String) : void\r
-               {\r
-                       // Normalize the authority\r
-                       authorityStr = authorityStr.toLowerCase();\r
-                       \r
-                       _authority = URI.fastEscapeChars(authorityStr,\r
-                               URI.URIauthorityExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have an authority, make\r
-                       // sure this URI is of the proper format.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The username of the URI.  Only valid for hierarchical\r
-                * URI's.  If the URI is relative, this will be an empty\r
-                * string.\r
-                * \r
-                * <p>The URI specification allows for authentication\r
-                * credentials to be embedded in the URI as such:</p>\r
-                * \r
-                * <p>http://user:passwd&#64;host/path/to/file.htm</p>\r
-                * \r
-                * <p>When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.</p>\r
-                */\r
-               public function get username() : String\r
-               {\r
-                       return URI.unescapeChars(_username);\r
-               }\r
-               public function set username(usernameStr:String) : void\r
-               {\r
-                       _username = URI.fastEscapeChars(usernameStr, URI.URIuserpassExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have a username.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The password of the URI.  Similar to username.\r
-                * @see URI.username\r
-                */\r
-               public function get password() : String\r
-               {\r
-                       return URI.unescapeChars(_password);\r
-               }\r
-               public function set password(passwordStr:String) : void\r
-               {\r
-                       _password = URI.fastEscapeChars(passwordStr,\r
-                               URI.URIuserpassExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have a password.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The host port number.  Only valid for hierarchical URI's.  If\r
-                * the URI is relative, this will be an empty string. URI's can\r
-                * contain the port number of the remote host:\r
-                * \r
-                * <p>http://site.com:8080/index.htm</p>\r
-                */\r
-               public function get port() : String\r
-               { \r
-                       return URI.unescapeChars(_port);\r
-               }\r
-               public function set port(portStr:String) : void\r
-               {\r
-                       _port = URI.escapeChars(portStr);\r
-                       \r
-                       // Only hierarchical URI's can have a port.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The path portion of the URI.  Only valid for hierarchical\r
-                * URI's.  When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.\r
-                * \r
-                * <p>The path portion can be in one of two formats. 1) an absolute\r
-                * path, or 2) a relative path.  An absolute path starts with a\r
-                * slash ('/'), a relative path does not.</p>\r
-                * \r
-                * <p>An absolute path may look like:</p>\r
-                * <listing>/full/path/to/my/file.htm</listing>\r
-                * \r
-                * <p>A relative path may look like:</p>\r
-                * <listing>\r
-                * path/to/my/file.htm\r
-                * ../images/logo.gif\r
-                * ../../reports/index.htm\r
-                * </listing>\r
-                * \r
-                * <p>Paths can be absolute or relative.  Note that this not the same as\r
-                * an absolute or relative URI.  An absolute URI can only have absolute\r
-                * paths.  For example:</p>\r
-                * \r
-                * <listing>http:/site.com/path/to/file.htm</listing>\r
-                * \r
-                * <p>This absolute URI has an absolute path of "/path/to/file.htm".</p>\r
-                * \r
-                * <p>Relative URI's can have either absolute paths or relative paths.\r
-                * All of the following relative URI's are valid:</p>\r
-                * \r
-                * <listing>\r
-                * /absolute/path/to/file.htm\r
-                * path/to/file.htm\r
-                * ../path/to/file.htm\r
-                * </listing>\r
-                */\r
-               public function get path() : String\r
-               { \r
-                       return URI.unescapeChars(_path);\r
-               }\r
-               public function set path(pathStr:String) : void\r
-               {       \r
-                       this._path = URI.fastEscapeChars(pathStr, URI.URIpathExcludedBitmap);\r
-               \r
-                       if (this._scheme == UNKNOWN_SCHEME)\r
-                       {\r
-                               // We set the path.  This is a valid URI now.\r
-                               this._scheme = "";\r
-                       }\r
-               \r
-                       // Only hierarchical URI's can have a path.\r
-                       hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The query (CGI) portion of the URI.  This part is valid for\r
-                * both hierarchical and non-hierarchical URI's.\r
-                * \r
-                * <p>This accessor should only be used if a custom query syntax\r
-                * is used.  This URI class supports the common "param=value"\r
-                * style query syntax via the get/setQueryValue() and\r
-                * get/setQueryByMap() functions.  Those functions should be used\r
-                * instead if the common syntax is being used.\r
-                * \r
-                * <p>The URI RFC does not specify any particular\r
-                * syntax for the query part of a URI.  It is intended to allow\r
-                * any format that can be agreed upon by the two communicating hosts.\r
-                * However, most systems have standardized on the typical CGI\r
-                * format:</p>\r
-                * \r
-                * <listing>http://site.com/script.php?param1=value1&param2=value2</listing>\r
-                * \r
-                * <p>This class has specific support for this query syntax</p>\r
-                * \r
-                * <p>This common query format is an array of name/value\r
-                * pairs with its own syntax that is different from the overall URI\r
-                * syntax.  The query has its own escaping logic.  For a query part\r
-                * to be properly escaped and unescaped, it must be split into its\r
-                * component parts.  This accessor escapes/unescapes the entire query\r
-                * part without regard for it's component parts.  This has the\r
-                * possibliity of leaving the query string in an ambiguious state in\r
-                * regards to its syntax.  If the contents of the query part are\r
-                * important, it is recommended that get/setQueryValue() or\r
-                * get/setQueryByMap() are used instead.</p>\r
-                * \r
-                * If a different query syntax is being used, a subclass of URI\r
-                * can be created to handle that specific syntax.\r
-                *  \r
-                * @see URI.getQueryValue, URI.getQueryByMap\r
-                */\r
-               public function get query() : String\r
-               { \r
-                       return URI.unescapeChars(_query);\r
-               }\r
-               public function set query(queryStr:String) : void\r
-               {\r
-                       _query = URI.fastEscapeChars(queryStr, URI.URIqueryExcludedBitmap);\r
-                       \r
-                       // both hierarchical and non-hierarchical URI's can\r
-                       // have a query.  Do not set the hierState.\r
-               }\r
-               \r
-               /**\r
-                * Accessor to the raw query data.  If you are using a custom query\r
-                * syntax, this accessor can be used to get and set the query part\r
-                * directly with no escaping/unescaping.  This should ONLY be used\r
-                * if your application logic is handling custom query logic and\r
-                * handling the proper escaping of the query part.\r
-                */\r
-               public function get queryRaw() : String\r
-               {\r
-                       return _query;\r
-               }\r
-               public function set queryRaw(queryStr:String) : void\r
-               {\r
-                       _query = queryStr;\r
-               }\r
-\r
-\r
-               /**\r
-                * The fragment (anchor) portion of the URI.  This is valid for\r
-                * both hierarchical and non-hierarchical URI's.\r
-                */\r
-               public function get fragment() : String\r
-               { \r
-                       return URI.unescapeChars(_fragment);\r
-               }\r
-               public function set fragment(fragmentStr:String) : void\r
-               {\r
-                       _fragment = URI.fastEscapeChars(fragmentStr, URIfragmentExcludedBitmap);\r
-\r
-                       // both hierarchical and non-hierarchical URI's can\r
-                       // have a fragment.  Do not set the hierState.\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The non-hierarchical part of the URI.  For example, if\r
-                * this URI object represents "mailto:somebody@company.com",\r
-                * this will contain "somebody@company.com".  This is valid only\r
-                * for non-hierarchical URI's.  \r
-                */\r
-               public function get nonHierarchical() : String\r
-               { \r
-                       return URI.unescapeChars(_nonHierarchical);\r
-               }\r
-               public function set nonHierarchical(nonHier:String) : void\r
-               {\r
-                       _nonHierarchical = URI.fastEscapeChars(nonHier, URInonHierexcludedBitmap);\r
-                       \r
-                       // This is a non-hierarchical URI.\r
-                       this.hierState = false;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Quick shorthand accessor to set the parts of this URI.\r
-                * The given parts are assumed to be in unescaped form.  If\r
-                * the URI is non-hierarchical (e.g. mailto:) you will need\r
-                * to call SetScheme() and SetNonHierarchical().\r
-                */\r
-               public function setParts(schemeStr:String, authorityStr:String,\r
-                               portStr:String, pathStr:String, queryStr:String,\r
-                               fragmentStr:String) : void\r
-               {\r
-                       this.scheme = schemeStr;\r
-                       this.authority = authorityStr;\r
-                       this.port = portStr;\r
-                       this.path = pathStr;\r
-                       this.query = queryStr;\r
-                       this.fragment = fragmentStr;\r
-\r
-                       hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * URI escapes the given character string.  This is similar in function\r
-                * to the global encodeURIComponent() function in ActionScript, but is\r
-                * slightly different in regards to which characters get escaped.  This\r
-                * escapes the characters specified in the URIbaselineExluded set (see class\r
-                * static members).  This is needed for this class to work properly.\r
-                * \r
-                * <p>If a different set of characters need to be used for the escaping,\r
-                * you may use fastEscapeChars() and specify a custom URIEncodingBitmap\r
-                * that contains the characters your application needs escaped.</p>\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param unescaped character string to be escaped.\r
-                * \r
-                * @return      escaped character string\r
-                * \r
-                * @see encodeURIComponent\r
-                * @see fastEscapeChars\r
-                */\r
-               static public function escapeChars(unescaped:String) : String\r
-               {\r
-                       // This uses the excluded set by default.\r
-                       return fastEscapeChars(unescaped, URI.URIbaselineExcludedBitmap);\r
-               }\r
-               \r
-\r
-               /**\r
-                * Unescape any URI escaped characters in the given character\r
-                * string.\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param escaped the escaped string to be unescaped.\r
-                * \r
-                * @return      unescaped string.\r
-                */\r
-               static public function unescapeChars(escaped:String /*, onlyHighASCII:Boolean = false*/) : String\r
-               {\r
-                       // We can just use the default AS function.  It seems to\r
-                       // decode everything correctly\r
-                       var unescaped:String;\r
-                       unescaped = decodeURIComponent(escaped);\r
-                       return unescaped;\r
-               }\r
-               \r
-               /**\r
-                * Performance focused function that escapes the given character\r
-                * string using the given URIEncodingBitmap as the rule for what\r
-                * characters need to be escaped.  This function is used by this\r
-                * class and can be used externally to this class to perform\r
-                * escaping on custom character sets.\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param unescaped             the unescaped string to be escaped\r
-                * @param bitmap                the set of characters that need to be escaped\r
-                * \r
-                * @return      the escaped string.\r
-                */\r
-               static public function fastEscapeChars(unescaped:String, bitmap:URIEncodingBitmap) : String\r
-               {\r
-                       var escaped:String = "";\r
-                       var c:String;\r
-                       var x:int, i:int;\r
-                       \r
-                       for (i = 0; i < unescaped.length; i++)\r
-                       {\r
-                               c = unescaped.charAt(i);\r
-                               \r
-                               x = bitmap.ShouldEscape(c);\r
-                               if (x)\r
-                               {\r
-                                       c = x.toString(16);\r
-                                       if (c.length == 1)\r
-                                               c = "0" + c;\r
-                                               \r
-                                       c = "%" + c;\r
-                                       c = c.toUpperCase();\r
-                               }\r
-                               \r
-                               escaped += c;\r
-                       }\r
-                       \r
-                       return escaped;\r
-               }\r
-\r
-               \r
-               /**\r
-                * Is this URI of a particular scheme type?  For example,\r
-                * passing "http" to a URI object that represents the URI\r
-                * "http://site.com/" would return true.\r
-                * \r
-                * @param scheme        scheme to check for\r
-                * \r
-                * @return true if this URI object is of the given type, false\r
-                * otherwise.\r
-                */\r
-               public function isOfType(scheme:String) : Boolean\r
-               {\r
-                       // Schemes are never case sensitive.  Ignore case.\r
-                       scheme = scheme.toLowerCase();\r
-                       return (this._scheme == scheme);\r
-               }\r
-\r
-\r
-               /**\r
-                * Get the value for the specified named in the query part.  This\r
-                * assumes the query part of the URI is in the common\r
-                * "name1=value1&name2=value2" syntax.  Do not call this function\r
-                * if you are using a custom query syntax.\r
-                * \r
-                * @param name  name of the query value to get.\r
-                * \r
-                * @return the value of the query name, empty string if the\r
-                * query name does not exist.\r
-                */\r
-               public function getQueryValue(name:String) : String\r
-               {\r
-                       var map:Object;\r
-                       var item:String;\r
-                       var value:String;\r
-               \r
-                       map = getQueryByMap();\r
-               \r
-                       for (item in map)\r
-                       {\r
-                               if (item == name)\r
-                               {\r
-                                       value = map[item];\r
-                                       return value;\r
-                               }\r
-                       }\r
-               \r
-                       // Didn't find the specified key\r
-                       return new String("");\r
-               }\r
-               \r
-\r
-               /**\r
-                * Set the given value on the given query name.  If the given name\r
-                * does not exist, it will automatically add this name/value pair\r
-                * to the query.  If null is passed as the value, it will remove\r
-                * the given item from the query.\r
-                * \r
-                * <p>This automatically escapes any characters that may conflict with\r
-                * the query syntax so that they are "safe" within the query.  The\r
-                * strings passed are assumed to be literal unescaped name and value.</p>\r
-                * \r
-                * @param name  name of the query value to set\r
-                * @param value value of the query item to set.  If null, this will\r
-                * force the removal of this item from the query.\r
-                */\r
-               public function setQueryValue(name:String, value:String) : void\r
-               {\r
-                       var map:Object;\r
-\r
-                       map = getQueryByMap();\r
-               \r
-                       // If the key doesn't exist yet, this will create a new pair in\r
-                       // the map.  If it does exist, this will overwrite the previous\r
-                       // value, which is what we want.\r
-                       map[name] = value;\r
-               \r
-                       setQueryByMap(map);\r
-               }\r
-\r
-               \r
-               /**\r
-                * Get the query of the URI in an Object class that allows for easy\r
-                * access to the query data via Object accessors.  For example:\r
-                * \r
-                * <listing>\r
-                * var query:Object = uri.getQueryByMap();\r
-                * var value:String = query["param"];    // get a value\r
-                * query["param2"] = "foo";   // set a new value\r
-                * </listing>\r
-                * \r
-                * @return Object that contains the name/value pairs of the query.\r
-                * \r
-                * @see #setQueryByMap\r
-                * @see #getQueryValue\r
-                * @see #setQueryValue\r
-                */\r
-               public function getQueryByMap() : Object\r
-               {\r
-                       var queryStr:String;\r
-                       var pair:String;\r
-                       var pairs:Array;\r
-                       var item:Array;\r
-                       var name:String, value:String;\r
-                       var index:int;\r
-                       var map:Object = new Object();\r
-               \r
-               \r
-                       // We need the raw query string, no unescaping.\r
-                       queryStr = this._query;\r
-                       \r
-                       pairs = queryStr.split('&');\r
-                       for each (pair in pairs)\r
-                       {\r
-                               if (pair.length == 0)\r
-                                 continue;\r
-                                 \r
-                               item = pair.split('=');\r
-                               \r
-                               if (item.length > 0)\r
-                                       name = item[0];\r
-                               else\r
-                                       continue;  // empty array\r
-                               \r
-                               if (item.length > 1)\r
-                                       value = item[1];\r
-                               else\r
-                                       value = "";\r
-                                       \r
-                               name = queryPartUnescape(name);\r
-                               value = queryPartUnescape(value);\r
-                               \r
-                               map[name] = value;\r
-                       }\r
-       \r
-                       return map;\r
-               }\r
-               \r
-\r
-               /**\r
-                * Set the query part of this URI using the given object as the\r
-                * content source.  Any member of the object that has a value of\r
-                * null will not be in the resulting query.\r
-                * \r
-                * @param map   object that contains the name/value pairs as\r
-                *    members of that object.\r
-                * \r
-                * @see #getQueryByMap\r
-                * @see #getQueryValue\r
-                * @see #setQueryValue\r
-                */\r
-               public function setQueryByMap(map:Object) : void\r
-               {\r
-                       var item:String;\r
-                       var name:String, value:String;\r
-                       var queryStr:String = "";\r
-                       var tmpPair:String;\r
-                       var foo:String;\r
-               \r
-                       for (item in map)\r
-                       {\r
-                               name = item;\r
-                               value = map[item];\r
-               \r
-                               if (value == null)\r
-                                       value = "";\r
-                               \r
-                               // Need to escape the name/value pair so that they\r
-                               // don't conflict with the query syntax (specifically\r
-                               // '=', '&', and <whitespace>).\r
-                               name = queryPartEscape(name);\r
-                               value = queryPartEscape(value);\r
-                               \r
-                               tmpPair = name;\r
-                               \r
-                               if (value.length > 0)\r
-                               {\r
-                                       tmpPair += "=";\r
-                                       tmpPair += value;\r
-                               }\r
-\r
-                               if (queryStr.length != 0)\r
-                                       queryStr += '&';  // Add the separator\r
-               \r
-                               queryStr += tmpPair;\r
-                       }\r
-               \r
-                       // We don't want to escape.  We already escaped the\r
-                       // individual name/value pairs.  If we escaped the\r
-                       // query string again by assigning it to "query",\r
-                       // we would have double escaping.\r
-                       _query = queryStr;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Similar to Escape(), except this also escapes characters that\r
-                * would conflict with the name/value pair query syntax.  This is\r
-                * intended to be called on each individual "name" and "value"\r
-                * in the query making sure that nothing in the name or value\r
-                * strings contain characters that would conflict with the query\r
-                * syntax (e.g. '=' and '&').\r
-                * \r
-                * @param unescaped             unescaped string that is to be escaped.\r
-                * \r
-                * @return escaped string.\r
-                * \r
-                * @see #queryUnescape\r
-                */\r
-               static public function queryPartEscape(unescaped:String) : String\r
-               {\r
-                       var escaped:String = unescaped;\r
-                       escaped = URI.fastEscapeChars(unescaped, URI.URIqueryPartExcludedBitmap);\r
-                       return escaped;\r
-               }\r
-               \r
-\r
-               /**\r
-                * Unescape the individual name/value string pairs.\r
-                * \r
-                * @param escaped       escaped string to be unescaped\r
-                * \r
-                * @return unescaped string\r
-                * \r
-                * @see #queryEscape\r
-                */\r
-               static public function queryPartUnescape(escaped:String) : String\r
-               {\r
-                       var unescaped:String = escaped;\r
-                       unescaped = unescapeChars(unescaped);\r
-                       return unescaped;\r
-               }\r
-               \r
-               /**\r
-                * Output this URI as a string.  The resulting string is properly\r
-                * escaped and well formed for machine processing.\r
-                */\r
-               public function toString() : String\r
-               {\r
-                       if (this == null)\r
-                               return "";\r
-                       else\r
-                               return toStringInternal(false);\r
-               }\r
-               \r
-               /**\r
-                * Output the URI as a string that is easily readable by a human.\r
-                * This outputs the URI with all escape sequences unescaped to\r
-                * their character representation.  This makes the URI easier for\r
-                * a human to read, but the URI could be completely invalid\r
-                * because some unescaped characters may now cause ambiguous parsing.\r
-                * This function should only be used if you want to display a URI to\r
-                * a user.  This function should never be used outside that specific\r
-                * case.\r
-                * \r
-                * @return the URI in string format with all escape sequences\r
-                * unescaped.\r
-                * \r
-                * @see #toString\r
-                */\r
-               public function toDisplayString() : String\r
-               {\r
-                       return toStringInternal(true);\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                * \r
-                * The guts of toString()\r
-                */\r
-               protected function toStringInternal(forDisplay:Boolean) : String\r
-               {\r
-                       var uri:String = "";\r
-                       var part:String = "";\r
-               \r
-                       if (isHierarchical() == false)\r
-                       {\r
-                               // non-hierarchical URI\r
-               \r
-                               uri += (forDisplay ? this.scheme : _scheme);\r
-                               uri += ":";\r
-                               uri += (forDisplay ? this.nonHierarchical : _nonHierarchical);\r
-                       }\r
-                       else\r
-                       {\r
-                               // Hierarchical URI\r
-               \r
-                               if (isRelative() == false)\r
-                               {\r
-                                       // If it is not a relative URI, then we want the scheme and\r
-                                       // authority parts in the string.  If it is relative, we\r
-                                       // do NOT want this stuff.\r
-               \r
-                                       if (_scheme.length != 0)\r
-                                       {\r
-                                               part = (forDisplay ? this.scheme : _scheme);\r
-                                               uri += part + ":";\r
-                                       }\r
-               \r
-                                       if (_authority.length != 0 || isOfType("file"))\r
-                                       {\r
-                                               uri += "//";\r
-               \r
-                                               // Add on any username/password associated with this\r
-                                               // authority\r
-                                               if (_username.length != 0)\r
-                                               {\r
-                                                       part = (forDisplay ? this.username : _username);\r
-                                                       uri += part;\r
-               \r
-                                                       if (_password.length != 0)\r
-                                                       {\r
-                                                               part = (forDisplay ? this.password : _password);\r
-                                                               uri += ":" + part;\r
-                                                       }\r
-               \r
-                                                       uri += "@";\r
-                                               }\r
-               \r
-                                               // add the authority\r
-                                               part = (forDisplay ? this.authority : _authority);\r
-                                               uri += part;\r
-               \r
-                                               // Tack on the port number, if any\r
-                                               if (port.length != 0)\r
-                                                       uri += ":" + port;\r
-                                       }\r
-                               }\r
-               \r
-                               // Tack on the path\r
-                               part = (forDisplay ? this.path : _path);\r
-                               uri += part;\r
-               \r
-                       } // end hierarchical part\r
-               \r
-                       // Both non-hier and hierarchical have query and fragment parts\r
-               \r
-                       // Add on the query and fragment parts\r
-                       if (_query.length != 0)\r
-                       {\r
-                               part = (forDisplay ? this.query : _query);\r
-                               uri += "?" + part;\r
-                       }\r
-               \r
-                       if (fragment.length != 0)\r
-                       {\r
-                               part = (forDisplay ? this.fragment : _fragment);\r
-                               uri += "#" + part;\r
-                       }\r
-               \r
-                       return uri;\r
-               }\r
-       \r
-               /**\r
-                * Forcefully ensure that this URI is properly escaped.\r
-                * \r
-                * <p>Sometimes URI's are constructed by hand using strings outside\r
-                * this class.  In those cases, it is unlikely the URI has been\r
-                * properly escaped.  This function forcefully escapes this URI\r
-                * by unescaping each part and then re-escaping it.  If the URI\r
-                * did not have any escaping, the first unescape will do nothing\r
-                * and then the re-escape will properly escape everything.  If\r
-                * the URI was already escaped, the unescape and re-escape will\r
-                * essentally be a no-op.  This provides a safe way to make sure\r
-                * a URI is in the proper escaped form.</p>\r
-                */\r
-               public function forceEscape() : void\r
-               {\r
-                       // The accessors for each of the members will unescape\r
-                       // and then re-escape as we get and assign them.\r
-                       \r
-                       // Handle the parts that are common for both hierarchical\r
-                       // and non-hierarchical URI's\r
-                       this.scheme = this.scheme;\r
-                       this.setQueryByMap(this.getQueryByMap());\r
-                       this.fragment = this.fragment;\r
-                       \r
-                       if (isHierarchical())\r
-                       {\r
-                               this.authority = this.authority;\r
-                               this.path = this.path;\r
-                               this.port = this.port;\r
-                               this.username = this.username;\r
-                               this.password = this.password;\r
-                       }\r
-                       else\r
-                       {\r
-                               this.nonHierarchical = this.nonHierarchical;\r
-                       }\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Does this URI point to a resource of the given file type?\r
-                * Given a file extension (or just a file name, this will strip the\r
-                * extension), check to see if this URI points to a file of that\r
-                * type.\r
-                * \r
-                * @param extension     string that contains a file extension with or\r
-                * without a dot ("html" and ".html" are both valid), or a file\r
-                * name with an extension (e.g. "index.html").\r
-                * \r
-                * @return true if this URI points to a resource with the same file\r
-                * file extension as the extension provided, false otherwise.\r
-                */\r
-               public function isOfFileType(extension:String) : Boolean\r
-               {\r
-                       var thisExtension:String;\r
-                       var index:int;\r
-               \r
-                       index = extension.lastIndexOf(".");\r
-                       if (index != -1)\r
-                       {\r
-                               // Strip the extension\r
-                               extension = extension.substr(index + 1);\r
-                       }\r
-                       else\r
-                       {\r
-                               // The caller passed something without a dot in it.  We\r
-                               // will assume that it is just a plain extension (e.g. "html").\r
-                               // What they passed is exactly what we want\r
-                       }\r
-               \r
-                       thisExtension = getExtension(true);\r
-               \r
-                       if (thisExtension == "")\r
-                               return false;\r
-               \r
-                       // Compare the extensions ignoring case\r
-                       if (compareStr(thisExtension, extension, false) == 0)\r
-                               return true;\r
-                       else\r
-                               return false;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Get the ".xyz" file extension from the filename in the URI.\r
-                * For example, if we have the following URI:\r
-                * \r
-                * <listing>http://something.com/path/to/my/page.html?form=yes&name=bob#anchor</listing>\r
-                * \r
-                * <p>This will return ".html".</p>\r
-                * \r
-                * @param minusDot   If true, this will strip the dot from the extension.\r
-                * If true, the above example would have returned "html".\r
-                * \r
-                * @return  the file extension\r
-                */\r
-               public function getExtension(minusDot:Boolean = false) : String\r
-               {\r
-                       var filename:String = getFilename();\r
-                       var extension:String;\r
-                       var index:int;\r
-               \r
-                       if (filename == "")\r
-                               return String("");\r
-               \r
-                       index = filename.lastIndexOf(".");\r
-               \r
-                       // If it doesn't have an extension, or if it is a "hidden" file,\r
-                       // it doesn't have an extension.  Hidden files on unix start with\r
-                       // a dot (e.g. ".login").\r
-                       if (index == -1 || index == 0)\r
-                               return String("");\r
-               \r
-                       extension = filename.substr(index);\r
-               \r
-                       // If the caller does not want the dot, remove it.\r
-                       if (minusDot && extension.charAt(0) == ".")\r
-                               extension = extension.substr(1);\r
-               \r
-                       return extension;\r
-               }\r
-               \r
-               /**\r
-                * Quick function to retrieve the file name off the end of a URI.\r
-                * \r
-                * <p>For example, if the URI is:</p>\r
-                * <listing>http://something.com/some/path/to/my/file.html</listing>\r
-                * <p>this function will return "file.html".</p>\r
-                * \r
-                * @param minusExtension true if the file extension should be stripped\r
-                * \r
-                * @return the file name.  If this URI is a directory, the return\r
-                * value will be empty string.\r
-                */\r
-               public function getFilename(minusExtension:Boolean = false) : String\r
-               {\r
-                       if (isDirectory())\r
-                               return String("");\r
-               \r
-                       var pathStr:String = this.path;\r
-                       var filename:String;\r
-                       var index:int;\r
-               \r
-                       // Find the last path separator.\r
-                       index = pathStr.lastIndexOf("/");\r
-               \r
-                       if (index != -1)\r
-                               filename = pathStr.substr(index + 1);\r
-                       else\r
-                               filename = pathStr;\r
-               \r
-                       if (minusExtension)\r
-                       {\r
-                               // The caller has requested that the extension be removed\r
-                               index = filename.lastIndexOf(".");\r
-               \r
-                               if (index != -1)\r
-                                       filename = filename.substr(0, index);\r
-                       }\r
-               \r
-                       return filename;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                * Helper function to compare strings.\r
-                * \r
-                * @return true if the two strings are identical, false otherwise.\r
-                */\r
-               static protected function compareStr(str1:String, str2:String,\r
-                       sensitive:Boolean = true) : Boolean\r
-               {\r
-                       if (sensitive == false)\r
-                       {\r
-                               str1 = str1.toLowerCase();\r
-                               str2 = str2.toLowerCase();\r
-                       }\r
-                       \r
-                       return (str1 == str2)\r
-               }\r
-               \r
-               /**\r
-                * Based on the type of this URI (http, ftp, etc.) get\r
-                * the default port used for that protocol.  This is\r
-                * just intended to be a helper function for the most\r
-                * common cases.\r
-                */\r
-               public function getDefaultPort() : String\r
-               {\r
-                       if (_scheme == "http")\r
-                               return String("80");\r
-                       else if (_scheme == "ftp")\r
-                               return String("21");\r
-                       else if (_scheme == "file")\r
-                               return String("");\r
-                       else if (_scheme == "sftp")\r
-                               return String("22"); // ssh standard port\r
-                       else\r
-                       {\r
-                               // Don't know the port for this URI type\r
-                               return String("");\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * @private\r
-                * \r
-                * This resolves the given URI if the application has a\r
-                * resolver interface defined.  This function does not\r
-                * modify the passed in URI and returns a new URI.\r
-                */\r
-               static protected function resolve(uri:URI) : URI\r
-               {\r
-                       var copy:URI = new URI();\r
-                       copy.copyURI(uri);\r
-                       \r
-                       if (_resolver != null)\r
-                       {\r
-                               // A resolver class has been registered.  Call it.\r
-                               return _resolver.resolve(copy);\r
-                       }\r
-                       else\r
-                       {\r
-                               // No resolver.  Nothing to do, but we don't\r
-                               // want to reuse the one passed in.\r
-                               return copy;\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Accessor to set and get the resolver object used by all URI\r
-                * objects to dynamically resolve URI's before comparison.\r
-                */\r
-               static public function set resolver(resolver:IURIResolver) : void\r
-               {\r
-                       _resolver = resolver;\r
-               }\r
-               static public function get resolver() : IURIResolver\r
-               {\r
-                       return _resolver;\r
-               }\r
-               \r
-               /**\r
-                * Given another URI, return this URI object's relation to the one given.\r
-                * URI's can have 1 of 4 possible relationships.  They can be unrelated,\r
-                * equal, parent, or a child of the given URI.\r
-                * \r
-                * @param uri   URI to compare this URI object to.\r
-                * @param caseSensitive  true if the URI comparison should be done\r
-                * taking case into account, false if the comparison should be\r
-                * performed case insensitive.\r
-                * \r
-                * @return URI.NOT_RELATED, URI.CHILD, URI.PARENT, or URI.EQUAL\r
-                */\r
-               public function getRelation(uri:URI, caseSensitive:Boolean = true) : int\r
-               {\r
-                       // Give the app a chance to resolve these URI's before we compare them.\r
-                       var thisURI:URI = URI.resolve(this);\r
-                       var thatURI:URI = URI.resolve(uri);\r
-                       \r
-                       if (thisURI.isRelative() || thatURI.isRelative())\r
-                       {\r
-                               // You cannot compare relative URI's due to their lack of context.\r
-                               // You could have two relative URI's that look like:\r
-                               //              ../../images/\r
-                               //              ../../images/marketing/logo.gif\r
-                               // These may appear related, but you have no overall context\r
-                               // from which to make the comparison.  The first URI could be\r
-                               // from one site and the other URI could be from another site.\r
-                               return URI.NOT_RELATED;\r
-                       }\r
-                       else if (thisURI.isHierarchical() == false || thatURI.isHierarchical() == false)\r
-                       {\r
-                               // One or both of the URI's are non-hierarchical.\r
-                               if (((thisURI.isHierarchical() == false) && (thatURI.isHierarchical() == true)) ||\r
-                                       ((thisURI.isHierarchical() == true) && (thatURI.isHierarchical() == false)))\r
-                               {\r
-                                       // XOR.  One is hierarchical and the other is\r
-                                       // non-hierarchical.  They cannot be compared.\r
-                                       return URI.NOT_RELATED;\r
-                               }\r
-                               else\r
-                               {\r
-                                       // They are both non-hierarchical\r
-                                       if (thisURI.scheme != thatURI.scheme)\r
-                                               return URI.NOT_RELATED;\r
-               \r
-                                       if (thisURI.nonHierarchical != thatURI.nonHierarchical)\r
-                                               return URI.NOT_RELATED;\r
-                                               \r
-                                       // The two non-hierarcical URI's are equal.\r
-                                       return URI.EQUAL;\r
-                               }\r
-                       }\r
-                       \r
-                       // Ok, this URI and the one we are being compared to are both\r
-                       // absolute hierarchical URI's.\r
-               \r
-                       if (thisURI.scheme != thatURI.scheme)\r
-                               return URI.NOT_RELATED;\r
-               \r
-                       if (thisURI.authority != thatURI.authority)\r
-                               return URI.NOT_RELATED;\r
-               \r
-                       var thisPort:String = thisURI.port;\r
-                       var thatPort:String = thatURI.port;\r
-                       \r
-                       // Different ports are considered completely different servers.\r
-                       if (thisPort == "")\r
-                               thisPort = thisURI.getDefaultPort();\r
-                       if (thatPort == "")\r
-                               thatPort = thatURI.getDefaultPort();\r
-               \r
-                       // Check to see if the port is the default port.\r
-                       if (thisPort != thatPort)\r
-                               return URI.NOT_RELATED;\r
-               \r
-                       if (compareStr(thisURI.path, thatURI.path, caseSensitive))\r
-                               return URI.EQUAL;\r
-               \r
-                       // Special case check.  If we are here, the scheme, authority,\r
-                       // and port match, and it is not a relative path, but the\r
-                       // paths did not match.  There is a special case where we\r
-                       // could have:\r
-                       //              http://something.com/\r
-                       //              http://something.com\r
-                       // Technically, these are equal.  So lets, check for this case.\r
-                       var thisPath:String = thisURI.path;\r
-                       var thatPath:String = thatURI.path;\r
-               \r
-                       if ( (thisPath == "/" || thatPath == "/") &&\r
-                                (thisPath == "" || thatPath == "") )\r
-                       {\r
-                               // We hit the special case.  These two are equal.\r
-                               return URI.EQUAL;\r
-                       }\r
-               \r
-                       // Ok, the paths do not match, but one path may be a parent/child\r
-                       // of the other.  For example, we may have:\r
-                       //              http://something.com/path/to/homepage/\r
-                       //              http://something.com/path/to/homepage/images/logo.gif\r
-                       // In this case, the first is a parent of the second (or the second\r
-                       // is a child of the first, depending on which you compare to the\r
-                       // other).  To make this comparison, we must split the path into\r
-                       // its component parts (split the string on the '/' path delimiter).\r
-                       // We then compare the \r
-                       var thisParts:Array, thatParts:Array;\r
-                       var thisPart:String, thatPart:String;\r
-                       var i:int;\r
-               \r
-                       thisParts = thisPath.split("/");\r
-                       thatParts = thatPath.split("/");\r
-               \r
-                       if (thisParts.length > thatParts.length)\r
-                       {\r
-                               thatPart = thatParts[thatParts.length - 1];\r
-                               if (thatPart.length > 0)\r
-                               {\r
-                                       // if the last part is not empty, the passed URI is\r
-                                       // not a directory.  There is no way the passed URI\r
-                                       // can be a parent.\r
-                                       return URI.NOT_RELATED;\r
-                               }\r
-                               else\r
-                               {\r
-                                       // Remove the empty trailing part\r
-                                       thatParts.pop();\r
-                               }\r
-                               \r
-                               // This may be a child of the one passed in\r
-                               for (i = 0; i < thatParts.length; i++)\r
-                               {\r
-                                       thisPart = thisParts[i];\r
-                                       thatPart = thatParts[i];\r
-                                               \r
-                                       if (compareStr(thisPart, thatPart, caseSensitive) == false)\r
-                                               return URI.NOT_RELATED;\r
-                               }\r
-               \r
-                               return URI.CHILD;\r
-                       }\r
-                       else if (thisParts.length < thatParts.length)\r
-                       {\r
-                               thisPart = thisParts[thisParts.length - 1];\r
-                               if (thisPart.length > 0)\r
-                               {\r
-                                       // if the last part is not empty, this URI is not a\r
-                                       // directory.  There is no way this object can be\r
-                                       // a parent.\r
-                                       return URI.NOT_RELATED;\r
-                               }\r
-                               else\r
-                               {\r
-                                       // Remove the empty trailing part\r
-                                       thisParts.pop();\r
-                               }\r
-                               \r
-                               // This may be the parent of the one passed in\r
-                               for (i = 0; i < thisParts.length; i++)\r
-                               {\r
-                                       thisPart = thisParts[i];\r
-                                       thatPart = thatParts[i];\r
-               \r
-                                       if (compareStr(thisPart, thatPart, caseSensitive) == false)\r
-                                               return URI.NOT_RELATED;\r
-                               }\r
-                               \r
-                               return URI.PARENT;\r
-                       }\r
-                       else\r
-                       {\r
-                               // Both URI's have the same number of path components, but\r
-                               // it failed the equivelence check above.  This means that\r
-                               // the two URI's are not related.\r
-                               return URI.NOT_RELATED;\r
-                       }\r
-                       \r
-                       // If we got here, the scheme and authority are the same,\r
-                       // but the paths pointed to two different locations that\r
-                       // were in different parts of the file system tree\r
-                       return URI.NOT_RELATED;\r
-               }\r
-               \r
-               /**\r
-                * Given another URI, return the common parent between this one\r
-                * and the provided URI.\r
-                * \r
-                * @param uri the other URI from which to find a common parent\r
-                * @para caseSensitive true if this operation should be done\r
-                * with case sensitive comparisons.\r
-                * \r
-                * @return the parent URI if successful, null otherwise.\r
-                */\r
-               public function getCommonParent(uri:URI, caseSensitive:Boolean = true) : URI\r
-               {\r
-                       var thisURI:URI = URI.resolve(this);\r
-                       var thatURI:URI = URI.resolve(uri);\r
-               \r
-                       if(!thisURI.isAbsolute() || !thatURI.isAbsolute() ||\r
-                               thisURI.isHierarchical() == false ||\r
-                               thatURI.isHierarchical() == false)\r
-                       {\r
-                               // Both URI's must be absolute hierarchical for this to\r
-                               // make sense.\r
-                               return null;\r
-                       }\r
-                       \r
-                       var relation:int = thisURI.getRelation(thatURI);\r
-                       if (relation == URI.NOT_RELATED)\r
-                       {\r
-                               // The given URI is not related to this one.  No\r
-                               // common parent.\r
-                               return null;\r
-                       }\r
-               \r
-                       thisURI.chdir(".");\r
-                       thatURI.chdir(".");\r
-                       \r
-                       var strBefore:String, strAfter:String;\r
-                       do\r
-                       {\r
-                               relation = thisURI.getRelation(thatURI, caseSensitive);\r
-                               if(relation == URI.EQUAL || relation == URI.PARENT)\r
-                                       break;\r
-               \r
-                               // If strBefore and strAfter end up being the same,\r
-                               // we know we are at the root of the path because\r
-                               // chdir("..") is doing nothing.\r
-                               strBefore = thisURI.toString();\r
-                               thisURI.chdir("..");\r
-                               strAfter = thisURI.toString();\r
-                       }\r
-                       while(strBefore != strAfter);\r
-               \r
-                       return thisURI;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * This function is used to move around in a URI in a way similar\r
-                * to the 'cd' or 'chdir' commands on Unix.  These operations are\r
-                * completely string based, using the context of the URI to\r
-                * determine the position within the path.  The heuristics used\r
-                * to determine the action are based off Appendix C in RFC 2396.\r
-                * \r
-                * <p>URI paths that end in '/' are considered paths that point to\r
-                * directories, while paths that do not end in '/' are files.  For\r
-                * example, if you execute chdir("d") on the following URI's:<br/>\r
-                *    1.  http://something.com/a/b/c/  (directory)<br/>\r
-                *    2.  http://something.com/a/b/c  (not directory)<br/>\r
-                * you will get:<br/>\r
-                *    1.  http://something.com/a/b/c/d<br/>\r
-                *    2.  http://something.com/a/b/d<br/></p>\r
-                * \r
-                * <p>See RFC 2396, Appendix C for more info.</p>\r
-                * \r
-                * @param reference     the URI or path to "cd" to.\r
-                * @param escape true if the passed reference string should be URI\r
-                * escaped before using it.\r
-                * \r
-                * @return true if the chdir was successful, false otherwise.\r
-                */\r
-               public function chdir(reference:String, escape:Boolean = false) : Boolean\r
-               {\r
-                       var uriReference:URI;\r
-                       var ref:String = reference;\r
-               \r
-                       if (escape)\r
-                               ref = URI.escapeChars(reference);\r
-               \r
-                       if (ref == "")\r
-                       {\r
-                               // NOOP\r
-                               return true;\r
-                       }\r
-                       else if (ref.substr(0, 2) == "//")\r
-                       {\r
-                               // Special case.  This is an absolute URI but without the scheme.\r
-                               // Take the scheme from this URI and tack it on.  This is\r
-                               // intended to make working with chdir() a little more\r
-                               // tolerant.\r
-                               var final:String = this.scheme + ":" + ref;\r
-                               \r
-                               return constructURI(final);\r
-                       }\r
-                       else if (ref.charAt(0) == "?")\r
-                       {\r
-                               // A relative URI that is just a query part is essentially\r
-                               // a "./?query".  We tack on the "./" here to make the rest\r
-                               // of our logic work.\r
-                               ref = "./" + ref;\r
-                       }\r
-               \r
-                       // Parse the reference passed in as a URI.  This way we\r
-                       // get any query and fragments parsed out as well.\r
-                       uriReference = new URI(ref);\r
-               \r
-                       if (uriReference.isAbsolute() ||\r
-                               uriReference.isHierarchical() == false)\r
-                       {\r
-                               // If the URI given is a full URI, it replaces this one.\r
-                               copyURI(uriReference);\r
-                               return true;\r
-                       }\r
-               \r
-               \r
-                       var thisPath:String, thatPath:String;\r
-                       var thisParts:Array, thatParts:Array;\r
-                       var thisIsDir:Boolean = false, thatIsDir:Boolean = false;\r
-                       var thisIsAbs:Boolean = false, thatIsAbs:Boolean = false;\r
-                       var lastIsDotOperation:Boolean = false;\r
-                       var curDir:String;\r
-                       var i:int;\r
-               \r
-                       thisPath = this.path;\r
-                       thatPath = uriReference.path;\r
-               \r
-                       if (thisPath.length > 0)\r
-                               thisParts = thisPath.split("/");\r
-                       else\r
-                               thisParts = new Array();\r
-                               \r
-                       if (thatPath.length > 0)\r
-                               thatParts = thatPath.split("/");\r
-                       else\r
-                               thatParts = new Array();\r
-                       \r
-                       if (thisParts.length > 0 && thisParts[0] == "")\r
-                       {\r
-                               thisIsAbs = true;\r
-                               thisParts.shift(); // pop the first one off the array\r
-                       }\r
-                       if (thisParts.length > 0 && thisParts[thisParts.length - 1] == "")\r
-                       {\r
-                               thisIsDir = true;\r
-                               thisParts.pop();  // pop the last one off the array\r
-                       }\r
-                               \r
-                       if (thatParts.length > 0 && thatParts[0] == "")\r
-                       {\r
-                               thatIsAbs = true;\r
-                               thatParts.shift(); // pop the first one off the array\r
-                       }\r
-                       if (thatParts.length > 0 && thatParts[thatParts.length - 1] == "")\r
-                       {\r
-                               thatIsDir = true;\r
-                               thatParts.pop();  // pop the last one off the array\r
-                       }\r
-                               \r
-                       if (thatIsAbs)\r
-                       {\r
-                               // The reference is an absolute path (starts with a slash).\r
-                               // It replaces this path wholesale.\r
-                               this.path = uriReference.path;\r
-               \r
-                               // And it inherits the query and fragment\r
-                               this.queryRaw = uriReference.queryRaw;\r
-                               this.fragment = uriReference.fragment;\r
-               \r
-                               return true;\r
-                       }\r
-                       else if (thatParts.length == 0 && uriReference.query == "")\r
-                       {\r
-                               // The reference must have only been a fragment.  Fragments just\r
-                               // get appended to whatever the current path is.  We don't want\r
-                               // to overwrite any query that may already exist, so this case\r
-                               // only takes on the new fragment.\r
-                               this.fragment = uriReference.fragment;\r
-                               return true;\r
-                       }\r
-                       else if (thisIsDir == false && thisParts.length > 0)\r
-                       {\r
-                               // This path ends in a file.  It goes away no matter what.\r
-                               thisParts.pop();\r
-                       }\r
-               \r
-                       // By default, this assumes the query and fragment of the reference\r
-                       this.queryRaw = uriReference.queryRaw;\r
-                       this.fragment = uriReference.fragment;\r
-               \r
-                       // Append the parts of the path from the passed in reference\r
-                       // to this object's path.\r
-                       thisParts = thisParts.concat(thatParts);\r
-                                       \r
-                       for(i = 0; i < thisParts.length; i++)\r
-                       {\r
-                               curDir = thisParts[i];\r
-                               lastIsDotOperation = false;\r
-               \r
-                               if (curDir == ".")\r
-                               {\r
-                                       thisParts.splice(i, 1);\r
-                                       i = i - 1;  // account for removing this item\r
-                                       lastIsDotOperation = true;\r
-                               }\r
-                               else if (curDir == "..")\r
-                               {\r
-                                       if (i >= 1)\r
-                                       {\r
-                                               if (thisParts[i - 1] == "..")\r
-                                               {\r
-                                                       // If the previous is a "..", we must have skipped\r
-                                                       // it due to this URI being relative.  We can't\r
-                                                       // collapse leading ".."s in a relative URI, so\r
-                                                       // do nothing.\r
-                                               }\r
-                                               else\r
-                                               {\r
-                                                       thisParts.splice(i - 1, 2);\r
-                                                       i = i - 2;  // move back to account for the 2 we removed\r
-                                               }\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               // This is the first thing in the path.\r
-               \r
-                                               if (isRelative())\r
-                                               {\r
-                                                       // We can't collapse leading ".."s in a relative\r
-                                                       // path.  Do noting.\r
-                                               }\r
-                                               else\r
-                                               {\r
-                                                       // This is an abnormal case.  We have dot-dotted up\r
-                                                       // past the base of our "file system".  This is a\r
-                                                       // case where we had a /path/like/this.htm and were\r
-                                                       // given a path to chdir to like this:\r
-                                                       // ../../../../../../mydir\r
-                                                       // Obviously, it has too many ".." and will take us\r
-                                                       // up beyond the top of the URI.  However, according\r
-                                                       // RFC 2396 Appendix C.2, we should try to handle\r
-                                                       // these abnormal cases appropriately.  In this case,\r
-                                                       // we will do what UNIX command lines do if you are\r
-                                                       // at the root (/) of the filesystem and execute:\r
-                                                       // # cd ../../../../../bin\r
-                                                       // Which will put you in /bin.  Essentially, the extra\r
-                                                       // ".."'s will just get eaten.\r
-               \r
-                                                       thisParts.splice(i, 1);\r
-                                                       i = i - 1;  // account for the ".." we just removed\r
-                                               }\r
-                                       }\r
-               \r
-                                       lastIsDotOperation = true;\r
-                               }\r
-                       }\r
-                       \r
-                       var finalPath:String = "";\r
-               \r
-                       // If the last thing in the path was a "." or "..", then this thing is a\r
-                       // directory.  If the last thing isn't a dot-op, then we don't want to \r
-                       // blow away any information about the directory (hence the "|=" binary\r
-                       // assignment).\r
-                       thatIsDir = thatIsDir || lastIsDotOperation;\r
-               \r
-                       // Reconstruct the path with the abs/dir info we have\r
-                       finalPath = joinPath(thisParts, thisIsAbs, thatIsDir);\r
-               \r
-                       // Set the path (automatically escaping it)\r
-                       this.path = finalPath;\r
-               \r
-                       return true;\r
-               }\r
-               \r
-               /**\r
-                * @private\r
-                * Join an array of path parts back into a URI style path string.\r
-                * This is used by the various path logic functions to recombine\r
-                * a path.  This is different than the standard Array.join()\r
-                * function because we need to take into account the starting and\r
-                * ending path delimiters if this is an absolute path or a\r
-                * directory.\r
-                * \r
-                * @param parts the Array that contains strings of each path part.\r
-                * @param isAbs         true if the given path is absolute\r
-                * @param isDir         true if the given path is a directory\r
-                * \r
-                * @return the combined path string.\r
-                */\r
-               protected function joinPath(parts:Array, isAbs:Boolean, isDir:Boolean) : String\r
-               {\r
-                       var pathStr:String = "";\r
-                       var i:int;\r
-               \r
-                       for (i = 0; i < parts.length; i++)\r
-                       {\r
-                               if (pathStr.length > 0)\r
-                                       pathStr += "/";\r
-               \r
-                               pathStr += parts[i];\r
-                       }\r
-               \r
-                       // If this path is a directory, tack on the directory delimiter,\r
-                       // but only if the path contains something.  Adding this to an\r
-                       // empty path would make it "/", which is an absolute path that\r
-                       // starts at the root.\r
-                       if (isDir && pathStr.length > 0)\r
-                               pathStr += "/";\r
-               \r
-                       if (isAbs)\r
-                               pathStr = "/" + pathStr;\r
-               \r
-                       return pathStr;\r
-               }\r
-               \r
-               /**\r
-                * Given an absolute URI, make this relative URI absolute using\r
-                * the given URI as a base.  This URI instance must be relative\r
-                * and the base_uri must be absolute.\r
-                * \r
-                * @param base_uri      URI to use as the base from which to make\r
-                * this relative URI into an absolute URI.\r
-                * \r
-                * @return true if successful, false otherwise.\r
-                */\r
-               public function makeAbsoluteURI(base_uri:URI) : Boolean\r
-               {\r
-                       if (isAbsolute() || base_uri.isRelative())\r
-                       {\r
-                               // This URI needs to be relative, and the base needs to be\r
-                               // absolute otherwise we won't know what to do!\r
-                               return false;\r
-                       }\r
-               \r
-                       // Make a copy of the base URI.  We don't want to modify\r
-                       // the passed URI.\r
-                       var base:URI = new URI();\r
-                       base.copyURI(base_uri);\r
-               \r
-                       // ChDir on the base URI.  This will preserve any query\r
-                       // and fragment we have.\r
-                       if (base.chdir(toString()) == false)\r
-                               return false;\r
-               \r
-                       // It worked, so copy the base into this one\r
-                       copyURI(base);\r
-               \r
-                       return true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Given a URI to use as a base from which this object should be\r
-                * relative to, convert this object into a relative URI.  For example,\r
-                * if you have:\r
-                * \r
-                * <listing>\r
-                * var uri1:URI = new URI("http://something.com/path/to/some/file.html");\r
-                * var uri2:URI = new URI("http://something.com/path/to/another/file.html");\r
-                * \r
-                * uri1.MakeRelativePath(uri2);</listing>\r
-                * \r
-                * <p>uri1 will have a final value of "../some/file.html"</p>\r
-                * \r
-                * <p>Note! This function is brute force.  If you have two URI's\r
-                * that are completely unrelated, this will still attempt to make\r
-                * the relative URI.  In that case, you will most likely get a\r
-                * relative path that looks something like:</p>\r
-                * \r
-                * <p>../../../../../../some/path/to/my/file.html</p>\r
-                * \r
-                * @param base_uri the URI from which to make this URI relative\r
-                * \r
-                * @return true if successful, false if the base_uri and this URI\r
-                * are not related, of if error.\r
-                */\r
-               public function makeRelativeURI(base_uri:URI, caseSensitive:Boolean = true) : Boolean\r
-               {\r
-                       var base:URI = new URI();\r
-                       base.copyURI(base_uri);\r
-                       \r
-                       var thisParts:Array, thatParts:Array;\r
-                       var finalParts:Array = new Array();\r
-                       var thisPart:String, thatPart:String, finalPath:String;\r
-                       var pathStr:String = this.path;\r
-                       var queryStr:String = this.queryRaw;\r
-                       var fragmentStr:String = this.fragment;\r
-                       var i:int;\r
-                       var diff:Boolean = false;\r
-                       var isDir:Boolean = false;\r
-               \r
-                       if (isRelative())\r
-                       {\r
-                               // We're already relative.\r
-                               return true;\r
-                       }\r
-               \r
-                       if (base.isRelative())\r
-                       {\r
-                               // The base is relative.  A relative base doesn't make sense.\r
-                               return false;\r
-                       }\r
-               \r
-               \r
-                       if ( (isOfType(base_uri.scheme) == false) ||\r
-                               (this.authority != base_uri.authority) )\r
-                       {\r
-                               // The schemes and/or authorities are different.  We can't\r
-                               // make a relative path to something that is completely\r
-                               // unrelated.\r
-                               return false;\r
-                       }\r
-               \r
-                       // Record the state of this URI\r
-                       isDir = isDirectory();\r
-               \r
-                       // We are based of the directory of the given URI.  We need to\r
-                       // make sure the URI is pointing to a directory.  Changing\r
-                       // directory to "." will remove any file name if the base is\r
-                       // not a directory.\r
-                       base.chdir(".");\r
-               \r
-                       thisParts = pathStr.split("/");\r
-                       thatParts = base.path.split("/");\r
-                       \r
-                       if (thisParts.length > 0 && thisParts[0] == "")\r
-                               thisParts.shift();\r
-                       \r
-                       if (thisParts.length > 0 && thisParts[thisParts.length - 1] == "")\r
-                       {\r
-                               isDir = true;\r
-                               thisParts.pop();\r
-                       }\r
-                       \r
-                       if (thatParts.length > 0 && thatParts[0] == "")\r
-                               thatParts.shift();\r
-                       if (thatParts.length > 0 && thatParts[thatParts.length - 1] == "")\r
-                               thatParts.pop();\r
-               \r
-               \r
-                       // Now that we have the paths split into an array of directories,\r
-                       // we can compare the two paths.  We start from the left of side\r
-                       // of the path and start comparing.  When we either run out of\r
-                       // directories (one path is longer than the other), or we find\r
-                       // a directory that is different, we stop.  The remaining parts\r
-                       // of each path is then used to determine the relative path.  For\r
-                       // example, lets say we have:\r
-                       //    path we want to make relative: /a/b/c/d/e.txt\r
-                       //    path to use as base for relative: /a/b/f/\r
-                       //\r
-                       // This loop will start at the left, and remove directories\r
-                       // until we get a mismatch or run off the end of one of them.\r
-                       // In this example, the result will be:\r
-                       //    c/d/e.txt\r
-                       //    f\r
-                       //\r
-                       // For every part left over in the base path, we prepend a ".."\r
-                       // to the relative to get the final path:\r
-                       //   ../c/d/e.txt\r
-                       while(thatParts.length > 0)\r
-                       {\r
-                               if (thisParts.length == 0)\r
-                               {\r
-                                       // we matched all there is to match, we are done.\r
-                                       // This is the case where "this" object is a parent\r
-                                       // path of the given URI.  eg:\r
-                                       //   this.path = /a/b/                          (thisParts)\r
-                                       //   base.path = /a/b/c/d/e/            (thatParts)\r
-                                       break;\r
-                               }\r
-               \r
-                               thisPart = thisParts[0];\r
-                               thatPart = thatParts[0];\r
-               \r
-                               if (compareStr(thisPart, thatPart, caseSensitive))\r
-                               {\r
-                                       thisParts.shift();\r
-                                       thatParts.shift();\r
-                               }\r
-                               else\r
-                                       break;\r
-                       }\r
-               \r
-                       // If there are any path info left from the base URI, that means\r
-                       // **this** object is above the given URI in the file tree.  For\r
-                       // each part left over in the given URI, we need to move up one\r
-                       // directory to get where we are.\r
-                       var dotdot:String = "..";\r
-                       for (i = 0; i < thatParts.length; i++)\r
-                       {\r
-                               finalParts.push(dotdot);\r
-                       }\r
-               \r
-                       // Append the parts of this URI to any dot-dot's we have\r
-                       finalParts = finalParts.concat(thisParts);\r
-               \r
-                       // Join the parts back into a path\r
-                       finalPath = joinPath(finalParts, false /* not absolute */, isDir);\r
-               \r
-                       if (finalPath.length == 0)\r
-                       {\r
-                               // The two URI's are exactly the same.  The proper relative\r
-                               // path is:\r
-                               finalPath = "./";\r
-                       }\r
-               \r
-                       // Set the parts of the URI, preserving the original query and\r
-                       // fragment parts.\r
-                       setParts("", "", "", finalPath, queryStr, fragmentStr);\r
-               \r
-                       return true;\r
-               }\r
-               \r
-               /**\r
-                * Given a string, convert it to a URI.  The string could be a\r
-                * full URI that is improperly escaped, a malformed URI (e.g.\r
-                * missing a protocol like "www.something.com"), a relative URI,\r
-                * or any variation there of.\r
-                * \r
-                * <p>The intention of this function is to take anything that a\r
-                * user might manually enter as a URI/URL and try to determine what\r
-                * they mean.  This function differs from the URI constructor in\r
-                * that it makes some assumptions to make it easy to import user\r
-                * entered URI data.</p>\r
-                * \r
-                * <p>This function is intended to be a helper function.\r
-                * It is not all-knowning and will probably make mistakes\r
-                * when attempting to parse a string of unknown origin.  If\r
-                * your applicaiton is receiving input from the user, your\r
-                * application should already have a good idea what the user\r
-                * should  be entering, and your application should be\r
-                * pre-processing the user's input to make sure it is well formed\r
-                * before passing it to this function.</p>\r
-                * \r
-                * <p>It is assumed that the string given to this function is\r
-                * something the user may have manually entered.  Given this,\r
-                * the URI string is probably unescaped or improperly escaped.\r
-                * This function will attempt to properly escape the URI by\r
-                * using forceEscape().  The result is that a toString() call\r
-                * on a URI that was created from unknownToURI() may not match\r
-                * the input string due to the difference in escaping.</p>\r
-                *\r
-                * @param unknown       a potental URI string that should be parsed\r
-                * and loaded into this object.\r
-                * @param defaultScheme if it is determined that the passed string\r
-                * looks like a URI, but it is missing the scheme part, this\r
-                * string will be used as the missing scheme.\r
-                * \r
-                * @return      true if the given string was successfully parsed into\r
-                * a valid URI object, false otherwise.\r
-                */\r
-               public function unknownToURI(unknown:String, defaultScheme:String = "http") : Boolean\r
-               {\r
-                       var temp:String;\r
-                       \r
-                       if (unknown.length == 0)\r
-                       {\r
-                               this.initialize();\r
-                               return false;\r
-                       }\r
-                       \r
-                       // Some users love the backslash key.  Fix it.\r
-                       unknown = unknown.replace(/\\/g, "/");\r
-                       \r
-                       // Check for any obviously missing scheme.\r
-                       if (unknown.length >= 2)\r
-                       {\r
-                               temp = unknown.substr(0, 2);\r
-                               if (temp == "//")\r
-                                       unknown = defaultScheme + ":" + unknown;\r
-                       }\r
-                       \r
-                       if (unknown.length >= 3)\r
-                       {\r
-                               temp = unknown.substr(0, 3);\r
-                               if (temp == "://")\r
-                                       unknown = defaultScheme + unknown;\r
-                       }\r
-\r
-                       // Try parsing it as a normal URI\r
-                       var uri:URI = new URI(unknown);\r
-               \r
-                       if (uri.isHierarchical() == false)\r
-                       {\r
-                               if (uri.scheme == UNKNOWN_SCHEME)\r
-                               {\r
-                                       this.initialize();\r
-                                       return false;\r
-                               }\r
-               \r
-                               // It's a non-hierarchical URI\r
-                               copyURI(uri);\r
-                               forceEscape();\r
-                               return true;\r
-                       }\r
-                       else if ((uri.scheme != UNKNOWN_SCHEME) &&\r
-                               (uri.scheme.length > 0))\r
-                       {\r
-                               if ( (uri.authority.length > 0) ||\r
-                                       (uri.scheme == "file") )\r
-                               {\r
-                                       // file://... URI\r
-                                       copyURI(uri);\r
-                                       forceEscape();  // ensure proper escaping\r
-                                       return true;\r
-                               }\r
-                               else if (uri.authority.length == 0 && uri.path.length == 0)\r
-                               {\r
-                                       // It's is an incomplete URI (eg "http://")\r
-                                       \r
-                                       setParts(uri.scheme, "", "", "", "", "");\r
-                                       return false;\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               // Possible relative URI.  We can only detect relative URI's\r
-                               // that start with "." or "..".  If it starts with something\r
-                               // else, the parsing is ambiguous.\r
-                               var path:String = uri.path;\r
-               \r
-                               if (path == ".." || path == "." || \r
-                                       (path.length >= 3 && path.substr(0, 3) == "../") ||\r
-                                       (path.length >= 2 && path.substr(0, 2) == "./") )\r
-                               {\r
-                                       // This is a relative URI.\r
-                                       copyURI(uri);\r
-                                       forceEscape();\r
-                                       return true;\r
-                               }\r
-                       }\r
-               \r
-                       // Ok, it looks like we are just a normal URI missing the scheme.  Tack\r
-                       // on the scheme.\r
-                       uri = new URI(defaultScheme + "://" + unknown);\r
-               \r
-                       // Check to see if we are good now\r
-                       if (uri.scheme.length > 0 && uri.authority.length > 0)\r
-                       {\r
-                               // It was just missing the scheme.\r
-                               copyURI(uri);\r
-                               forceEscape();  // Make sure we are properly encoded.\r
-                               return true;\r
-                       }\r
-               \r
-                       // don't know what this is\r
-                       this.initialize();\r
-                       return false;\r
-               }\r
-               \r
-       } // end URI class\r
-} // end package
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as b/platforma/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as
deleted file mode 100644 (file)
index d786b33..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       import flash.utils.ByteArray;\r
-       \r
-       /**\r
-        * This class implements an efficient lookup table for URI\r
-        * character escaping.  This class is only needed if you\r
-        * create a derived class of URI to handle custom URI\r
-        * syntax.  This class is used internally by URI.\r
-        * \r
-        * @langversion ActionScript 3.0\r
-        * @playerversion Flash 9.0* \r
-        */\r
-       public class URIEncodingBitmap extends ByteArray\r
-       {\r
-               /**\r
-                * Constructor.  Creates an encoding bitmap using the given\r
-                * string of characters as the set of characters that need\r
-                * to be URI escaped.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */\r
-               public function URIEncodingBitmap(charsToEscape:String) : void\r
-               {\r
-                       var i:int;\r
-                       var data:ByteArray = new ByteArray();\r
-                       \r
-                       // Initialize our 128 bits (16 bytes) to zero\r
-                       for (i = 0; i < 16; i++)\r
-                               this.writeByte(0);\r
-                               \r
-                       data.writeUTFBytes(charsToEscape);\r
-                       data.position = 0;\r
-                       \r
-                       while (data.bytesAvailable)\r
-                       {\r
-                               var c:int = data.readByte();\r
-                               \r
-                               if (c > 0x7f)\r
-                                       continue;  // only escape low bytes\r
-                                       \r
-                               var enc:int;\r
-                               this.position = (c >> 3);\r
-                               enc = this.readByte();\r
-                               enc |= 1 << (c & 0x7);\r
-                               this.position = (c >> 3);\r
-                               this.writeByte(enc);\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Based on the data table contained in this object, check\r
-                * if the given character should be escaped.\r
-                * \r
-                * @param char  the character to be escaped.  Only the first\r
-                * character in the string is used.  Any other characters\r
-                * are ignored.\r
-                * \r
-                * @return      the integer value of the raw UTF8 character.  For\r
-                * example, if '%' is given, the return value is 37 (0x25).\r
-                * If the character given does not need to be escaped, the\r
-                * return value is zero.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0 \r
-                */\r
-               public function ShouldEscape(char:String) : int\r
-               {\r
-                       var data:ByteArray = new ByteArray();\r
-                       var c:int, mask:int;\r
-                       \r
-                       // write the character into a ByteArray so\r
-                       // we can pull it out as a raw byte value.\r
-                       data.writeUTFBytes(char);\r
-                       data.position = 0;\r
-                       c = data.readByte();\r
-                       \r
-                       if (c & 0x80)\r
-                       {\r
-                               // don't escape high byte characters.  It can make international\r
-                               // URI's unreadable.  We just want to escape characters that would\r
-                               // make URI syntax ambiguous.\r
-                               return 0;\r
-                       }\r
-                       else if ((c < 0x1f) || (c == 0x7f))\r
-                       {\r
-                               // control characters must be escaped.\r
-                               return c;\r
-                       }\r
-                       \r
-                       this.position = (c >> 3);\r
-                       mask = this.readByte();\r
-                       \r
-                       if (mask & (1 << (c & 0x7)))\r
-                       {\r
-                               // we need to escape this, return the numeric value\r
-                               // of the character\r
-                               return c;\r
-                       }\r
-                       else\r
-                       {\r
-                               return 0;\r
-                       }\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as b/platforma/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as
deleted file mode 100644 (file)
index e73e9e7..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.net.proxies\r
-{\r
-       import flash.events.Event;\r
-       import flash.events.IOErrorEvent;\r
-       import flash.events.ProgressEvent;\r
-       import flash.net.Socket;\r
-\r
-       /**\r
-        * This class allows TCP socket connections through HTTP proxies in accordance with\r
-        * RFC 2817:\r
-        * \r
-        * ftp://ftp.rfc-editor.org/in-notes/rfc2817.txt\r
-        * \r
-        * It can also be used to make direct connections to a destination, as well. If you\r
-        * pass the host and port into the constructor, no proxy will be used. You can also\r
-        * call connect, passing in the host and the port, and if you didn't set the proxy\r
-        * info, a direct connection will be made. A proxy is only used after you have called\r
-        * the setProxyInfo function.\r
-        * \r
-        * The connection to and negotiation with the proxy is completely hidden. All the\r
-        * same events are thrown whether you are using a proxy or not, and the data you\r
-        * receive from the target server will look exact as it would if you were connected\r
-        * to it directly rather than through a proxy.\r
-        * \r
-        * @author Christian Cantrell\r
-        * \r
-        **/\r
-       public class RFC2817Socket\r
-               extends Socket\r
-       {\r
-               private var proxyHost:String = null;\r
-               private var host:String = null;\r
-               private var proxyPort:int = 0;\r
-               private var port:int = 0;\r
-               private var deferredEventHandlers:Object = new Object();\r
-               private var buffer:String = new String();\r
-\r
-               /**\r
-                * Construct a new RFC2817Socket object. If you pass in the host and the port,\r
-                * no proxy will be used. If you want to use a proxy, instantiate with no\r
-                * arguments, call setProxyInfo, then call connect.\r
-                **/\r
-               public function RFC2817Socket(host:String = null, port:int = 0)\r
-               {\r
-                       super(host, port);\r
-               }\r
-               \r
-               /**\r
-                * Set the proxy host and port number. Your connection will only proxied if\r
-                * this function has been called.\r
-                **/\r
-               public function setProxyInfo(host:String, port:int):void\r
-               {\r
-                       this.proxyHost = host;\r
-                       this.proxyPort = port;\r
-\r
-                       var deferredSocketDataHandler:Object = this.deferredEventHandlers[ProgressEvent.SOCKET_DATA];\r
-                       var deferredConnectHandler:Object = this.deferredEventHandlers[Event.CONNECT];\r
-\r
-                       if (deferredSocketDataHandler != null)\r
-                       {\r
-                               super.removeEventListener(ProgressEvent.SOCKET_DATA, deferredSocketDataHandler.listener, deferredSocketDataHandler.useCapture);\r
-                       }\r
-\r
-                       if (deferredConnectHandler != null)\r
-                       {\r
-                               super.removeEventListener(Event.CONNECT, deferredConnectHandler.listener, deferredConnectHandler.useCapture);\r
-                       }\r
-               }\r
-               \r
-               /**\r
-                * Connect to the specified host over the specified port. If you want your\r
-                * connection proxied, call the setProxyInfo function first.\r
-                **/\r
-               public override function connect(host:String, port:int):void\r
-               {\r
-                       if (this.proxyHost == null)\r
-                       {\r
-                               this.redirectConnectEvent();\r
-                               this.redirectSocketDataEvent();\r
-                               super.connect(host, port);\r
-                       }\r
-                       else\r
-                       {\r
-                               this.host = host;\r
-                               this.port = port;\r
-                               super.addEventListener(Event.CONNECT, this.onConnect);\r
-                               super.addEventListener(ProgressEvent.SOCKET_DATA, this.onSocketData);\r
-                               super.connect(this.proxyHost, this.proxyPort);\r
-                       }\r
-               }\r
-\r
-               private function onConnect(event:Event):void\r
-               {\r
-                       this.writeUTFBytes("CONNECT "+this.host+":"+this.port+" HTTP/1.1\n\n");\r
-                       this.flush();\r
-                       this.redirectConnectEvent();\r
-               }\r
-               \r
-               private function onSocketData(event:ProgressEvent):void\r
-               {\r
-                       while (this.bytesAvailable != 0)\r
-                       {\r
-                               this.buffer += this.readUTFBytes(1);\r
-                               if (this.buffer.search(/\r?\n\r?\n$/) != -1)\r
-                               {\r
-                                       this.checkResponse(event);\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               private function checkResponse(event:ProgressEvent):void\r
-               {\r
-                       var responseCode:String = this.buffer.substr(this.buffer.indexOf(" ")+1, 3);\r
-\r
-                       if (responseCode.search(/^2/) == -1)\r
-                       {\r
-                               var ioError:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);\r
-                               ioError.text = "Error connecting to the proxy ["+this.proxyHost+"] on port ["+this.proxyPort+"]: " + this.buffer;\r
-                               this.dispatchEvent(ioError);\r
-                       }\r
-                       else\r
-                       {\r
-                               this.redirectSocketDataEvent();\r
-                               this.dispatchEvent(new Event(Event.CONNECT));\r
-                               if (this.bytesAvailable > 0)\r
-                               {\r
-                                       this.dispatchEvent(event);\r
-                               }\r
-                       }\r
-                       this.buffer = null;\r
-               }\r
-               \r
-               private function redirectConnectEvent():void\r
-               {\r
-                       super.removeEventListener(Event.CONNECT, onConnect);\r
-                       var deferredEventHandler:Object = this.deferredEventHandlers[Event.CONNECT];\r
-                       if (deferredEventHandler != null)\r
-                       {\r
-                               super.addEventListener(Event.CONNECT, deferredEventHandler.listener, deferredEventHandler.useCapture, deferredEventHandler.priority, deferredEventHandler.useWeakReference);                    \r
-                       }\r
-               }\r
-               \r
-               private function redirectSocketDataEvent():void\r
-               {\r
-                       super.removeEventListener(ProgressEvent.SOCKET_DATA, onSocketData);\r
-                       var deferredEventHandler:Object = this.deferredEventHandlers[ProgressEvent.SOCKET_DATA];\r
-                       if (deferredEventHandler != null)\r
-                       {\r
-                               super.addEventListener(ProgressEvent.SOCKET_DATA, deferredEventHandler.listener, deferredEventHandler.useCapture, deferredEventHandler.priority, deferredEventHandler.useWeakReference);                        \r
-                       }\r
-               }\r
-               \r
-               public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int=0.0, useWeakReference:Boolean=false):void\r
-               {\r
-                       if (type == Event.CONNECT || type == ProgressEvent.SOCKET_DATA)\r
-                       {\r
-                               this.deferredEventHandlers[type] = {listener:listener,useCapture:useCapture, priority:priority, useWeakReference:useWeakReference};\r
-                       }\r
-                       else\r
-                       {\r
-                               super.addEventListener(type, listener, useCapture, priority, useWeakReference);\r
-                       }\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as
deleted file mode 100644 (file)
index 0ddeef5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       public class Database\r
-       {\r
-               private var _name:String;\r
-               private var _description:String;\r
-\r
-               public function Database(name:String, description:String)\r
-               {\r
-                       this._name = name;\r
-                       this._description = description;\r
-               }\r
-\r
-               public function set name(name:String):void\r
-               {\r
-                       this._name = name;\r
-               }\r
-\r
-               public function get name():String\r
-               {\r
-                       return this._name;\r
-               }\r
-\r
-               public function set description(description:String):void\r
-               {\r
-                       this._description = description;\r
-               }\r
-\r
-               public function get description():String\r
-               {\r
-                       return this._description;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as
deleted file mode 100644 (file)
index 934a330..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       public class Definition\r
-       {\r
-               private var _definition:String;\r
-               private var _database:String;\r
-               private var _term:String;\r
-               \r
-               public function set definition(definition:String):void\r
-               {\r
-                       this._definition = definition;\r
-               }\r
-               \r
-               public function get definition():String\r
-               {\r
-                       return this._definition;\r
-               }\r
-\r
-               public function set database(database:String):void\r
-               {\r
-                       this._database = database;\r
-               }\r
-               \r
-               public function get database():String\r
-               {\r
-                       return this._database;\r
-               }\r
-\r
-               public function set term(term:String):void\r
-               {\r
-                       this._term = term;\r
-               }\r
-               \r
-               public function get term():String\r
-               {\r
-                       return this._term;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as
deleted file mode 100644 (file)
index 07d2530..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       import com.adobe.protocols.dict.events.*;\r
-       import com.adobe.protocols.dict.util.*;\r
-       \r
-       import flash.events.Event;\r
-       import flash.events.EventDispatcher;\r
-       import flash.events.IOErrorEvent;\r
-       import flash.events.ProgressEvent;\r
-       import flash.events.SecurityErrorEvent;\r
-       import flash.net.Socket;\r
-       import mx.rpc.http.HTTPService;\r
-       import mx.rpc.events.ResultEvent;\r
-       import mx.rpc.events.FaultEvent;\r
-       import flash.xml.XMLNode;\r
-       import mx.utils.StringUtil;\r
-\r
-       public class Dict\r
-               extends EventDispatcher\r
-       {\r
-               // Event type names.\r
-               public static var CONNECTED:String = "connected";\r
-               public static var DISCONNECTED:String = "disconnected";\r
-               public static var IO_ERROR:String = IOErrorEvent.IO_ERROR;\r
-               public static var ERROR:String = "error";\r
-               public static var SERVERS:String = "servers";\r
-               public static var DATABASES:String = "databases";\r
-               public static var MATCH_STRATEGIES:String = "matchStrategies";\r
-               public static var DEFINITION:String = "definition";\r
-               public static var DEFINITION_HEADER:String = "definitionHeader";\r
-               public static var MATCH:String = "match";\r
-               public static var NO_MATCH:String = "noMatch";\r
-\r
-               public static var FIRST_MATCH:uint = 0;\r
-               public static var ALL_DATABASES:uint = 1;\r
-\r
-               private var socket:SocketHelper;\r
-               \r
-               private var dbShortList:Boolean;\r
-\r
-               public function Dict()\r
-               {\r
-                       this.socket = new SocketHelper();\r
-                       this.socket.addEventListener(Event.CONNECT, connected);\r
-                       this.socket.addEventListener(Event.CLOSE, disconnected);\r
-                       this.socket.addEventListener(SocketHelper.COMPLETE_RESPONSE, incomingData);\r
-                       this.socket.addEventListener(IOErrorEvent.IO_ERROR, ioError);\r
-                       this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityError);\r
-               }\r
-\r
-               public function connect(server:String, port:uint = 2628):void\r
-               {\r
-                       if (this.socket.connected)\r
-                       {\r
-                               this.socket.close();\r
-                       }\r
-                       this.socket.connect(server, port);\r
-               }\r
-\r
-               public function connectThroughProxy(proxyServer:String,\r
-                                                                                       proxyPort:int,\r
-                                                                                       server:String,\r
-                                                                                       port:uint = 2628):void\r
-               {\r
-                       if (this.socket.connected)\r
-                       {\r
-                               this.socket.close();\r
-                       }\r
-                       this.socket.setProxyInfo(proxyServer, proxyPort);\r
-                       this.socket.connect(server, port);\r
-               }\r
-\r
-               public function disconnect():void\r
-               {\r
-                       this.socket.close();\r
-                       this.disconnected(null);\r
-               }\r
-\r
-               public function getServers():void\r
-               {\r
-                       var http:HTTPService = new HTTPService();\r
-                       http.url = "http://luetzschena-stahmeln.de/dictd/xmllist.php";\r
-                       http.addEventListener(ResultEvent.RESULT, incomingServerXML);\r
-                       http.addEventListener(FaultEvent.FAULT, httpError);\r
-                       http.resultFormat = HTTPService.RESULT_FORMAT_E4X;\r
-                       http.send();\r
-               }\r
-\r
-               public function getDatabases(shortList:Boolean=true):void\r
-               {\r
-                       this.dbShortList = shortList;\r
-                       this.socket.writeUTFBytes("show db\r\n");\r
-                       this.socket.flush();\r
-               }\r
-\r
-               public function getMatchStrategies():void\r
-               {\r
-                       this.socket.writeUTFBytes("show strat\r\n");\r
-                       this.socket.flush();\r
-               }\r
-\r
-               public function match(database:String, term:String, scope:String="prefix"):void\r
-               {\r
-                       this.socket.writeUTFBytes("match " + database + " " + scope + " \"" + term + "\"\r\n");\r
-                       this.socket.flush();\r
-               }\r
-\r
-               public function define(database:String, term:String):void\r
-               {\r
-                       this.socket.writeUTFBytes("define " + database + " \"" + term + "\"\r\n");\r
-                       this.socket.flush();\r
-               }\r
-\r
-               public function lookup(term:String, scope:uint):void\r
-               {\r
-                       var flag:String;\r
-                       if (scope == Dict.ALL_DATABASES)\r
-                       {\r
-                               flag = "*";\r
-                       }\r
-                       else if (scope == Dict.FIRST_MATCH)\r
-                       {\r
-                               flag = "!";\r
-                       }\r
-                       this.socket.writeUTFBytes("define " + flag + " \"" + term + "\"\r\n");\r
-                       this.socket.flush();\r
-               }\r
-\r
-               //// Private functions ////\r
-\r
-               private function connected(event:Event):void\r
-               {\r
-               // Wait to dispatch an event until we get the 220 response.\r
-       }\r
-\r
-               private function disconnected(event:Event):void\r
-               {\r
-               dispatchEvent(new DisconnectedEvent());\r
-       }\r
-\r
-               private function incomingServerXML(event:ResultEvent):void\r
-               {\r
-                       var dictd:Namespace = new Namespace("http://www.luetzschena-stahmeln.de/dictd/");\r
-                       var result:XML = event.result as XML;\r
-                       var server:String, description:String;\r
-                       var servers:Array = new Array();\r
-                       for each (var serverNode:XML in result.dictd::server)\r
-                       {\r
-                               server = serverNode.dictd::dictdurl;\r
-                               description = serverNode.dictd::description;\r
-                               if (StringUtil.trim(server).length != 0 &&\r
-                                       StringUtil.trim(description).length != 0)\r
-                               {\r
-                                       var dServer:DictionaryServer = new DictionaryServer();\r
-                                       dServer.server = server.replace("dict://", "");\r
-                                       dServer.description = description;\r
-                                       servers.push(dServer);\r
-                               }\r
-                       }\r
-                       var dEvent:DictionaryServerEvent = new DictionaryServerEvent();\r
-                       dEvent.servers = servers;\r
-                       dispatchEvent(dEvent);\r
-               }\r
-\r
-               private function incomingData(event:CompleteResponseEvent):void\r
-               {                       \r
-                       var rawResponse:String = event.response;\r
-                       var response:Response = this.parseRawResponse(rawResponse);\r
-                       var responseCode:uint = response.code;\r
-                       if (responseCode == 552) // no matches\r
-                       {\r
-                               throwNoMatchEvent(response);\r
-                       }\r
-                       else if (responseCode >= 400 && responseCode <= 599) // error\r
-                       {\r
-                               throwErrorEvent(response);\r
-                       }\r
-                       else if (responseCode == 220) // successful connection\r
-                       {\r
-                               dispatchEvent(new ConnectedEvent());\r
-                       }\r
-                       else if (responseCode == 110) // databases are being returned\r
-                       {\r
-                               throwDatabasesEvent(response);                          \r
-                       }\r
-                       else if (responseCode == 111) // matches strategies\r
-                       {\r
-                               throwMatchStrategiesEvent(response);\r
-                       }\r
-                       else if (responseCode == 152) // matches\r
-                       {\r
-                               throwMatchEvent(response);\r
-                       }\r
-                       else if (responseCode == 150)\r
-                       {\r
-                               throwDefinitionHeaderEvent(response);\r
-                       }\r
-                       else if (responseCode == 151)\r
-                       {\r
-                               throwDefinitionEvent(response);\r
-                       }\r
-       }\r
-\r
-       private function ioError(event:IOErrorEvent):void\r
-       {\r
-                       dispatchEvent(event);\r
-       }\r
-\r
-       private function httpError(event:FaultEvent):void\r
-       {\r
-               trace("httpError!");\r
-       }\r
-\r
-       private function securityError(event:SecurityErrorEvent):void\r
-       {\r
-               trace("security error!");\r
-               trace(event.text);\r
-       }\r
-\r
-       // Dispatch new events.\r
-\r
-       private function throwDatabasesEvent(response:Response):void\r
-       {\r
-                       var databases:Array = new Array();\r
-                       var responseArray:Array = response.body.split("\r\n");\r
-               for each (var line:String in responseArray)\r
-               {\r
-                       var name:String = line.substring(0, line.indexOf(" "));\r
-                       if (name == "--exit--")\r
-                       {\r
-                               if (this.dbShortList)\r
-                               {\r
-                                       break;\r
-                               }\r
-                               continue;\r
-                       }\r
-                       var description:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
-                       databases.push(new Database(name, description));\r
-               }\r
-               var event:DatabaseEvent = new DatabaseEvent();\r
-               event.databases = databases;\r
-               dispatchEvent(event);\r
-       }\r
-\r
-       private function throwMatchStrategiesEvent(response:Response):void\r
-       {\r
-                       var strategies:Array = new Array();\r
-                       var responseArray:Array = response.body.split("\r\n");\r
-               for each (var line:String in responseArray)\r
-               {\r
-                       var name:String = line.substring(0, line.indexOf(" "));\r
-                       var description:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
-                       strategies.push(new MatchStrategy(name, description));\r
-               }\r
-               var event:MatchStrategiesEvent = new MatchStrategiesEvent();\r
-               event.strategies = strategies;\r
-               dispatchEvent(event);\r
-       }\r
-\r
-       private function throwMatchEvent(response:Response):void\r
-       {\r
-                       var matches:Array = new Array();\r
-                       var responseArray:Array = response.body.split("\r\n");\r
-               for each (var line:String in responseArray)\r
-               {\r
-                       var match:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
-                       matches.push(match);\r
-               }\r
-               var event:MatchEvent = new MatchEvent();\r
-               event.matches = matches;\r
-               dispatchEvent(event);\r
-       }\r
-\r
-       private function throwErrorEvent(response:Response):void\r
-       {\r
-               var event:ErrorEvent = new ErrorEvent();\r
-               event.code = response.code;\r
-               event.message = response.headerText;\r
-                       dispatchEvent(event);\r
-       }\r
-\r
-       private function throwNoMatchEvent(response:Response):void\r
-       {\r
-                       dispatchEvent(new NoMatchEvent());\r
-       }\r
-\r
-       private function throwDefinitionHeaderEvent(response:Response):void\r
-       {\r
-                       var event:DefinitionHeaderEvent = new DefinitionHeaderEvent();\r
-                       event.definitionCount = uint(response.headerText.substring(0, response.headerText.indexOf(" ")));\r
-                       dispatchEvent(event);\r
-       }\r
-\r
-       private function throwDefinitionEvent(response:Response):void\r
-       {\r
-               var event:DefinitionEvent = new DefinitionEvent();\r
-               var def:Definition = new Definition();\r
-               var headerText:String = response.headerText;\r
-               var tokens:Array = headerText.match(/"[^"]+"/g);\r
-               def.term = String(tokens[0]).replace(/"/g, "");\r
-               def.database = String(tokens[1]).replace(/"/g, "");\r
-               def.definition = response.body;\r
-               event.definition = def;\r
-                       dispatchEvent(event);\r
-       }\r
-\r
-       private function parseRawResponse(rawResponse:String):Response\r
-       {\r
-               var response:Response = new Response();\r
-               var fullHeader:String;\r
-               if (rawResponse.indexOf("\r\n") != -1)\r
-               {\r
-                       fullHeader = rawResponse.substring(0, rawResponse.indexOf("\r\n"));\r
-               }\r
-               else\r
-               {\r
-                       fullHeader = rawResponse;\r
-               }\r
-               var responseCodeMatch:Array = fullHeader.match(/^\d{3}/);\r
-               response.code = uint(responseCodeMatch[0]);\r
-               response.headerText = fullHeader.substring(fullHeader.indexOf(" ")+1, fullHeader.length);\r
-                       var body:String = rawResponse.substring(rawResponse.indexOf("\r\n")+2, rawResponse.length);\r
-                       body = body.replace(/\r\n\.\./, "\r\n.");\r
-                       response.body = body;\r
-               return response;\r
-       }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as
deleted file mode 100644 (file)
index 422b603..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       public class DictionaryServer\r
-       {\r
-               private var _server:String;\r
-               private var _description:String;\r
-\r
-               public function set server(server:String):void\r
-               {\r
-                       this._server = server;\r
-               }\r
-               \r
-               public function get server():String\r
-               {\r
-                       return this._server;\r
-               }\r
-\r
-               public function set description(description:String):void\r
-               {\r
-                       this._description = description;\r
-               }\r
-               \r
-               public function get description():String\r
-               {\r
-                       return this._description;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as
deleted file mode 100644 (file)
index 1e17da3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       public class MatchStrategy\r
-       {\r
-               private var _name:String;\r
-               private var _description:String;\r
-\r
-               public function MatchStrategy(name:String, description:String)\r
-               {\r
-                       this._name = name;\r
-                       this._description = description;\r
-               }\r
-\r
-               public function set name(name:String):void\r
-               {\r
-                       this._name = name;\r
-               }\r
-\r
-               public function get name():String\r
-               {\r
-                       return this._name;\r
-               }\r
-\r
-               public function set description(description:String):void\r
-               {\r
-                       this._description = description;\r
-               }\r
-\r
-               public function get description():String\r
-               {\r
-                       return this._description;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as
deleted file mode 100644 (file)
index 619a8e9..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.adobe.protocols.dict\r
-{\r
-       public class Response\r
-       {\r
-               private var _code:uint;\r
-               private var _headerText:String;\r
-               private var _body:String;\r
-\r
-               public function set code(code:uint):void\r
-               {\r
-                       this._code = code;\r
-               }\r
-\r
-               public function set headerText(headerText:String):void\r
-               {\r
-                       this._headerText = headerText;\r
-               }\r
-\r
-               public function set body(body:String):void\r
-               {\r
-                       this._body = body;\r
-               }\r
-\r
-               public function get code():uint\r
-               {\r
-                       return this._code;\r
-               }\r
-\r
-               public function get headerText():String\r
-               {\r
-                       return this._headerText;\r
-               }\r
-\r
-               public function get body():String\r
-               {\r
-                       return this._body;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as
deleted file mode 100644 (file)
index c4a4145..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class ConnectedEvent extends Event\r
-       {\r
-               public function ConnectedEvent()\r
-               {\r
-                       super(Dict.CONNECTED);\r
-               }\r
-               \r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as
deleted file mode 100644 (file)
index fdd2cc1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class DatabaseEvent\r
-               extends Event\r
-       {\r
-               private var _databases:Array;\r
-               \r
-               public function DatabaseEvent()\r
-               {\r
-                       super(Dict.DATABASES);\r
-               }\r
-               \r
-               public function set databases(databases:Array):void\r
-               {\r
-                       this._databases = databases;\r
-               }\r
-               \r
-               public function get databases():Array\r
-               {\r
-                       return this._databases;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as
deleted file mode 100644 (file)
index 8107173..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-       import com.adobe.protocols.dict.Definition;\r
-\r
-       public class DefinitionEvent\r
-               extends Event\r
-       {\r
-               private var _definition:Definition;\r
-               \r
-               public function DefinitionEvent()\r
-               {\r
-                       super(Dict.DEFINITION);\r
-               }\r
-               \r
-               public function set definition(definition:Definition):void\r
-               {\r
-                       this._definition = definition;\r
-               }\r
-               \r
-               public function get definition():Definition\r
-               {\r
-                       return this._definition;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as
deleted file mode 100644 (file)
index e77c402..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class DefinitionHeaderEvent\r
-               extends Event\r
-       {\r
-               private var _definitionCount:uint;\r
-               \r
-               public function DefinitionHeaderEvent()\r
-               {\r
-                       super(Dict.DEFINITION_HEADER);\r
-               }\r
-               \r
-               public function set definitionCount(definitionCount:uint):void\r
-               {\r
-                       this._definitionCount = definitionCount;\r
-               }\r
-               \r
-               public function get definitionCount():uint\r
-               {\r
-                       return this._definitionCount;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as
deleted file mode 100644 (file)
index 9b406e9..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class DictionaryServerEvent\r
-               extends Event\r
-       {\r
-               private var _servers:Array;\r
-               \r
-               public function DictionaryServerEvent()\r
-               {\r
-                       super(Dict.SERVERS);\r
-               }\r
-               \r
-               public function set servers(servers:Array):void\r
-               {\r
-                       this._servers = servers;\r
-               }\r
-               \r
-               public function get servers():Array\r
-               {\r
-                       return this._servers;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as
deleted file mode 100644 (file)
index 485b3ed..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class DisconnectedEvent extends Event\r
-       {\r
-               public function DisconnectedEvent()\r
-               {\r
-                       super(Dict.DISCONNECTED);\r
-               }\r
-               \r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as
deleted file mode 100644 (file)
index 9e5fc7a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-       \r
-       public class ErrorEvent\r
-               extends Event\r
-       {\r
-               private var _code:uint;\r
-               private var _message:String;\r
-               \r
-               public function ErrorEvent()\r
-               {\r
-                       super(Dict.ERROR);\r
-               }\r
-\r
-               public function set code(code:uint):void\r
-               {\r
-                       this._code = code;\r
-               }\r
-\r
-               public function set message(message:String):void\r
-               {\r
-                       this._message = message;\r
-               }\r
-\r
-               public function get code():uint\r
-               {\r
-                       return this._code;\r
-               }\r
-\r
-               public function get message():String\r
-               {\r
-                       return this._message;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as
deleted file mode 100644 (file)
index 65b8688..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class MatchEvent\r
-               extends Event\r
-       {\r
-               private var _matches:Array;\r
-               \r
-               public function MatchEvent()\r
-               {\r
-                       super(Dict.MATCH);\r
-               }\r
-               \r
-               public function set matches(matches:Array):void\r
-               {\r
-                       this._matches = matches;\r
-               }\r
-               \r
-               public function get matches():Array\r
-               {\r
-                       return this._matches;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as
deleted file mode 100644 (file)
index 75b76f8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class MatchStrategiesEvent\r
-               extends Event\r
-       {\r
-               private var _strategies:Array;\r
-               \r
-               public function MatchStrategiesEvent()\r
-               {\r
-                       super(Dict.MATCH_STRATEGIES);\r
-               }\r
-               \r
-               public function set strategies(strategies:Array):void\r
-               {\r
-                       this._strategies = strategies;\r
-               }\r
-               \r
-               public function get strategies():Array\r
-               {\r
-                       return this._strategies;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as
deleted file mode 100644 (file)
index 894d1ae..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.adobe.protocols.dict.events\r
-{\r
-       import flash.events.Event;\r
-       import com.adobe.protocols.dict.Dict;\r
-\r
-       public class NoMatchEvent\r
-               extends Event\r
-       {\r
-               public function NoMatchEvent()\r
-               {\r
-                       super(Dict.NO_MATCH);\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as
deleted file mode 100644 (file)
index fc552f1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.adobe.protocols.dict.util\r
-{\r
-       import flash.events.Event;\r
-\r
-       public class CompleteResponseEvent\r
-               extends Event\r
-       {\r
-               private var _response:String;\r
-\r
-               public function CompleteResponseEvent()\r
-               {\r
-                       super(SocketHelper.COMPLETE_RESPONSE);\r
-               }\r
-\r
-               public function set response(response:String):void\r
-               {\r
-                       this._response = response;\r
-               }\r
-               \r
-               public function get response():String\r
-               {\r
-                       return this._response;\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as b/platforma/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as
deleted file mode 100644 (file)
index feb494b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.adobe.protocols.dict.util\r
-{\r
-       import com.adobe.net.proxies.RFC2817Socket;\r
-       import flash.events.ProgressEvent;\r
-\r
-       public class SocketHelper\r
-               extends RFC2817Socket\r
-       {\r
-               private var terminator:String = "\r\n.\r\n";\r
-               private var buffer:String;\r
-               public static var COMPLETE_RESPONSE:String = "completeResponse";\r
-\r
-               public function SocketHelper()\r
-               {\r
-                       super();\r
-                       buffer = new String();\r
-                       addEventListener(ProgressEvent.SOCKET_DATA, incomingData);\r
-               }\r
-\r
-               private function incomingData(event:ProgressEvent):void\r
-               {\r
-                       buffer += readUTFBytes(bytesAvailable);\r
-                       buffer = buffer.replace(/250[^\r\n]+\r\n/, ""); // Get rid of all 250s. Don't need them.\r
-                       var codeStr:String = buffer.substring(0, 3);\r
-                       if (!isNaN(parseInt(codeStr)))\r
-                       {\r
-                               var code:uint = uint(codeStr);\r
-                               if (code == 150 || code >= 200)\r
-                               {\r
-                                       buffer = buffer.replace("\r\n", this.terminator);\r
-                               }\r
-                       }\r
-\r
-                       while (buffer.indexOf(this.terminator) != -1)\r
-                       {\r
-                               var chunk:String = buffer.substring(0, buffer.indexOf(this.terminator));\r
-                               buffer = buffer.substring(chunk.length + this.terminator.length, buffer.length);\r
-                               throwResponseEvent(chunk);\r
-                       }\r
-               }\r
-               \r
-               private function throwResponseEvent(response:String):void\r
-               {\r
-                       var responseEvent:CompleteResponseEvent = new CompleteResponseEvent();\r
-                       responseEvent.response = response;\r
-                       dispatchEvent(responseEvent);                   \r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as
deleted file mode 100644 (file)
index bfee6d9..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       /**\r
-        * This class provides encoding and decoding of the JSON format.\r
-        *\r
-        * Example usage:\r
-        * <code>\r
-        *              // create a JSON string from an internal object\r
-        *              JSON.encode( myObject );\r
-        *\r
-        *              // read a JSON string into an internal object\r
-        *              var myObject:Object = JSON.decode( jsonString );\r
-        *      </code>\r
-        */\r
-       public class JSON {\r
-       \r
-       \r
-               /**\r
-                * Encodes a object into a JSON string.\r
-                *\r
-                * @param o The object to create a JSON string for\r
-                * @return the JSON string representing o\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function encode( o:Object ):String {\r
-                       \r
-                       var encoder:JSONEncoder = new JSONEncoder( o );\r
-                       return encoder.getString();\r
-               \r
-               }\r
-               \r
-               /**\r
-                * Decodes a JSON string into a native object.\r
-                * \r
-                * @param s The JSON string representing the object\r
-                * @return A native object as specified by s\r
-                * @throw JSONParseError\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function decode( s:String ):* {\r
-                       \r
-                       var decoder:JSONDecoder = new JSONDecoder( s )\r
-                       return decoder.getValue();\r
-                       \r
-               }\r
-       \r
-       }\r
-\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as
deleted file mode 100644 (file)
index 82ade19..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       public class JSONDecoder {\r
-               \r
-               /** The value that will get parsed from the JSON string */\r
-               private var value:*;\r
-               \r
-               /** The tokenizer designated to read the JSON string */\r
-               private var tokenizer:JSONTokenizer;\r
-               \r
-               /** The current token from the tokenizer */\r
-               private var token:JSONToken;\r
-               \r
-               /**\r
-                * Constructs a new JSONDecoder to parse a JSON string \r
-                * into a native object.\r
-                *\r
-                * @param s The JSON string to be converted\r
-                *              into a native object\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function JSONDecoder( s:String ) {\r
-                       \r
-                       tokenizer = new JSONTokenizer( s );\r
-                       \r
-                       nextToken();\r
-                       value = parseValue();\r
-               }\r
-               \r
-               /**\r
-                * Gets the internal object that was created by parsing\r
-                * the JSON string passed to the constructor.\r
-                *\r
-                * @return The internal object representation of the JSON\r
-                *              string that was passed to the constructor\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function getValue():* {\r
-                       return value;\r
-               }\r
-               \r
-               /**\r
-                * Returns the next token from the tokenzier reading\r
-                * the JSON string\r
-                */\r
-               private function nextToken():JSONToken {\r
-                       return token = tokenizer.getNextToken();\r
-               }\r
-               \r
-               /**\r
-                * Attempt to parse an array\r
-                */\r
-               private function parseArray():Array {\r
-                       // create an array internally that we're going to attempt\r
-                       // to parse from the tokenizer\r
-                       var a:Array = new Array();\r
-                       \r
-                       // grab the next token from the tokenizer to move\r
-                       // past the opening [\r
-                       nextToken();\r
-                       \r
-                       // check to see if we have an empty array\r
-                       if ( token.type == JSONTokenType.RIGHT_BRACKET ) {\r
-                               // we're done reading the array, so return it\r
-                               return a;\r
-                       }\r
-                       \r
-                       // deal with elements of the array, and use an "infinite"\r
-                       // loop because we could have any amount of elements\r
-                       while ( true ) {\r
-                               // read in the value and add it to the array\r
-                               a.push ( parseValue() );\r
-                       \r
-                               // after the value there should be a ] or a ,\r
-                               nextToken();\r
-                               \r
-                               if ( token.type == JSONTokenType.RIGHT_BRACKET ) {\r
-                                       // we're done reading the array, so return it\r
-                                       return a;\r
-                               } else if ( token.type == JSONTokenType.COMMA ) {\r
-                                       // move past the comma and read another value\r
-                                       nextToken();\r
-                               } else {\r
-                                       tokenizer.parseError( "Expecting ] or , but found " + token.value );\r
-                               }\r
-                       }\r
-            return null;\r
-               }\r
-               \r
-               /**\r
-                * Attempt to parse an object\r
-                */\r
-               private function parseObject():Object {\r
-                       // create the object internally that we're going to\r
-                       // attempt to parse from the tokenizer\r
-                       var o:Object = new Object();\r
-                                               \r
-                       // store the string part of an object member so\r
-                       // that we can assign it a value in the object\r
-                       var key:String\r
-                       \r
-                       // grab the next token from the tokenizer\r
-                       nextToken();\r
-                       \r
-                       // check to see if we have an empty object\r
-                       if ( token.type == JSONTokenType.RIGHT_BRACE ) {\r
-                               // we're done reading the object, so return it\r
-                               return o;\r
-                       }\r
-                       \r
-                       // deal with members of the object, and use an "infinite"\r
-                       // loop because we could have any amount of members\r
-                       while ( true ) {\r
-                       \r
-                               if ( token.type == JSONTokenType.STRING ) {\r
-                                       // the string value we read is the key for the object\r
-                                       key = String( token.value );\r
-                                       \r
-                                       // move past the string to see what's next\r
-                                       nextToken();\r
-                                       \r
-                                       // after the string there should be a :\r
-                                       if ( token.type == JSONTokenType.COLON ) {\r
-                                               \r
-                                               // move past the : and read/assign a value for the key\r
-                                               nextToken();\r
-                                               o[key] = parseValue();  \r
-                                               \r
-                                               // move past the value to see what's next\r
-                                               nextToken();\r
-                                               \r
-                                               // after the value there's either a } or a ,\r
-                                               if ( token.type == JSONTokenType.RIGHT_BRACE ) {\r
-                                                       // // we're done reading the object, so return it\r
-                                                       return o;\r
-                                                       \r
-                                               } else if ( token.type == JSONTokenType.COMMA ) {\r
-                                                       // skip past the comma and read another member\r
-                                                       nextToken();\r
-                                               } else {\r
-                                                       tokenizer.parseError( "Expecting } or , but found " + token.value );\r
-                                               }\r
-                                       } else {\r
-                                               tokenizer.parseError( "Expecting : but found " + token.value );\r
-                                       }\r
-                               } else {\r
-                                       tokenizer.parseError( "Expecting string but found " + token.value );\r
-                               }\r
-                       }\r
-            return null;\r
-               }\r
-               \r
-               /**\r
-                * Attempt to parse a value\r
-                */\r
-               private function parseValue():Object\r
-               {\r
-                       // Catch errors when the input stream ends abruptly\r
-                       if ( token == null )\r
-                       {\r
-                               tokenizer.parseError( "Unexpected end of input" );\r
-                       }\r
-                                       \r
-                       switch ( token.type ) {\r
-                               case JSONTokenType.LEFT_BRACE:\r
-                                       return parseObject();\r
-                                       \r
-                               case JSONTokenType.LEFT_BRACKET:\r
-                                       return parseArray();\r
-                                       \r
-                               case JSONTokenType.STRING:\r
-                               case JSONTokenType.NUMBER:\r
-                               case JSONTokenType.TRUE:\r
-                               case JSONTokenType.FALSE:\r
-                               case JSONTokenType.NULL:\r
-                                       return token.value;\r
-\r
-                               default:\r
-                                       tokenizer.parseError( "Unexpected " + token.value );\r
-                                       \r
-                       }\r
-            return null;\r
-               }\r
-       }\r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as
deleted file mode 100644 (file)
index 44469d0..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json \r
-{\r
-\r
-       import flash.utils.describeType;\r
-\r
-       public class JSONEncoder {\r
-       \r
-               /** The string that is going to represent the object we're encoding */\r
-               private var jsonString:String;\r
-               \r
-               /**\r
-                * Creates a new JSONEncoder.\r
-                *\r
-                * @param o The object to encode as a JSON string\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function JSONEncoder( value:* ) {\r
-                       jsonString = convertToString( value );\r
-               \r
-               }\r
-               \r
-               /**\r
-                * Gets the JSON string from the encoder.\r
-                *\r
-                * @return The JSON string representation of the object\r
-                *              that was passed to the constructor\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function getString():String {\r
-                       return jsonString;\r
-               }\r
-               \r
-               /**\r
-                * Converts a value to it's JSON string equivalent.\r
-                *\r
-                * @param value The value to convert.  Could be any \r
-                *              type (object, number, array, etc)\r
-                */\r
-               private function convertToString( value:* ):String {\r
-                       \r
-                       // determine what value is and convert it based on it's type\r
-                       if ( value is String ) {\r
-                               \r
-                               // escape the string so it's formatted correctly\r
-                               return escapeString( value as String );\r
-                               \r
-                       } else if ( value is Number ) {\r
-                               \r
-                               // only encode numbers that finate\r
-                               return isFinite( value as Number) ? value.toString() : "null";\r
-\r
-                       } else if ( value is Boolean ) {\r
-                               \r
-                               // convert boolean to string easily\r
-                               return value ? "true" : "false";\r
-\r
-                       } else if ( value is Array ) {\r
-                       \r
-                               // call the helper method to convert an array\r
-                               return arrayToString( value as Array );\r
-                       \r
-                       } else if ( value is Object && value != null ) {\r
-                       \r
-                               // call the helper method to convert an object\r
-                               return objectToString( value );\r
-                       }\r
-            return "null";\r
-               }\r
-               \r
-               /**\r
-                * Escapes a string accoding to the JSON specification.\r
-                *\r
-                * @param str The string to be escaped\r
-                * @return The string with escaped special characters\r
-                *              according to the JSON specification\r
-                */\r
-               private function escapeString( str:String ):String {\r
-                       // create a string to store the string's jsonstring value\r
-                       var s:String = "";\r
-                       // current character in the string we're processing\r
-                       var ch:String;\r
-                       // store the length in a local variable to reduce lookups\r
-                       var len:Number = str.length;\r
-                       \r
-                       // loop over all of the characters in the string\r
-                       for ( var i:int = 0; i < len; i++ ) {\r
-                       \r
-                               // examine the character to determine if we have to escape it\r
-                               ch = str.charAt( i );\r
-                               switch ( ch ) {\r
-                               \r
-                                       case '"':       // quotation mark\r
-                                               s += "\\\"";\r
-                                               break;\r
-                                               \r
-                                       //case '/':     // solidus\r
-                                       //      s += "\\/";\r
-                                       //      break;\r
-                                               \r
-                                       case '\\':      // reverse solidus\r
-                                               s += "\\\\";\r
-                                               break;\r
-                                               \r
-                                       case '\b':      // bell\r
-                                               s += "\\b";\r
-                                               break;\r
-                                               \r
-                                       case '\f':      // form feed\r
-                                               s += "\\f";\r
-                                               break;\r
-                                               \r
-                                       case '\n':      // newline\r
-                                               s += "\\n";\r
-                                               break;\r
-                                               \r
-                                       case '\r':      // carriage return\r
-                                               s += "\\r";\r
-                                               break;\r
-                                               \r
-                                       case '\t':      // horizontal tab\r
-                                               s += "\\t";\r
-                                               break;\r
-                                               \r
-                                       default:        // everything else\r
-                                               \r
-                                               // check for a control character and escape as unicode\r
-                                               if ( ch < ' ' ) {\r
-                                                       // get the hex digit(s) of the character (either 1 or 2 digits)\r
-                                                       var hexCode:String = ch.charCodeAt( 0 ).toString( 16 );\r
-                                                       \r
-                                                       // ensure that there are 4 digits by adjusting\r
-                                                       // the # of zeros accordingly.\r
-                                                       var zeroPad:String = hexCode.length == 2 ? "00" : "000";\r
-                                                       \r
-                                                       // create the unicode escape sequence with 4 hex digits\r
-                                                       s += "\\u" + zeroPad + hexCode;\r
-                                               } else {\r
-                                               \r
-                                                       // no need to do any special encoding, just pass-through\r
-                                                       s += ch;\r
-                                                       \r
-                                               }\r
-                               }       // end switch\r
-                               \r
-                       }       // end for loop\r
-                                               \r
-                       return "\"" + s + "\"";\r
-               }\r
-               \r
-               /**\r
-                * Converts an array to it's JSON string equivalent\r
-                *\r
-                * @param a The array to convert\r
-                * @return The JSON string representation of <code>a</code>\r
-                */\r
-               private function arrayToString( a:Array ):String {\r
-                       // create a string to store the array's jsonstring value\r
-                       var s:String = "";\r
-                       \r
-                       // loop over the elements in the array and add their converted\r
-                       // values to the string\r
-                       for ( var i:int = 0; i < a.length; i++ ) {\r
-                               // when the length is 0 we're adding the first element so\r
-                               // no comma is necessary\r
-                               if ( s.length > 0 ) {\r
-                                       // we've already added an element, so add the comma separator\r
-                                       s += ","\r
-                               }\r
-                               \r
-                               // convert the value to a string\r
-                               s += convertToString( a[i] );   \r
-                       }\r
-                       \r
-                       // KNOWN ISSUE:  In ActionScript, Arrays can also be associative\r
-                       // objects and you can put anything in them, ie:\r
-                       //              myArray["foo"] = "bar";\r
-                       //\r
-                       // These properties aren't picked up in the for loop above because\r
-                       // the properties don't correspond to indexes.  However, we're\r
-                       // sort of out luck because the JSON specification doesn't allow\r
-                       // these types of array properties.\r
-                       //\r
-                       // So, if the array was also used as an associative object, there\r
-                       // may be some values in the array that don't get properly encoded.\r
-                       //\r
-                       // A possible solution is to instead encode the Array as an Object\r
-                       // but then it won't get decoded correctly (and won't be an\r
-                       // Array instance)\r
-                                               \r
-                       // close the array and return it's string value\r
-                       return "[" + s + "]";\r
-               }\r
-               \r
-               /**\r
-                * Converts an object to it's JSON string equivalent\r
-                *\r
-                * @param o The object to convert\r
-                * @return The JSON string representation of <code>o</code>\r
-                */\r
-               private function objectToString( o:Object ):String\r
-               {\r
-                       // create a string to store the object's jsonstring value\r
-                       var s:String = "";\r
-                       \r
-                       // determine if o is a class instance or a plain object\r
-                       var classInfo:XML = describeType( o );\r
-                       if ( classInfo.@name.toString() == "Object" )\r
-                       {\r
-                               // the value of o[key] in the loop below - store this \r
-                               // as a variable so we don't have to keep looking up o[key]\r
-                               // when testing for valid values to convert\r
-                               var value:Object;\r
-                               \r
-                               // loop over the keys in the object and add their converted\r
-                               // values to the string\r
-                               for ( var key:String in o )\r
-                               {\r
-                                       // assign value to a variable for quick lookup\r
-                                       value = o[key];\r
-                                       \r
-                                       // don't add function's to the JSON string\r
-                                       if ( value is Function )\r
-                                       {\r
-                                               // skip this key and try another\r
-                                               continue;\r
-                                       }\r
-                                       \r
-                                       // when the length is 0 we're adding the first item so\r
-                                       // no comma is necessary\r
-                                       if ( s.length > 0 ) {\r
-                                               // we've already added an item, so add the comma separator\r
-                                               s += ","\r
-                                       }\r
-                                       \r
-                                       s += escapeString( key ) + ":" + convertToString( value );\r
-                               }\r
-                       }\r
-                       else // o is a class instance\r
-                       {\r
-                               // Loop over all of the variables and accessors in the class and \r
-                               // serialize them along with their values.\r
-                               for each ( var v:XML in classInfo..*.( name() == "variable" || name() == "accessor" ) )\r
-                               {\r
-                                       // When the length is 0 we're adding the first item so\r
-                                       // no comma is necessary\r
-                                       if ( s.length > 0 ) {\r
-                                               // We've already added an item, so add the comma separator\r
-                                               s += ","\r
-                                       }\r
-                                       \r
-                                       s += escapeString( v.@name.toString() ) + ":" \r
-                                                       + convertToString( o[ v.@name ] );\r
-                               }\r
-                               \r
-                       }\r
-                       \r
-                       return "{" + s + "}";\r
-               }\r
-\r
-               \r
-       }\r
-       \r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as
deleted file mode 100644 (file)
index 5aec1e3..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       /**\r
-        *\r
-        *\r
-        */\r
-       public class JSONParseError extends Error       {\r
-       \r
-               /** The location in the string where the error occurred */\r
-               private var _location:int;\r
-               \r
-               /** The string in which the parse error occurred */\r
-               private var _text:String;\r
-       \r
-               /**\r
-                * Constructs a new JSONParseError.\r
-                *\r
-                * @param message The error message that occured during parsing\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function JSONParseError( message:String = "", location:int = 0, text:String = "") {\r
-                       super( message );\r
-                       name = "JSONParseError";\r
-                       _location = location;\r
-                       _text = text;\r
-               }\r
-\r
-               /**\r
-                * Provides read-only access to the location variable.\r
-                *\r
-                * @return The location in the string where the error occurred\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function get location():int {\r
-                       return _location;\r
-               }\r
-               \r
-               /**\r
-                * Provides read-only access to the text variable.\r
-                *\r
-                * @return The string in which the error occurred\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function get text():String {\r
-                       return _text;\r
-               }\r
-       }\r
-       \r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as
deleted file mode 100644 (file)
index 258d63c..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       public class JSONToken {\r
-       \r
-               private var _type:int;\r
-               private var _value:Object;\r
-               \r
-               /**\r
-                * Creates a new JSONToken with a specific token type and value.\r
-                *\r
-                * @param type The JSONTokenType of the token\r
-                * @param value The value of the token\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function JSONToken( type:int = -1 /* JSONTokenType.UNKNOWN */, value:Object = null ) {\r
-                       _type = type;\r
-                       _value = value;\r
-               }\r
-               \r
-               /**\r
-                * Returns the type of the token.\r
-                *\r
-                * @see com.adobe.serialization.json.JSONTokenType\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function get type():int {\r
-                       return _type;   \r
-               }\r
-               \r
-               /**\r
-                * Sets the type of the token.\r
-                *\r
-                * @see com.adobe.serialization.json.JSONTokenType\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function set type( value:int ):void {\r
-                       _type = value;  \r
-               }\r
-               \r
-               /**\r
-                * Gets the value of the token\r
-                *\r
-                * @see com.adobe.serialization.json.JSONTokenType\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function get value():Object {\r
-                       return _value;  \r
-               }\r
-               \r
-               /**\r
-                * Sets the value of the token\r
-                *\r
-                * @see com.adobe.serialization.json.JSONTokenType\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public function set value ( v:Object ):void {\r
-                       _value = v;     \r
-               }\r
-\r
-       }\r
-       \r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as
deleted file mode 100644 (file)
index fceb3f0..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       /**\r
-        * Class containing constant values for the different types\r
-        * of tokens in a JSON encoded string.\r
-        */\r
-       public class JSONTokenType {\r
-       \r
-               public static const UNKNOWN:int = -1;\r
-               \r
-               public static const COMMA:int = 0;\r
-               \r
-               public static const LEFT_BRACE:int = 1;\r
-               \r
-               public static const RIGHT_BRACE:int = 2;\r
-               \r
-               public static const LEFT_BRACKET:int = 3;\r
-               \r
-               public static const RIGHT_BRACKET:int = 4;\r
-               \r
-               public static const COLON:int = 6;\r
-               \r
-               public static const TRUE:int = 7;\r
-               \r
-               public static const FALSE:int = 8;\r
-               \r
-               public static const NULL:int = 9;\r
-               \r
-               public static const STRING:int = 10;\r
-               \r
-               public static const NUMBER:int = 11;\r
-               \r
-       }\r
-       \r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as b/platforma/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as
deleted file mode 100644 (file)
index dc36bfc..0000000
+++ /dev/null
@@ -1,583 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.serialization.json {\r
-\r
-       public class JSONTokenizer {\r
-       \r
-               /** The object that will get parsed from the JSON string */\r
-               private var obj:Object;\r
-               \r
-               /** The JSON string to be parsed */\r
-               private var jsonString:String;\r
-               \r
-               /** The current parsing location in the JSON string */\r
-               private var loc:int;\r
-               \r
-               /** The current character in the JSON string during parsing */\r
-               private var ch:String;\r
-               \r
-               /**\r
-                * Constructs a new JSONDecoder to parse a JSON string \r
-                * into a native object.\r
-                *\r
-                * @param s The JSON string to be converted\r
-                *              into a native object\r
-                */\r
-               public function JSONTokenizer( s:String ) {\r
-                       jsonString = s;\r
-                       loc = 0;\r
-                       \r
-                       // prime the pump by getting the first character\r
-                       nextChar();\r
-               }\r
-               \r
-               /**\r
-                * Gets the next token in the input sting and advances\r
-               * the character to the next character after the token\r
-                */\r
-               public function getNextToken():JSONToken {\r
-                       var token:JSONToken = new JSONToken();\r
-                       \r
-                       // skip any whitespace / comments since the last \r
-                       // token was read\r
-                       skipIgnored();\r
-                                               \r
-                       // examine the new character and see what we have...\r
-                       switch ( ch ) {\r
-                               \r
-                               case '{':\r
-                                       token.type = JSONTokenType.LEFT_BRACE;\r
-                                       token.value = '{';\r
-                                       nextChar();\r
-                                       break\r
-                                       \r
-                               case '}':\r
-                                       token.type = JSONTokenType.RIGHT_BRACE;\r
-                                       token.value = '}';\r
-                                       nextChar();\r
-                                       break\r
-                                       \r
-                               case '[':\r
-                                       token.type = JSONTokenType.LEFT_BRACKET;\r
-                                       token.value = '[';\r
-                                       nextChar();\r
-                                       break\r
-                                       \r
-                               case ']':\r
-                                       token.type = JSONTokenType.RIGHT_BRACKET;\r
-                                       token.value = ']';\r
-                                       nextChar();\r
-                                       break\r
-                               \r
-                               case ',':\r
-                                       token.type = JSONTokenType.COMMA;\r
-                                       token.value = ',';\r
-                                       nextChar();\r
-                                       break\r
-                                       \r
-                               case ':':\r
-                                       token.type = JSONTokenType.COLON;\r
-                                       token.value = ':';\r
-                                       nextChar();\r
-                                       break;\r
-                                       \r
-                               case 't': // attempt to read true\r
-                                       var possibleTrue:String = "t" + nextChar() + nextChar() + nextChar();\r
-                                       \r
-                                       if ( possibleTrue == "true" ) {\r
-                                               token.type = JSONTokenType.TRUE;\r
-                                               token.value = true;\r
-                                               nextChar();\r
-                                       } else {\r
-                                               parseError( "Expecting 'true' but found " + possibleTrue );\r
-                                       }\r
-                                       \r
-                                       break;\r
-                                       \r
-                               case 'f': // attempt to read false\r
-                                       var possibleFalse:String = "f" + nextChar() + nextChar() + nextChar() + nextChar();\r
-                                       \r
-                                       if ( possibleFalse == "false" ) {\r
-                                               token.type = JSONTokenType.FALSE;\r
-                                               token.value = false;\r
-                                               nextChar();\r
-                                       } else {\r
-                                               parseError( "Expecting 'false' but found " + possibleFalse );\r
-                                       }\r
-                                       \r
-                                       break;\r
-                                       \r
-                               case 'n': // attempt to read null\r
-                               \r
-                                       var possibleNull:String = "n" + nextChar() + nextChar() + nextChar();\r
-                                       \r
-                                       if ( possibleNull == "null" ) {\r
-                                               token.type = JSONTokenType.NULL;\r
-                                               token.value = null;\r
-                                               nextChar();\r
-                                       } else {\r
-                                               parseError( "Expecting 'null' but found " + possibleNull );\r
-                                       }\r
-                                       \r
-                                       break;\r
-                                       \r
-                               case '"': // the start of a string\r
-                                       token = readString();\r
-                                       break;\r
-                                       \r
-                               default: \r
-                                       // see if we can read a number\r
-                                       if ( isDigit( ch ) || ch == '-' ) {\r
-                                               token = readNumber();\r
-                                       } else if ( ch == '' ) {\r
-                                               // check for reading past the end of the string\r
-                                               return null;\r
-                                       } else {                                                \r
-                                               // not sure what was in the input string - it's not\r
-                                               // anything we expected\r
-                                               parseError( "Unexpected " + ch + " encountered" );\r
-                                       }\r
-                       }\r
-                       \r
-                       return token;\r
-               }\r
-               \r
-               /**\r
-                * Attempts to read a string from the input string.  Places\r
-                * the character location at the first character after the\r
-                * string.  It is assumed that ch is " before this method is called.\r
-                *\r
-                * @return the JSONToken with the string value if a string could\r
-                *              be read.  Throws an error otherwise.\r
-                */\r
-               private function readString():JSONToken {\r
-                       // the token for the string we'll try to read\r
-                       var token:JSONToken = new JSONToken();\r
-                       token.type = JSONTokenType.STRING;\r
-                       \r
-                       // the string to store the string we'll try to read\r
-                       var string:String = "";\r
-                       \r
-                       // advance past the first "\r
-                       nextChar();\r
-                       \r
-                       while ( ch != '"' && ch != '' ) {\r
-                                                               \r
-                               // unescape the escape sequences in the string\r
-                               if ( ch == '\\' ) {\r
-                                       \r
-                                       // get the next character so we know what\r
-                                       // to unescape\r
-                                       nextChar();\r
-                                       \r
-                                       switch ( ch ) {\r
-                                               \r
-                                               case '"': // quotation mark\r
-                                                       string += '"';\r
-                                                       break;\r
-                                               \r
-                                               case '/':       // solidus\r
-                                                       string += "/";\r
-                                                       break;\r
-                                                       \r
-                                               case '\\':      // reverse solidus\r
-                                                       string += '\\';\r
-                                                       break;\r
-                                                       \r
-                                               case 'b':       // bell\r
-                                                       string += '\b';\r
-                                                       break;\r
-                                                       \r
-                                               case 'f':       // form feed\r
-                                                       string += '\f';\r
-                                                       break;\r
-                                                       \r
-                                               case 'n':       // newline\r
-                                                       string += '\n';\r
-                                                       break;\r
-                                                       \r
-                                               case 'r':       // carriage return\r
-                                                       string += '\r';\r
-                                                       break;\r
-                                                       \r
-                                               case 't':       // horizontal tab\r
-                                                       string += '\t'\r
-                                                       break;\r
-                                               \r
-                                               case 'u':\r
-                                                       // convert a unicode escape sequence\r
-                                                       // to it's character value - expecting\r
-                                                       // 4 hex digits\r
-                                                       \r
-                                                       // save the characters as a string we'll convert to an int\r
-                                                       var hexValue:String = "";\r
-                                                       \r
-                                                       // try to find 4 hex characters\r
-                                                       for ( var i:int = 0; i < 4; i++ ) {\r
-                                                               // get the next character and determine\r
-                                                               // if it's a valid hex digit or not\r
-                                                               if ( !isHexDigit( nextChar() ) ) {\r
-                                                                       parseError( " Excepted a hex digit, but found: " + ch );\r
-                                                               }\r
-                                                               // valid, add it to the value\r
-                                                               hexValue += ch;\r
-                                                       }\r
-                                                       \r
-                                                       // convert hexValue to an integer, and use that\r
-                                                       // integrer value to create a character to add\r
-                                                       // to our string.\r
-                                                       string += String.fromCharCode( parseInt( hexValue, 16 ) );\r
-                                                       \r
-                                                       break;\r
-                                       \r
-                                               default:\r
-                                                       // couldn't unescape the sequence, so just\r
-                                                       // pass it through\r
-                                                       string += '\\' + ch;\r
-                                               \r
-                                       }\r
-                                       \r
-                               } else {\r
-                                       // didn't have to unescape, so add the character to the string\r
-                                       string += ch;\r
-                                       \r
-                               }\r
-                               \r
-                               // move to the next character\r
-                               nextChar();\r
-                               \r
-                       }\r
-                       \r
-                       // we read past the end of the string without closing it, which\r
-                       // is a parse error\r
-                       if ( ch == '' ) {\r
-                               parseError( "Unterminated string literal" );\r
-                       }\r
-                       \r
-                       // move past the closing " in the input string\r
-                       nextChar();\r
-                       \r
-                       // attach to the string to the token so we can return it\r
-                       token.value = string;\r
-                       \r
-                       return token;\r
-               }\r
-               \r
-               /**\r
-                * Attempts to read a number from the input string.  Places\r
-                * the character location at the first character after the\r
-                * number.\r
-                * \r
-                * @return The JSONToken with the number value if a number could\r
-                *              be read.  Throws an error otherwise.\r
-                */\r
-               private function readNumber():JSONToken {\r
-                       // the token for the number we'll try to read\r
-                       var token:JSONToken = new JSONToken();\r
-                       token.type = JSONTokenType.NUMBER;\r
-                       \r
-                       // the string to accumulate the number characters\r
-                       // into that we'll convert to a number at the end\r
-                       var input:String = "";\r
-                       \r
-                       // check for a negative number\r
-                       if ( ch == '-' ) {\r
-                               input += '-';\r
-                               nextChar();\r
-                       }\r
-                       \r
-                       // the number must start with a digit\r
-                       if ( !isDigit( ch ) )\r
-                       {\r
-                               parseError( "Expecting a digit" );\r
-                       }\r
-                       \r
-                       // 0 can only be the first digit if it\r
-                       // is followed by a decimal point\r
-                       if ( ch == '0' )\r
-                       {\r
-                               input += ch;\r
-                               nextChar();\r
-                               \r
-                               // make sure no other digits come after 0\r
-                               if ( isDigit( ch ) )\r
-                               {\r
-                                       parseError( "A digit cannot immediately follow 0" );\r
-                               }\r
-// Commented out - this should only be available when "strict" is false\r
-//                             // unless we have 0x which starts a hex number\\r
-//                             else if ( ch == 'x' )\r
-//                             {\r
-//                                     // include the x in the input\r
-//                                     input += ch;\r
-//                                     nextChar();\r
-//                                     \r
-//                                     // need at least one hex digit after 0x to\r
-//                                     // be valid\r
-//                                     if ( isHexDigit( ch ) )\r
-//                                     {\r
-//                                             input += ch;\r
-//                                             nextChar();\r
-//                                     }\r
-//                                     else\r
-//                                     {\r
-//                                             parseError( "Number in hex format require at least one hex digit after \"0x\"" );       \r
-//                                     }\r
-//                                     \r
-//                                     // consume all of the hex values\r
-//                                     while ( isHexDigit( ch ) )\r
-//                                     {\r
-//                                             input += ch;\r
-//                                             nextChar();\r
-//                                     }\r
-//                             }\r
-                       }\r
-                       else\r
-                       {\r
-                               // read numbers while we can\r
-                               while ( isDigit( ch ) ) {\r
-                                       input += ch;\r
-                                       nextChar();\r
-                               }\r
-                       }\r
-                       \r
-                       // check for a decimal value\r
-                       if ( ch == '.' ) {\r
-                               input += '.';\r
-                               nextChar();\r
-                               \r
-                               // after the decimal there has to be a digit\r
-                               if ( !isDigit( ch ) )\r
-                               {\r
-                                       parseError( "Expecting a digit" );\r
-                               }\r
-                               \r
-                               // read more numbers to get the decimal value\r
-                               while ( isDigit( ch ) ) {\r
-                                       input += ch;\r
-                                       nextChar();\r
-                               }\r
-                       }\r
-                       \r
-                       // check for scientific notation\r
-                       if ( ch == 'e' || ch == 'E' )\r
-                       {\r
-                               input += "e"\r
-                               nextChar();\r
-                               // check for sign\r
-                               if ( ch == '+' || ch == '-' )\r
-                               {\r
-                                       input += ch;\r
-                                       nextChar();\r
-                               }\r
-                               \r
-                               // require at least one number for the exponent\r
-                               // in this case\r
-                               if ( !isDigit( ch ) )\r
-                               {\r
-                                       parseError( "Scientific notation number needs exponent value" );\r
-                               }\r
-                                                       \r
-                               // read in the exponent\r
-                               while ( isDigit( ch ) )\r
-                               {\r
-                                       input += ch;\r
-                                       nextChar();\r
-                               }\r
-                       }\r
-                       \r
-                       // convert the string to a number value\r
-                       var num:Number = Number( input );\r
-                       \r
-                       if ( isFinite( num ) && !isNaN( num ) ) {\r
-                               token.value = num;\r
-                               return token;\r
-                       } else {\r
-                               parseError( "Number " + num + " is not valid!" );\r
-                       }\r
-            return null;\r
-               }\r
-\r
-               /**\r
-                * Reads the next character in the input\r
-                * string and advances the character location.\r
-                *\r
-                * @return The next character in the input string, or\r
-                *              null if we've read past the end.\r
-                */\r
-               private function nextChar():String {\r
-                       return ch = jsonString.charAt( loc++ );\r
-               }\r
-               \r
-               /**\r
-                * Advances the character location past any\r
-                * sort of white space and comments\r
-                */\r
-               private function skipIgnored():void\r
-               {\r
-                       var originalLoc:int;\r
-                       \r
-                       // keep trying to skip whitespace and comments as long\r
-                       // as we keep advancing past the original location \r
-                       do\r
-                       {\r
-                               originalLoc = loc;\r
-                               skipWhite();\r
-                               skipComments();\r
-                       }\r
-                       while ( originalLoc != loc );\r
-               }\r
-               \r
-               /**\r
-                * Skips comments in the input string, either\r
-                * single-line or multi-line.  Advances the character\r
-                * to the first position after the end of the comment.\r
-                */\r
-               private function skipComments():void {\r
-                       if ( ch == '/' ) {\r
-                               // Advance past the first / to find out what type of comment\r
-                               nextChar();\r
-                               switch ( ch ) {\r
-                                       case '/': // single-line comment, read through end of line\r
-                                               \r
-                                               // Loop over the characters until we find\r
-                                               // a newline or until there's no more characters left\r
-                                               do {\r
-                                                       nextChar();\r
-                                               } while ( ch != '\n' && ch != '' )\r
-                                               \r
-                                               // move past the \n\r
-                                               nextChar();\r
-                                               \r
-                                               break;\r
-                                       \r
-                                       case '*': // multi-line comment, read until closing */\r
-\r
-                                               // move past the opening *\r
-                                               nextChar();\r
-                                               \r
-                                               // try to find a trailing */\r
-                                               while ( true ) {\r
-                                                       if ( ch == '*' ) {\r
-                                                               // check to see if we have a closing /\r
-                                                               nextChar();\r
-                                                               if ( ch == '/') {\r
-                                                                       // move past the end of the closing */\r
-                                                                       nextChar();\r
-                                                                       break;\r
-                                                               }\r
-                                                       } else {\r
-                                                               // move along, looking if the next character is a *\r
-                                                               nextChar();\r
-                                                       }\r
-                                                       \r
-                                                       // when we're here we've read past the end of \r
-                                                       // the string without finding a closing */, so error\r
-                                                       if ( ch == '' ) {\r
-                                                               parseError( "Multi-line comment not closed" );\r
-                                                       }\r
-                                               }\r
-\r
-                                               break;\r
-                                       \r
-                                       // Can't match a comment after a /, so it's a parsing error\r
-                                       default:\r
-                                               parseError( "Unexpected " + ch + " encountered (expecting '/' or '*' )" );\r
-                               }\r
-                       }\r
-                       \r
-               }\r
-               \r
-               \r
-               /**\r
-                * Skip any whitespace in the input string and advances\r
-                * the character to the first character after any possible\r
-                * whitespace.\r
-                */\r
-               private function skipWhite():void {\r
-                       \r
-                       // As long as there are spaces in the input \r
-                       // stream, advance the current location pointer\r
-                       // past them\r
-                       while ( isWhiteSpace( ch ) ) {\r
-                               nextChar();\r
-                       }\r
-                       \r
-               }\r
-               \r
-               /**\r
-                * Determines if a character is whitespace or not.\r
-                *\r
-                * @return True if the character passed in is a whitespace\r
-                *      character\r
-                */\r
-               private function isWhiteSpace( ch:String ):Boolean {\r
-                       return ( ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' );\r
-               }\r
-               \r
-               /**\r
-                * Determines if a character is a digit [0-9].\r
-                *\r
-                * @return True if the character passed in is a digit\r
-                */\r
-               private function isDigit( ch:String ):Boolean {\r
-                       return ( ch >= '0' && ch <= '9' );\r
-               }\r
-               \r
-               /**\r
-                * Determines if a character is a digit [0-9].\r
-                *\r
-                * @return True if the character passed in is a digit\r
-                */\r
-               private function isHexDigit( ch:String ):Boolean {\r
-                       // get the uppercase value of ch so we only have\r
-                       // to compare the value between 'A' and 'F'\r
-                       var uc:String = ch.toUpperCase();\r
-                       \r
-                       // a hex digit is a digit of A-F, inclusive ( using\r
-                       // our uppercase constraint )\r
-                       return ( isDigit( ch ) || ( uc >= 'A' && uc <= 'F' ) );\r
-               }\r
-       \r
-               /**\r
-                * Raises a parsing error with a specified message, tacking\r
-                * on the error location and the original string.\r
-                *\r
-                * @param message The message indicating why the error occurred\r
-                */\r
-               public function parseError( message:String ):void {\r
-                       throw new JSONParseError( message, loc, jsonString );\r
-               }\r
-       }\r
-       \r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as
deleted file mode 100644 (file)
index e656120..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.utils\r
-{\r
-       \r
-       /**\r
-       *       Class that contains static utility methods for manipulating and working\r
-       *       with Arrays.\r
-       * \r
-       *       Note that all APIs assume that they are working with well formed arrays.\r
-       *       i.e. they will only manipulate indexed values.  \r
-       * \r
-       *       @langversion ActionScript 3.0\r
-       *       @playerversion Flash 9.0\r
-       *       @tiptext\r
-       */              \r
-       public class ArrayUtil\r
-       {\r
-                               \r
-               /**\r
-               *       Determines whether the specified array contains the specified value.    \r
-               * \r
-               *       @param arr The array that will be checked for the specified value.\r
-               *\r
-               *       @param value The object which will be searched for within the array\r
-               * \r
-               *       @return True if the array contains the value, False if it does not.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */                      \r
-               public static function arrayContainsValue(arr:Array, value:Object):Boolean\r
-               {\r
-                       return (arr.indexOf(value) != -1);\r
-               }       \r
-               \r
-               /**\r
-               *       Remove all instances of the specified value from the array,\r
-               * \r
-               *       @param arr The array from which the value will be removed\r
-               *\r
-               *       @param value The object that will be removed from the array.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */              \r
-               public static function removeValueFromArray(arr:Array, value:Object):void\r
-               {\r
-                       var len:uint = arr.length;\r
-                       \r
-                       for(var i:Number = len; i > -1; i--)\r
-                       {\r
-                               if(arr[i] === value)\r
-                               {\r
-                                       arr.splice(i, 1);\r
-                               }\r
-                       }                                       \r
-               }\r
-\r
-               /**\r
-               *       Create a new array that only contains unique instances of objects\r
-               *       in the specified array.\r
-               *\r
-               *       Basically, this can be used to remove duplication object instances\r
-               *       from an array\r
-               * \r
-               *       @param arr The array which contains the values that will be used to\r
-               *       create the new array that contains no duplicate values.\r
-               *\r
-               *       @return A new array which only contains unique items from the specified\r
-               *       array.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */      \r
-               public static function createUniqueCopy(a:Array):Array\r
-               {\r
-                       var newArray:Array = new Array();\r
-                       \r
-                       var len:Number = a.length;\r
-                       var item:Object;\r
-                       \r
-                       for (var i:uint = 0; i < len; ++i)\r
-                       {\r
-                               item = a[i];\r
-                               \r
-                               if(ArrayUtil.arrayContainsValue(newArray, item))\r
-                               {\r
-                                       continue;\r
-                               }\r
-                               \r
-                               newArray.push(item);\r
-                       }\r
-                       \r
-                       return newArray;\r
-               }\r
-               \r
-               /**\r
-               *       Creates a copy of the specified array.\r
-               *\r
-               *       Note that the array returned is a new array but the items within the\r
-               *       array are not copies of the items in the original array (but rather \r
-               *       references to the same items)\r
-               * \r
-               *       @param arr The array that will be copies\r
-               *\r
-               *       @return A new array which contains the same items as the array passed\r
-               *       in.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */                      \r
-               public static function copyArray(arr:Array):Array\r
-               {       \r
-                       return arr.slice();\r
-               }\r
-               \r
-               /**\r
-               *       Compares two arrays and returns a boolean indicating whether the arrays\r
-               *       contain the same values at the same indexes.\r
-               * \r
-               *       @param arr1 The first array that will be compared to the second.\r
-               *\r
-               *       @param arr2 The second array that will be compared to the first.\r
-               *\r
-               *       @return True if the arrays contains the same values at the same indexes.\r
-                       False if they do not.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */              \r
-               public static function arraysAreEqual(arr1:Array, arr2:Array):Boolean\r
-               {\r
-                       if(arr1.length != arr2.length)\r
-                       {\r
-                               return false;\r
-                       }\r
-                       \r
-                       var len:Number = arr1.length;\r
-                       \r
-                       for(var i:Number = 0; i < len; i++)\r
-                       {\r
-                               if(arr1[i] !== arr2[i])\r
-                               {\r
-                                       return false;\r
-                               }\r
-                       }\r
-                       \r
-                       return true;\r
-               }\r
-       }\r
-}\r
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as
deleted file mode 100644 (file)
index a49fe43..0000000
+++ /dev/null
@@ -1,699 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.utils
-{
-       import mx.formatters.DateBase;
-
-       /**
-       *       Class that contains static utility methods for manipulating and working
-       *       with Dates.
-       * 
-       *       @langversion ActionScript 3.0
-       *       @playerversion Flash 9.0
-       *       @tiptext
-       */      
-       public class DateUtil
-       {
-       
-               /**
-               *       Returns the English Short Month name (3 letters) for the Month that
-               *       the Date represents.    
-               * 
-               *       @param d The Date instance whose month will be used to retrieve the
-               *       short month name.
-               * 
-               *       @return An English 3 Letter Month abbreviation.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see SHORT_MONTH
-               */      
-               public static function getShortMonthName(d:Date):String
-               {
-                       return DateBase.monthNamesShort[d.getMonth()];
-               }
-
-               /**
-               *       Returns the index of the month that the short month name string
-               *       represents.     
-               * 
-               *       @param m The 3 letter abbreviation representing a short month name.
-               *
-               *       @param Optional parameter indicating whether the search should be case
-               *       sensitive
-               * 
-               *       @return A int that represents that month represented by the specifed
-               *       short name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see SHORT_MONTH
-               */      
-               public static function getShortMonthIndex(m:String):int
-               {
-                       return DateBase.monthNamesShort.indexOf(m);
-               }
-               
-               /**
-               *       Returns the English full Month name for the Month that
-               *       the Date represents.    
-               * 
-               *       @param d The Date instance whose month will be used to retrieve the
-               *       full month name.
-               * 
-               *       @return An English full month name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see FULL_MONTH
-               */      
-               public static function getFullMonthName(d:Date):String
-               {
-                       return DateBase.monthNamesLong[d.getMonth()];   
-               }
-
-               /**
-               *       Returns the index of the month that the full month name string
-               *       represents.     
-               * 
-               *       @param m A full month name.
-               * 
-               *       @return A int that represents that month represented by the specifed
-               *       full month name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see FULL_MONTH
-               */      
-               public static function getFullMonthIndex(m:String):int
-               {
-                       return DateBase.monthNamesLong.indexOf(m);
-               }
-
-               /**
-               *       Returns the English Short Day name (3 letters) for the day that
-               *       the Date represents.    
-               * 
-               *       @param d The Date instance whose day will be used to retrieve the
-               *       short day name.
-               * 
-               *       @return An English 3 Letter day abbreviation.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see SHORT_DAY
-               */      
-               public static function getShortDayName(d:Date):String
-               {
-                       return DateBase.dayNamesShort[d.getDay()];      
-               }
-               
-               /**
-               *       Returns the index of the day that the short day name string
-               *       represents.     
-               * 
-               *       @param m A short day name.
-               * 
-               *       @return A int that represents that short day represented by the specifed
-               *       full month name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see SHORT_DAY
-               */                      
-               public static function getShortDayIndex(d:String):int
-               {
-                       return DateBase.dayNamesShort.indexOf(d);
-               }
-
-               /**
-               *       Returns the English full day name for the day that
-               *       the Date represents.    
-               * 
-               *       @param d The Date instance whose day will be used to retrieve the
-               *       full day name.
-               * 
-               *       @return An English full day name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see FULL_DAY
-               */      
-               public static function getFullDayName(d:Date):String
-               {
-                       return DateBase.dayNamesLong[d.getDay()];       
-               }               
-
-               /**
-               *       Returns the index of the day that the full day name string
-               *       represents.     
-               * 
-               *       @param m A full day name.
-               * 
-               *       @return A int that represents that full day represented by the specifed
-               *       full month name.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               *
-               *       @see FULL_DAY
-               */              
-               public static function getFullDayIndex(d:String):int
-               {
-                       return DateBase.dayNamesLong.indexOf(d);
-               }
-
-               /**
-               *       Returns a two digit representation of the year represented by the 
-               *       specified date.
-               * 
-               *       @param d The Date instance whose year will be used to generate a two
-               *       digit string representation of the year.
-               * 
-               *       @return A string that contains a 2 digit representation of the year.
-               *       Single digits will be padded with 0.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function getShortYear(d:Date):String
-               {
-                       var dStr:String = String(d.getFullYear());
-                       
-                       if(dStr.length < 3)
-                       {
-                               return dStr;
-                       }
-
-                       return (dStr.substr(dStr.length - 2));
-               }
-
-               /**
-               *       Compares two dates and returns an integer depending on their relationship.
-               *
-               *       Returns -1 if d1 is greater than d2.
-               *       Returns 1 if d2 is greater than d1.
-               *       Returns 0 if both dates are equal.
-               * 
-               *       @param d1 The date that will be compared to the second date.
-               *       @param d2 The date that will be compared to the first date.
-               * 
-               *       @return An int indicating how the two dates compare.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function compareDates(d1:Date, d2:Date):int
-               {
-                       var d1ms:Number = d1.getTime();
-                       var d2ms:Number = d2.getTime();
-                       
-                       if(d1ms > d2ms)
-                       {
-                               return -1;
-                       }
-                       else if(d1ms < d2ms)
-                       {
-                               return 1;
-                       }
-                       else
-                       {
-                               return 0;
-                       }
-               }
-
-               /**
-               *       Returns a short hour (0 - 12) represented by the specified date.
-               *
-               *       If the hour is less than 12 (0 - 11 AM) then the hour will be returned.
-               *
-               *       If the hour is greater than 12 (12 - 23 PM) then the hour minus 12
-               *       will be returned.
-               * 
-               *       @param d1 The Date from which to generate the short hour
-               * 
-               *       @return An int between 0 and 13 ( 1 - 12 ) representing the short hour.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function getShortHour(d:Date):int
-               {
-                       var h:int = d.hours;
-                       
-                       if(h == 0 || h == 12)
-                       {
-                               return 12;
-                       }
-                       else if(h > 12)
-                       {
-                               return h - 12;
-                       }
-                       else
-                       {
-                               return h;
-                       }
-               }
-               
-               /**
-               *       Returns a string indicating whether the date represents a time in the
-               *       ante meridiem (AM) or post meridiem (PM).
-               *
-               *       If the hour is less than 12 then "AM" will be returned.
-               *
-               *       If the hour is greater than 12 then "PM" will be returned.
-               * 
-               *       @param d1 The Date from which to generate the 12 hour clock indicator.
-               * 
-               *       @return A String ("AM" or "PM") indicating which half of the day the 
-               *       hour represents.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function getAMPM(d:Date):String
-               {
-                       return (d.hours > 11)? "PM" : "AM";
-               }
-
-               /**
-               * Parses dates that conform to RFC822 into Date objects. This method also
-               * supports four-digit years (not supported in RFC822), but two-digit years
-               * (referring to the 20th century) are fine, too.
-               *
-               * This function is useful for parsing RSS .91, .92, and 2.0 dates.
-               *
-               * @param str
-               *
-               * @returns
-               *
-               * @langversion ActionScript 3.0
-               * @playerversion Flash 9.0
-               * @tiptext
-               *
-               * @see http://asg.web.cmu.edu/rfc/rfc822.html
-               */              
-               public static function parseRFC822(str:String):Date
-               {
-            var finalDate:Date;
-                       try
-                       {
-                               var dateParts:Array = str.split(" ");
-                               var day:String = null;
-                               
-                               if (dateParts[0].search(/\d/) == -1)
-                               {
-                                       day = dateParts.shift().replace(/\W/, "");
-                               }
-                               
-                               var date:Number = Number(dateParts.shift());
-                               var month:Number = Number(DateUtil.getShortMonthIndex(dateParts.shift()));
-                               var year:Number = Number(dateParts.shift());
-                               var timeParts:Array = dateParts.shift().split(":");
-                               var hour:Number = int(timeParts.shift());
-                               var minute:Number = int(timeParts.shift());
-                               var second:Number = (timeParts.length > 0) ? int(timeParts.shift()): 0;
-       
-                               var milliseconds:Number = Date.UTC(year, month, date, hour, minute, second, 0);
-       
-                               var timezone:String = dateParts.shift();
-                               var offset:Number = 0;
-
-                               if (timezone.search(/\d/) == -1)
-                               {
-                                       switch(timezone)
-                                       {
-                                               case "UT":
-                                                       offset = 0;
-                                                       break;
-                                               case "UTC":
-                                                       offset = 0;
-                                                       break;
-                                               case "GMT":
-                                                       offset = 0;
-                                                       break;
-                                               case "EST":
-                                                       offset = (-5 * 3600000);
-                                                       break;
-                                               case "EDT":
-                                                       offset = (-4 * 3600000);
-                                                       break;
-                                               case "CST":
-                                                       offset = (-6 * 3600000);
-                                                       break;
-                                               case "CDT":
-                                                       offset = (-5 * 3600000);
-                                                       break;
-                                               case "MST":
-                                                       offset = (-7 * 3600000);
-                                                       break;
-                                               case "MDT":
-                                                       offset = (-6 * 3600000);
-                                                       break;
-                                               case "PST":
-                                                       offset = (-8 * 3600000);
-                                                       break;
-                                               case "PDT":
-                                                       offset = (-7 * 3600000);
-                                                       break;
-                                               case "Z":
-                                                       offset = 0;
-                                                       break;
-                                               case "A":
-                                                       offset = (-1 * 3600000);
-                                                       break;
-                                               case "M":
-                                                       offset = (-12 * 3600000);
-                                                       break;
-                                               case "N":
-                                                       offset = (1 * 3600000);
-                                                       break;
-                                               case "Y":
-                                                       offset = (12 * 3600000);
-                                                       break;
-                                               default:
-                                                       offset = 0;
-                                       }
-                               }
-                               else
-                               {
-                                       var multiplier:Number = 1;
-                                       var oHours:Number = 0;
-                                       var oMinutes:Number = 0;
-                                       if (timezone.length != 4)
-                                       {
-                                               if (timezone.charAt(0) == "-")
-                                               {
-                                                       multiplier = -1;
-                                               }
-                                               timezone = timezone.substr(1, 4);
-                                       }
-                                       oHours = Number(timezone.substr(0, 2));
-                                       oMinutes = Number(timezone.substr(2, 2));
-                                       offset = (((oHours * 3600000) + (oMinutes * 60000)) * multiplier);
-                               }
-
-                               finalDate = new Date(milliseconds - offset);
-
-                               if (finalDate.toString() == "Invalid Date")
-                               {
-                                       throw new Error("This date does not conform to RFC822.");
-                               }
-                       }
-                       catch (e:Error)
-                       {
-                               var eStr:String = "Unable to parse the string [" +str+ "] into a date. ";
-                               eStr += "The internal error was: " + e.toString();
-                               throw new Error(eStr);
-                       }
-            return finalDate;
-               }
-            
-               /**
-               * Returns a date string formatted according to RFC822.
-               *
-               * @param d
-               *
-               * @returns
-               *
-               * @langversion ActionScript 3.0
-               * @playerversion Flash 9.0
-               * @tiptext
-               *
-               * @see http://asg.web.cmu.edu/rfc/rfc822.html
-               */      
-               public static function toRFC822(d:Date):String
-               {
-                       var date:Number = d.getUTCDate();
-                       var hours:Number = d.getUTCHours();
-                       var minutes:Number = d.getUTCMinutes();
-                       var seconds:Number = d.getUTCSeconds();
-                       var sb:String = new String();
-                       sb += DateBase.dayNamesShort[d.getUTCDay()];
-                       sb += ", ";
-                       
-                       if (date < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += date;
-                       sb += " ";
-                       //sb += DateUtil.SHORT_MONTH[d.getUTCMonth()];
-                       sb += DateBase.monthNamesShort[d.getUTCMonth()];
-                       sb += " ";
-                       sb += d.getUTCFullYear();
-                       sb += " ";
-                       if (hours < 10)
-                       {                       
-                               sb += "0";
-                       }
-                       sb += hours;
-                       sb += ":";
-                       if (minutes < 10)
-                       {                       
-                               sb += "0";
-                       }
-                       sb += minutes;
-                       sb += ":";
-                       if (seconds < 10)
-                       {                       
-                               sb += "0";
-                       }
-                       sb += seconds;
-                       sb += " GMT";
-                       return sb;
-               }
-            
-               /**
-               * Parses dates that conform to the W3C Date-time Format into Date objects.
-               *
-               * This function is useful for parsing RSS 1.0 and Atom 1.0 dates.
-               *
-               * @param str
-               *
-               * @returns
-               *
-               * @langversion ActionScript 3.0
-               * @playerversion Flash 9.0
-               * @tiptext
-               *
-               * @see http://www.w3.org/TR/NOTE-datetime
-               */                   
-               public static function parseW3CDTF(str:String):Date
-               {
-            var finalDate:Date;
-                       try
-                       {
-                               var dateStr:String = str.substring(0, str.indexOf("T"));
-                               var timeStr:String = str.substring(str.indexOf("T")+1, str.length);
-                               var dateArr:Array = dateStr.split("-");
-                               var year:Number = Number(dateArr.shift());
-                               var month:Number = Number(dateArr.shift());
-                               var date:Number = Number(dateArr.shift());
-                               
-                               var multiplier:Number;
-                               var offsetHours:Number;
-                               var offsetMinutes:Number;
-                               var offsetStr:String;
-                               
-                               if (timeStr.indexOf("Z") != -1)
-                               {
-                                       multiplier = 1;
-                                       offsetHours = 0;
-                                       offsetMinutes = 0;
-                                       timeStr = timeStr.replace("Z", "");
-                               }
-                               else if (timeStr.indexOf("+") != -1)
-                               {
-                                       multiplier = 1;
-                                       offsetStr = timeStr.substring(timeStr.indexOf("+")+1, timeStr.length);
-                                       offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":")));
-                                       offsetMinutes = Number(offsetStr.substring(offsetStr.indexOf(":")+1, offsetStr.length));
-                                       timeStr = timeStr.substring(0, timeStr.indexOf("+"));
-                               }
-                               else // offset is -
-                               {
-                                       multiplier = -1;
-                                       offsetStr = timeStr.substring(timeStr.indexOf("-")+1, timeStr.length);
-                                       offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":")));
-                                       offsetMinutes = Number(offsetStr.substring(offsetStr.indexOf(":")+1, offsetStr.length));
-                                       timeStr = timeStr.substring(0, timeStr.indexOf("-"));
-                               }
-                               var timeArr:Array = timeStr.split(":");
-                               var hour:Number = Number(timeArr.shift());
-                               var minutes:Number = Number(timeArr.shift());
-                               var secondsArr:Array = (timeArr.length > 0) ? String(timeArr.shift()).split(".") : null;
-                               var seconds:Number = (secondsArr != null && secondsArr.length > 0) ? Number(secondsArr.shift()) : 0;
-                               var milliseconds:Number = (secondsArr != null && secondsArr.length > 0) ? Number(secondsArr.shift()) : 0;
-                               var utc:Number = Date.UTC(year, month-1, date, hour, minutes, seconds, milliseconds);
-                               var offset:Number = (((offsetHours * 3600000) + (offsetMinutes * 60000)) * multiplier);
-                               finalDate = new Date(utc - offset);
-       
-                               if (finalDate.toString() == "Invalid Date")
-                               {
-                                       throw new Error("This date does not conform to W3CDTF.");
-                               }
-                       }
-                       catch (e:Error)
-                       {
-                               var eStr:String = "Unable to parse the string [" +str+ "] into a date. ";
-                               eStr += "The internal error was: " + e.toString();
-                               throw new Error(eStr);
-                       }
-            return finalDate;
-               }
-            
-               /**
-               * Returns a date string formatted according to W3CDTF.
-               *
-               * @param d
-               * @param includeMilliseconds Determines whether to include the
-               * milliseconds value (if any) in the formatted string.
-               *
-               * @returns
-               *
-               * @langversion ActionScript 3.0
-               * @playerversion Flash 9.0
-               * @tiptext
-               *
-               * @see http://www.w3.org/TR/NOTE-datetime
-               */                   
-               public static function toW3CDTF(d:Date,includeMilliseconds:Boolean=false):String
-               {
-                       var date:Number = d.getUTCDate();
-                       var month:Number = d.getUTCMonth();
-                       var hours:Number = d.getUTCHours();
-                       var minutes:Number = d.getUTCMinutes();
-                       var seconds:Number = d.getUTCSeconds();
-                       var milliseconds:Number = d.getUTCMilliseconds();
-                       var sb:String = new String();
-                       
-                       sb += d.getUTCFullYear();
-                       sb += "-";
-                       
-                       //thanks to "dom" who sent in a fix for the line below
-                       if (month + 1 < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += month + 1;
-                       sb += "-";
-                       if (date < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += date;
-                       sb += "T";
-                       if (hours < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += hours;
-                       sb += ":";
-                       if (minutes < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += minutes;
-                       sb += ":";
-                       if (seconds < 10)
-                       {
-                               sb += "0";
-                       }
-                       sb += seconds;
-                       if (includeMilliseconds && milliseconds > 0)
-                       {
-                               sb += ".";
-                               sb += milliseconds;
-                       }
-                       sb += "-00:00";
-                       return sb;
-               }
-               
-               /**
-                * Converts a date into just after midnight.
-                */
-               public static function makeMorning(d:Date):Date
-               {
-                       var d:Date = new Date(d.time);
-                       d.hours = 0;
-            d.minutes = 0;
-            d.seconds = 0;
-            d.milliseconds = 0;
-            return d;
-               }
-               
-               /**
-                * Converts a date into just befor midnight.
-                */
-               public static function makeNight(d:Date):Date
-               {
-                       var d:Date = new Date(d.time);
-                       d.hours = 23;
-            d.minutes = 59;
-            d.seconds = 59;
-            d.milliseconds = 999;                              
-            return d;
-               }
-
-               /**
-                * Sort of converts a date into UTC.
-                */
-               public static function getUTCDate(d:Date):Date
-               {
-                       var nd:Date = new Date();
-                       var offset:Number = d.getTimezoneOffset() * 60 * 1000; 
-                       nd.setTime(d.getTime() + offset);
-                       return nd;
-               }
-       }
-}
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as
deleted file mode 100644 (file)
index 9552ef4..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.utils
-{
-       import flash.utils.Dictionary;
-       
-       public class DictionaryUtil
-       {
-               
-               /**
-               *       Returns an Array of all keys within the specified dictionary.   
-               * 
-               *       @param d The Dictionary instance whose keys will be returned.
-               * 
-               *       @return Array of keys contained within the Dictionary
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */                                      
-               public static function getKeys(d:Dictionary):Array
-               {
-                       var a:Array = new Array();
-                       
-                       for (var key:Object in d)
-                       {
-                               a.push(key);
-                       }
-                       
-                       return a;
-               }
-               
-               /**
-               *       Returns an Array of all values within the specified dictionary.         
-               * 
-               *       @param d The Dictionary instance whose values will be returned.
-               * 
-               *       @return Array of values contained within the Dictionary
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */                                      
-               public static function getValues(d:Dictionary):Array
-               {
-                       var a:Array = new Array();
-                       
-                       for each (var value:Object in d)
-                       {
-                               a.push(value);
-                       }
-                       
-                       return a;
-               }
-               
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as
deleted file mode 100644 (file)
index 8c812fe..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.utils {\r
-       \r
-       import flash.utils.Endian;\r
-       \r
-       /**\r
-        * Contains reusable methods for operations pertaining \r
-        * to int values.\r
-        */\r
-       public class IntUtil {\r
-               \r
-               /**\r
-                * Rotates x left n bits\r
-                *\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function rol ( x:int, n:int ):int {\r
-                       return ( x << n ) | ( x >>> ( 32 - n ) );\r
-               }\r
-               \r
-               /**\r
-                * Rotates x right n bits\r
-                *\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function ror ( x:int, n:int ):uint {\r
-                       var nn:int = 32 - n;\r
-                       return ( x << nn ) | ( x >>> ( 32 - nn ) );\r
-               }\r
-               \r
-               /** String for quick lookup of a hex character based on index */\r
-               private static var hexChars:String = "0123456789abcdef";\r
-               \r
-               /**\r
-                * Outputs the hex value of a int, allowing the developer to specify\r
-                * the endinaness in the process.  Hex output is lowercase.\r
-                *\r
-                * @param n The int value to output as hex\r
-                * @param bigEndian Flag to output the int as big or little endian\r
-                * @return A string of length 8 corresponding to the \r
-                *              hex representation of n ( minus the leading "0x" )\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function toHex( n:int, bigEndian:Boolean = false ):String {\r
-                       var s:String = "";\r
-                       \r
-                       if ( bigEndian ) {\r
-                               for ( var i:int = 0; i < 4; i++ ) {\r
-                                       s += hexChars.charAt( ( n >> ( ( 3 - i ) * 8 + 4 ) ) & 0xF ) \r
-                                               + hexChars.charAt( ( n >> ( ( 3 - i ) * 8 ) ) & 0xF );\r
-                               }\r
-                       } else {\r
-                               for ( var x:int = 0; x < 4; x++ ) {\r
-                                       s += hexChars.charAt( ( n >> ( x * 8 + 4 ) ) & 0xF )\r
-                                               + hexChars.charAt( ( n >> ( x * 8 ) ) & 0xF );\r
-                               }\r
-                       }\r
-                       \r
-                       return s;\r
-               }\r
-       }\r
-               \r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as
deleted file mode 100644 (file)
index 6fe12e1..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.utils\r
-{\r
-\r
-       /**\r
-       *       Class that contains static utility methods for formatting Numbers\r
-       * \r
-       *       @langversion ActionScript 3.0\r
-       *       @playerversion Flash 9.0\r
-       *       @tiptext\r
-       *\r
-       *       @see #mx.formatters.NumberFormatter\r
-       */              \r
-       public class NumberFormatter\r
-       {\r
-       \r
-               /**\r
-               *       Formats a number to include a leading zero if it is a single digit\r
-               *       between -1 and 10.      \r
-               * \r
-               *       @param n The number that will be formatted\r
-               *\r
-               *       @return A string with single digits between -1 and 10 padded with a \r
-               *       leading zero.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */              \r
-               public static function addLeadingZero(n:Number):String\r
-               {\r
-                       var out:String = String(n);\r
-                       \r
-                       if(n < 10 && n > -1)\r
-                       {\r
-                               out = "0" + out;\r
-                       }\r
-                       \r
-                       return out;\r
-               }       \r
-       \r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as
deleted file mode 100644 (file)
index 6aa1979..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  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 Adobe Systems Incorporated nor the names of its 
-    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.
-*/
-
-package com.adobe.utils
-{
-       
-       /**
-       *       Class that contains static utility methods for manipulating Strings.
-       * 
-       *       @langversion ActionScript 3.0
-       *       @playerversion Flash 9.0
-       *       @tiptext
-       */              
-       public class StringUtil
-       {
-
-               
-               /**
-               *       Does a case insensitive compare or two strings and returns true if
-               *       they are equal.
-               * 
-               *       @param s1 The first string to compare.
-               *
-               *       @param s2 The second string to compare.
-               *
-               *       @returns A boolean value indicating whether the strings' values are 
-               *       equal in a case sensitive compare.      
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */                      
-               public static function stringsAreEqual(s1:String, s2:String, 
-                                                                                       caseSensitive:Boolean):Boolean
-               {
-                       if(caseSensitive)
-                       {
-                               return (s1 == s2);
-                       }
-                       else
-                       {
-                               return (s1.toUpperCase() == s2.toUpperCase());
-                       }
-               }
-               
-               /**
-               *       Removes whitespace from the front and the end of the specified
-               *       string.
-               * 
-               *       @param input The String whose beginning and ending whitespace will
-               *       will be removed.
-               *
-               *       @returns A String with whitespace removed from the begining and end     
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */                      
-               public static function trim(input:String):String
-               {
-                       return StringUtil.ltrim(StringUtil.rtrim(input));
-               }
-
-               /**
-               *       Removes whitespace from the front of the specified string.
-               * 
-               *       @param input The String whose beginning whitespace will will be removed.
-               *
-               *       @returns A String with whitespace removed from the begining     
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function ltrim(input:String):String
-               {
-                       var size:Number = input.length;
-                       for(var i:Number = 0; i < size; i++)
-                       {
-                               if(input.charCodeAt(i) > 32)
-                               {
-                                       return input.substring(i);
-                               }
-                       }
-                       return "";
-               }
-
-               /**
-               *       Removes whitespace from the end of the specified string.
-               * 
-               *       @param input The String whose ending whitespace will will be removed.
-               *
-               *       @returns A String with whitespace removed from the end  
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function rtrim(input:String):String
-               {
-                       var size:Number = input.length;
-                       for(var i:Number = size; i > 0; i--)
-                       {
-                               if(input.charCodeAt(i - 1) > 32)
-                               {
-                                       return input.substring(0, i);
-                               }
-                       }
-
-                       return "";
-               }
-
-               /**
-               *       Determines whether the specified string begins with the spcified prefix.
-               * 
-               *       @param input The string that the prefix will be checked against.
-               *
-               *       @param prefix The prefix that will be tested against the string.
-               *
-               *       @returns True if the string starts with the prefix, false if it does not.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function beginsWith(input:String, prefix:String):Boolean
-               {                       
-                       return (prefix == input.substring(0, prefix.length));
-               }       
-
-               /**
-               *       Determines whether the specified string ends with the spcified suffix.
-               * 
-               *       @param input The string that the suffic will be checked against.
-               *
-               *       @param prefix The suffic that will be tested against the string.
-               *
-               *       @returns True if the string ends with the suffix, false if it does not.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function endsWith(input:String, suffix:String):Boolean
-               {
-                       return (suffix == input.substring(input.length - suffix.length));
-               }       
-
-               /**
-               *       Removes all instances of the remove string in the input string.
-               * 
-               *       @param input The string that will be checked for instances of remove
-               *       string
-               *
-               *       @param remove The string that will be removed from the input string.
-               *
-               *       @returns A String with the remove string removed.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */      
-               public static function remove(input:String, remove:String):String
-               {
-                       return StringUtil.replace(input, remove, "");
-               }
-
-               /**
-               *       Replaces all instances of the replace string in the input string
-               *       with the replaceWith string.
-               * 
-               *       @param input The string that instances of replace string will be 
-               *       replaces with removeWith string.
-               *
-               *       @param replace The string that will be replaced by instances of 
-               *       the replaceWith string.
-               *
-               *       @param replaceWith The string that will replace instances of replace
-               *       string.
-               *
-               *       @returns A new String with the replace string replaced with the 
-               *       replaceWith string.
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */
-               public static function replace(input:String, replace:String, replaceWith:String):String
-               {
-                       //change to StringBuilder
-                       var sb:String = new String();
-                       var found:Boolean = false;
-
-                       var sLen:Number = input.length;
-                       var rLen:Number = replace.length;
-
-                       for (var i:Number = 0; i < sLen; i++)
-                       {
-                               if(input.charAt(i) == replace.charAt(0))
-                               {   
-                                       found = true;
-                                       for(var j:Number = 0; j < rLen; j++)
-                                       {
-                                               if(!(input.charAt(i + j) == replace.charAt(j)))
-                                               {
-                                                       found = false;
-                                                       break;
-                                               }
-                                       }
-
-                                       if(found)
-                                       {
-                                               sb += replaceWith;
-                                               i = i + (rLen - 1);
-                                               continue;
-                                       }
-                               }
-                               sb += input.charAt(i);
-                       }
-                       //TODO : if the string is not found, should we return the original
-                       //string?
-                       return sb;
-               }
-               
-               /**
-               *       Specifies whether the specified string is either non-null, or contains
-               *       characters (i.e. length is greater that 0)
-               * 
-               *       @param s The string which is being checked for a value
-               *
-               *       @langversion ActionScript 3.0
-               *       @playerversion Flash 9.0
-               *       @tiptext
-               */              
-               public static function stringHasValue(s:String):Boolean
-               {
-                       //todo: this needs a unit test
-                       return (s != null && s.length > 0);                     
-               }
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as b/platforma/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as
deleted file mode 100644 (file)
index 24fce00..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.utils\r
-{\r
-\r
-       public class XMLUtil\r
-       {\r
-               /**\r
-                * Constant representing a text node type returned from XML.nodeKind.\r
-                * \r
-                * @see XML.nodeKind()\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */\r
-               public static const TEXT:String = "text";\r
-               \r
-               /**\r
-                * Constant representing a comment node type returned from XML.nodeKind.\r
-                * \r
-                * @see XML.nodeKind()\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */             \r
-               public static const COMMENT:String = "comment";\r
-               \r
-               /**\r
-                * Constant representing a processing instruction type returned from XML.nodeKind.\r
-                * \r
-                * @see XML.nodeKind()\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */             \r
-               public static const PROCESSING_INSTRUCTION:String = "processing-instruction";\r
-               \r
-               /**\r
-                * Constant representing an attribute type returned from XML.nodeKind.\r
-                * \r
-                * @see XML.nodeKind()\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */             \r
-               public static const ATTRIBUTE:String = "attribute";\r
-               \r
-               /**\r
-                * Constant representing a element type returned from XML.nodeKind.\r
-                * \r
-                * @see XML.nodeKind()\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */             \r
-               public static const ELEMENT:String = "element";\r
-               \r
-               /**\r
-                * Checks whether the specified string is valid and well formed XML.\r
-                * \r
-                * @param data The string that is being checked to see if it is valid XML.\r
-                * \r
-                * @return A Boolean value indicating whether the specified string is\r
-                * valid XML.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */\r
-               public static function isValidXML(data:String):Boolean\r
-               {\r
-                       var xml:XML;\r
-                       \r
-                       try\r
-                       {\r
-                               xml = new XML(data);\r
-                       }\r
-                       catch(e:Error)\r
-                       {\r
-                               return false;\r
-                       }\r
-                       \r
-                       if(xml.nodeKind() != XMLUtil.ELEMENT)\r
-                       {\r
-                               return false;\r
-                       }\r
-                       \r
-                       return true;\r
-               }\r
-               \r
-               /**\r
-                * Returns the next sibling of the specified node relative to the node's parent.\r
-                * \r
-                * @param x The node whose next sibling will be returned.\r
-                * \r
-                * @return The next sibling of the node. null if the node does not have \r
-                * a sibling after it, or if the node has no parent.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */             \r
-               public static function getNextSibling(x:XML):XML\r
-               {       \r
-                       return XMLUtil.getSiblingByIndex(x, 1);\r
-               }\r
-               \r
-               /**\r
-                * Returns the sibling before the specified node relative to the node's parent.\r
-                * \r
-                * @param x The node whose sibling before it will be returned.\r
-                * \r
-                * @return The sibling before the node. null if the node does not have \r
-                * a sibling before it, or if the node has no parent.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */                     \r
-               public static function getPreviousSibling(x:XML):XML\r
-               {       \r
-                       return XMLUtil.getSiblingByIndex(x, -1);\r
-               }               \r
-               \r
-               protected static function getSiblingByIndex(x:XML, count:int):XML       \r
-               {\r
-                       var out:XML;\r
-                       \r
-                       try\r
-                       {\r
-                               out = x.parent().children()[x.childIndex() + count];    \r
-                       }               \r
-                       catch(e:Error)\r
-                       {\r
-                               return null;\r
-                       }\r
-                       \r
-                       return out;                     \r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as b/platforma/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as
deleted file mode 100644 (file)
index 7080287..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-\r
-package com.adobe.webapis \r
-{\r
-       import flash.events.EventDispatcher;\r
-\r
-       /**\r
-       * Base class for remote service classes.\r
-       */\r
-       public class ServiceBase extends EventDispatcher\r
-       {\r
-               public function ServiceBase()\r
-               {\r
-               }\r
-               \r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as b/platforma/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as
deleted file mode 100644 (file)
index fc0085c..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.webapis\r
-{\r
-       import flash.events.IOErrorEvent;\r
-       import flash.events.SecurityErrorEvent;\r
-       import flash.events.ProgressEvent;\r
-       \r
-       import com.adobe.net.DynamicURLLoader;\r
-       \r
-               /**\r
-               *       Dispatched when data is \r
-               *       received as the download operation progresses.\r
-               *        \r
-               *       @eventType flash.events.ProgressEvent.PROGRESS\r
-               * \r
-               * @langversion ActionScript 3.0\r
-               * @playerversion Flash 9.0\r
-               */\r
-               [Event(name="progress", type="flash.events.ProgressEvent")]             \r
-       \r
-               /**\r
-               *       Dispatched if a call to the server results in a fatal \r
-               *       error that terminates the download.\r
-               * \r
-               *       @eventType flash.events.IOErrorEvent.IO_ERROR\r
-               * \r
-               * @langversion ActionScript 3.0\r
-               * @playerversion Flash 9.0\r
-               */\r
-               [Event(name="ioError", type="flash.events.IOErrorEvent")]               \r
-               \r
-               /**\r
-               *       A securityError event occurs if a call attempts to\r
-               *       load data from a server outside the security sandbox.\r
-               * \r
-               *       @eventType flash.events.SecurityErrorEvent.SECURITY_ERROR\r
-               * \r
-               * @langversion ActionScript 3.0\r
-               * @playerversion Flash 9.0\r
-               */\r
-               [Event(name="securityError", type="flash.events.SecurityErrorEvent")]   \r
-       \r
-       /**\r
-       *       Base class for services that utilize URLLoader\r
-       *       to communicate with remote APIs / Services.\r
-       * \r
-       * @langversion ActionScript 3.0\r
-       * @playerversion Flash 9.0\r
-       */\r
-       public class URLLoaderBase extends ServiceBase\r
-       {       \r
-               protected function getURLLoader():DynamicURLLoader\r
-               {\r
-                       var loader:DynamicURLLoader = new DynamicURLLoader();\r
-                               loader.addEventListener("progress", onProgress);\r
-                               loader.addEventListener("ioError", onIOError);\r
-                               loader.addEventListener("securityError", onSecurityError);\r
-                       \r
-                       return loader;                  \r
-               }               \r
-               \r
-               private function onIOError(event:IOErrorEvent):void\r
-               {\r
-                       dispatchEvent(event);\r
-               }                       \r
-               \r
-               private function onSecurityError(event:SecurityErrorEvent):void\r
-               {\r
-                       dispatchEvent(event);\r
-               }       \r
-               \r
-               private function onProgress(event:ProgressEvent):void\r
-               {\r
-                       dispatchEvent(event);\r
-               }       \r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as b/platforma/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as
deleted file mode 100644 (file)
index d1aaf3d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  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\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-\r
-package com.adobe.webapis.events\r
-{\r
-\r
-       import flash.events.Event;\r
-\r
-       /**\r
-       * Event class that contains data loaded from remote services.\r
-       *\r
-       * @author Mike Chambers\r
-       */\r
-       public class ServiceEvent extends Event\r
-       {\r
-               private var _data:Object = new Object();;\r
-\r
-               /**\r
-               * Constructor for ServiceEvent class.\r
-               *\r
-               * @param type The type of event that the instance represents.\r
-               */\r
-               public function ServiceEvent(type:String, bubbles:Boolean = false, \r
-                                                                                                               cancelable:Boolean=false)\r
-               {\r
-                       super(type, bubbles, cancelable);\r
-               }\r
-\r
-               /**\r
-               *       This object contains data loaded in response\r
-               *       to remote service calls, and properties associated with that call.\r
-               */\r
-               public function get data():Object\r
-               {\r
-                       return _data;\r
-               }\r
-\r
-               public function set data(d:Object):void\r
-               {\r
-                       _data = d;\r
-               }\r
-               \r
-\r
-       }\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/_notes/dwsync.xml b/platforma/static/filebrowser/uploadify/example/_notes/dwsync.xml
deleted file mode 100644 (file)
index 36ecaa5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>\r
-<dwsync>\r
-<file name="index.php" server="ftp.uploadify.com/www.uploadify.com/" local="128911652226450000" remote="128911651800000000" />\r
-<file name="cancel.png" server="ftp.uploadify.com/www.uploadify.com/" local="128794107540000000" remote="128911638000000000" />\r
-</dwsync>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/cancel.png b/platforma/static/filebrowser/uploadify/example/cancel.png
deleted file mode 100644 (file)
index 1c062ae..0000000
Binary files a/platforma/static/filebrowser/uploadify/example/cancel.png and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/example/css/_notes/dwsync.xml b/platforma/static/filebrowser/uploadify/example/css/_notes/dwsync.xml
deleted file mode 100644 (file)
index 049ffa5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>\r
-<dwsync>\r
-<file name="default.css" server="ftp.uploadify.com/www.uploadify.com/" local="128911634053800000" remote="128911633800000000" />\r
-<file name="uploadify.css" server="ftp.uploadify.com/www.uploadify.com/" local="128911650121540000" remote="128911650000000000" />\r
-</dwsync>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/css/default.css b/platforma/static/filebrowser/uploadify/example/css/default.css
deleted file mode 100644 (file)
index ec5902d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-body {\r
-       font: 12px/16px Arial, Helvetica, sans-serif;\r
-}\r
-#fileQueue {\r
-       width: 400px;\r
-       height: 300px;\r
-       overflow: auto;\r
-       border: 1px solid #E5E5E5;\r
-       margin-bottom: 10px;\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/css/uploadify.css b/platforma/static/filebrowser/uploadify/example/css/uploadify.css
deleted file mode 100644 (file)
index 0cf8c0e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-.uploadifyQueueItem {\r
-       font: 11px Verdana, Geneva, sans-serif;\r
-       border: 2px solid #E5E5E5;\r
-       background-color: #F5F5F5;\r
-       margin-top: 5px;\r
-       padding: 10px;\r
-       width: 350px;\r
-}\r
-.uploadifyError {\r
-       border: 2px solid #FBCBBC !important;\r
-       background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
-       float: right;\r
-}\r
-.uploadifyProgress {\r
-       background-color: #FFFFFF;\r
-       border-top: 1px solid #808080;\r
-       border-left: 1px solid #808080;\r
-       border-right: 1px solid #C5C5C5;\r
-       border-bottom: 1px solid #C5C5C5;\r
-       margin-top: 10px;\r
-       width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
-       background-color: #0099FF;\r
-       width: 1px;\r
-       height: 3px;\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/index.php b/platforma/static/filebrowser/uploadify/example/index.php
deleted file mode 100644 (file)
index 769d11c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
-<head>\r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-<title>Uploadify Example Script</title>\r
-<link href="/example/css/default.css" rel="stylesheet" type="text/css" />\r
-<link href="/example/css/uploadify.css" rel="stylesheet" type="text/css" />\r
-<script type="text/javascript" src="/example/scripts/jquery-1.3.2.min.js"></script>\r
-<script type="text/javascript" src="/example/scripts/swfobject.js"></script>\r
-<script type="text/javascript" src="/example/scripts/jquery.uploadify.v2.1.0.min.js"></script>\r
-<script type="text/javascript">\r
-$(document).ready(function() {\r
-       $("#uploadify").uploadify({\r
-               'uploader'       : 'scripts/uploadify.swf',\r
-               'script'         : 'scripts/uploadify.php',\r
-               'cancelImg'      : 'cancel.png',\r
-               'folder'         : 'uploads',\r
-               'queueID'        : 'fileQueue',\r
-               'auto'           : true,\r
-               'multi'          : true\r
-       });\r
-});\r
-</script>\r
-</head>\r
-\r
-<body>\r
-<div id="fileQueue"></div>\r
-<input type="file" name="uploadify" id="uploadify" />\r
-<p><a href="javascript:jQuery('#uploadify').uploadifyClearQueue()">Cancel All Uploads</a></p>\r
-</body>\r
-</html>\r
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml b/platforma/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml
deleted file mode 100644 (file)
index 13ca043..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>\r
-<dwsync>\r
-<file name="check.php" server="ftp.uploadify.com/www.uploadify.com/" local="128870002502195719" remote="128911633200000000" />\r
-<file name="expressInstall.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128886114740000000" remote="128911633200000000" />\r
-<file name="jquery-1.3.2.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128799223180000000" remote="128911633200000000" />\r
-<file name="jquery.uploadify.v2.0.0.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128911646622270000" remote="128911646400000000" />\r
-<file name="uploadify.php" server="ftp.uploadify.com/www.uploadify.com/" local="128907148701750000" remote="128911633200000000" />\r
-<file name="uploadify.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128911508403330000" remote="128911633200000000" />\r
-<file name="swfobject.js" server="ftp.uploadify.com/www.uploadify.com/" local="128892320400000000" remote="128911637400000000" />\r
-</dwsync>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/check.php b/platforma/static/filebrowser/uploadify/example/scripts/check.php
deleted file mode 100644 (file)
index d7dc571..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php\r
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-$fileArray = array();\r
-foreach ($_POST as $key => $value) {\r
-       if ($key != 'folder') {\r
-               if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) {\r
-                       $fileArray[$key] = $value;\r
-               }\r
-       }\r
-}\r
-echo json_encode($fileArray);\r
-?>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/expressInstall.swf b/platforma/static/filebrowser/uploadify/example/scripts/expressInstall.swf
deleted file mode 100644 (file)
index 0fbf8fc..0000000
Binary files a/platforma/static/filebrowser/uploadify/example/scripts/expressInstall.swf and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js b/platforma/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js
deleted file mode 100644 (file)
index b1ae21d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * Sizzle CSS Selector Engine - v0.9.3
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js b/platforma/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js
deleted file mode 100644 (file)
index 4305311..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Uploadify v2.1.0
-Release Date: August 24, 2009
-
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels
-
-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.
-*/
-
-if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('<div id="'+a(this).attr("id")+'Uploader"></div>');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('<div id="'+a(this).attr("id")+'Queue" class="uploadifyQueue"></div>')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('<div id="'+a(this).attr("id")+h+'" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#'+a(this).attr("id")+"').uploadifyCancel('"+h+'\')"><img src="'+settings.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+k+l+')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="'+a(this).attr("id")+h+'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full.  The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d<b.length;d++){var h=b[d].split("=");e[h[0]]=h[1]}g=e}return g}},uploadifyUpload:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").startFileUpload(b,false)})},uploadifyCancel:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").cancelFileUpload(b,true,false)})},uploadifyClearQueue:function(){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").clearFileUploadQueue(false)})}})})(jQuery)};
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/swfobject.js b/platforma/static/filebrowser/uploadify/example/scripts/swfobject.js
deleted file mode 100644 (file)
index acc7da4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/*     SWFObject v2.2 <http://code.google.com/p/swfobject/>
-       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/uploadify.php b/platforma/static/filebrowser/uploadify/example/scripts/uploadify.php
deleted file mode 100644 (file)
index 8bf14a6..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php\r
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-if (!empty($_FILES)) {\r
-       $tempFile = $_FILES['Filedata']['tmp_name'];\r
-       $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';\r
-       $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];\r
-       \r
-       // $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);\r
-       // $fileTypes  = str_replace(';','|',$fileTypes);\r
-       // $typesArray = split('\|',$fileTypes);\r
-       // $fileParts  = pathinfo($_FILES['Filedata']['name']);\r
-       \r
-       // if (in_array($fileParts['extension'],$typesArray)) {\r
-               // Uncomment the following line if you want to make the directory if it doesn't exist\r
-               // mkdir(str_replace('//','/',$targetPath), 0755, true);\r
-               \r
-               move_uploaded_file($tempFile,$targetFile);\r
-               echo "1";\r
-       // } else {\r
-       //      echo 'Invalid file type.';\r
-       // }\r
-}\r
-?>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/example/scripts/uploadify.swf b/platforma/static/filebrowser/uploadify/example/scripts/uploadify.swf
deleted file mode 100644 (file)
index 4d27952..0000000
Binary files a/platforma/static/filebrowser/uploadify/example/scripts/uploadify.swf and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/expressInstall.swf b/platforma/static/filebrowser/uploadify/expressInstall.swf
deleted file mode 100644 (file)
index 0fbf8fc..0000000
Binary files a/platforma/static/filebrowser/uploadify/expressInstall.swf and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/jquery-1.3.2.min.js b/platforma/static/filebrowser/uploadify/jquery-1.3.2.min.js
deleted file mode 100644 (file)
index b1ae21d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * Sizzle CSS Selector Engine - v0.9.3
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js b/platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js
deleted file mode 100644 (file)
index 43c87be..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
-Uploadify v2.1.0
-Release Date: August 24, 2009
-
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels
-
-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.
-*/
-
-if(jQuery)(
-       function(jQuery){
-               jQuery.extend(jQuery.fn,{
-                       uploadify:function(options) {
-                               jQuery(this).each(function(){
-                                       settings = jQuery.extend({
-                                       id             : jQuery(this).attr('id'), // The ID of the object being Uploadified
-                                       uploader       : 'uploadify.swf', // The path to the uploadify swf file
-                                       script         : 'uploadify.php', // The path to the uploadify backend upload script
-                                       expressInstall : null, // The path to the express install swf file
-                                       folder         : '', // The path to the upload folder
-                                       height         : 30, // The height of the flash button
-                                       width          : 110, // The width of the flash button
-                                       cancelImg      : 'cancel.png', // The path to the cancel image for the default file queue item container
-                                       wmode          : 'opaque', // The wmode of the flash file
-                                       scriptAccess   : 'sameDomain', // Set to "always" to allow script access across domains
-                                       fileDataName   : 'Filedata', // The name of the file collection object in the backend upload script
-                                       method         : 'POST', // The method for sending variables to the backend upload script
-                                       queueSizeLimit : 999, // The maximum size of the file queue
-                                       simUploadLimit : 1, // The number of simultaneous uploads allowed
-                                       queueID        : false, // The optional ID of the queue container
-                                       displayData    : 'percentage', // Set to "speed" to show the upload speed in the default queue item
-                                       onInit         : function() {}, // Function to run when uploadify is initialized
-                                       onSelect       : function() {}, // Function to run when a file is selected
-                                       onQueueFull    : function() {}, // Function to run when the queue reaches capacity
-                                       onCheck        : function() {}, // Function to run when script checks for duplicate files on the server
-                                       onCancel       : function() {}, // Function to run when an item is cleared from the queue
-                                       onError        : function() {}, // Function to run when an upload item returns an error
-                                       onProgress     : function() {}, // Function to run each time the upload progress is updated
-                                       onComplete     : function() {}, // Function to run when an upload is completed
-                                       onAllComplete  : function() {}  // Functino to run when all uploads are completed
-                               }, options);
-                               var pagePath = location.pathname;
-                               pagePath = pagePath.split('/');
-                               pagePath.pop();
-                               pagePath = pagePath.join('/') + '/';
-                               var data = {};
-                               data.uploadifyID = settings.id;
-                               data.pagepath = pagePath;
-                               if (settings.buttonImg) data.buttonImg = escape(settings.buttonImg);
-                               if (settings.buttonText) data.buttonText = escape(settings.buttonText);
-                               if (settings.rollover) data.rollover = true;
-                               data.script = settings.script;
-                               data.folder = escape(settings.folder);
-                               if (settings.scriptData) {
-                                       var scriptDataString = '';
-                                       for (var name in settings.scriptData) {
-                                               scriptDataString += '&' + name + '=' + settings.scriptData[name];
-                                       }
-                                       data.scriptData = escape(scriptDataString.substr(1));
-                               }
-                               data.width          = settings.width;
-                               data.height         = settings.height;
-                               data.wmode          = settings.wmode;
-                               data.method         = settings.method;
-                               data.queueSizeLimit = settings.queueSizeLimit;
-                               data.simUploadLimit = settings.simUploadLimit;
-                               if (settings.hideButton)   data.hideButton   = true;
-                               if (settings.fileDesc)     data.fileDesc     = settings.fileDesc;
-                               if (settings.fileExt)      data.fileExt      = settings.fileExt;
-                               if (settings.multi)        data.multi        = true;
-                               if (settings.auto)         data.auto         = true;
-                               if (settings.sizeLimit)    data.sizeLimit    = settings.sizeLimit;
-                               if (settings.checkScript)  data.checkScript  = settings.checkScript;
-                               if (settings.fileDataName) data.fileDataName = settings.fileDataName;
-                               if (settings.queueID)      data.queueID      = settings.queueID;
-                               if (settings.onInit() !== false) {
-                                       jQuery(this).css('display','none');
-                                       jQuery(this).after('<div id="' + jQuery(this).attr('id') + 'Uploader"></div>');
-                                       swfobject.embedSWF(settings.uploader, settings.id + 'Uploader', settings.width, settings.height, '9.0.24', settings.expressInstall, data, {'quality':'high','wmode':settings.wmode,'allowScriptAccess':settings.scriptAccess});
-                                       if (settings.queueID == false) {
-                                               jQuery("#" + jQuery(this).attr('id') + "Uploader").after('<div id="' + jQuery(this).attr('id') + 'Queue" class="uploadifyQueue"></div>');
-                                       }
-                               }
-                               if (typeof(settings.onOpen) == 'function') {
-                                       jQuery(this).bind("uploadifyOpen", settings.onOpen);
-                               }
-                               jQuery(this).bind("uploadifySelect", {'action': settings.onSelect, 'queueID': settings.queueID}, function(event, ID, fileObj) {
-                                       if (event.data.action(event, ID, fileObj) !== false) {
-                                               var byteSize = Math.round(fileObj.size / 1024 * 100) * .01;
-                                               var suffix = 'KB';
-                                               if (byteSize > 1000) {
-                                                       byteSize = Math.round(byteSize *.001 * 100) * .01;
-                                                       suffix = 'MB';
-                                               }
-                                               var sizeParts = byteSize.toString().split('.');
-                                               if (sizeParts.length > 1) {
-                                                       byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2);
-                                               } else {
-                                                       byteSize = sizeParts[0];
-                                               }
-                                               if (fileObj.name.length > 20) {
-                                                       fileName = fileObj.name.substr(0,20) + '...';
-                                               } else {
-                                                       fileName = fileObj.name;
-                                               }
-                                               queue = '#' + jQuery(this).attr('id') + 'Queue';
-                                               if (event.data.queueID) {
-                                                       queue = '#' + event.data.queueID;
-                                               }
-                                               jQuery(queue).append('<div id="' + jQuery(this).attr('id') + ID + '" class="uploadifyQueueItem">\
-                                                               <div class="cancel">\
-                                                                       <a href="javascript:jQuery(\'#' + jQuery(this).attr('id') + '\').uploadifyCancel(\'' + ID + '\')"><img src="' + settings.cancelImg + '" border="0" /></a>\
-                                                               </div>\
-                                                               <span class="fileName">' + fileName + ' (' + byteSize + suffix + ')</span><span class="percentage"></span>\
-                                                               <div class="uploadifyProgress">\
-                                                                       <div id="' + jQuery(this).attr('id') + ID + 'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div>\
-                                                               </div>\
-                                                       </div>');
-                                       }
-                               });
-                               if (typeof(settings.onSelectOnce) == 'function') {
-                                       jQuery(this).bind("uploadifySelectOnce", settings.onSelectOnce);
-                               }
-                               jQuery(this).bind("uploadifyQueueFull", {'action': settings.onQueueFull}, function(event, queueSizeLimit) {
-                                       if (event.data.action(event, queueSizeLimit) !== false) {
-                                               alert('The queue is full.  The max size is ' + queueSizeLimit + '.');
-                                       }
-                               });
-                               jQuery(this).bind("uploadifyCheckExist", {'action': settings.onCheck}, function(event, checkScript, fileQueueObj, folder, single) {
-                                       var postData = new Object();
-                                       postData = fileQueueObj;
-                                       postData.folder = pagePath + folder;
-                                       if (single) {
-                                               for (var ID in fileQueueObj) {
-                                                       var singleFileID = ID;
-                                               }
-                                       }
-                                       jQuery.post(checkScript, postData, function(data) {
-                                               for(var key in data) {
-                                                       if (event.data.action(event, checkScript, fileQueueObj, folder, single) !== false) {
-                                                               var replaceFile = confirm("Do you want to replace the file " + data[key] + "?");
-                                                               if (!replaceFile) {
-                                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').cancelFileUpload(key, true,true);
-                                                               }
-                                                       }
-                                               }
-                                               if (single) {
-                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(singleFileID, true);
-                                               } else {
-                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(null, true);
-                                               }
-                                       }, "json");
-                               });
-                               jQuery(this).bind("uploadifyCancel", {'action': settings.onCancel}, function(event, ID, fileObj, data, clearFast) {
-                                       if (event.data.action(event, ID, fileObj, data, clearFast) !== false) {
-                                               var fadeSpeed = (clearFast == true) ? 0 : 250;
-                                               jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(fadeSpeed, function() { jQuery(this).remove() });
-                                       }
-                               });
-                               if (typeof(settings.onClearQueue) == 'function') {
-                                       jQuery(this).bind("uploadifyClearQueue", settings.onClearQueue);
-                               }
-                               var errorArray = [];
-                               jQuery(this).bind("uploadifyError", {'action': settings.onError}, function(event, ID, fileObj, errorObj) {
-                                       if (event.data.action(event, ID, fileObj, errorObj) !== false) {
-                                               var fileArray = new Array(ID, fileObj, errorObj);
-                                               errorArray.push(fileArray);
-                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(" - " + errorObj.type + " Error");
-                                               jQuery("#" + jQuery(this).attr('id') + ID).addClass('uploadifyError');
-                                       }
-                               });
-                               jQuery(this).bind("uploadifyProgress", {'action': settings.onProgress, 'toDisplay': settings.displayData}, function(event, ID, fileObj, data) {
-                                       if (event.data.action(event, ID, fileObj, data) !== false) {
-                                               jQuery("#" + jQuery(this).attr('id') + ID + "ProgressBar").css('width', data.percentage + '%');
-                                               if (event.data.toDisplay == 'percentage') displayData = ' - ' + data.percentage + '%';
-                                               if (event.data.toDisplay == 'speed') displayData = ' - ' + data.speed + 'KB/s';
-                                               if (event.data.toDisplay == null) displayData = ' ';
-                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(displayData);
-                                       }
-                               });
-                               jQuery(this).bind("uploadifyComplete", {'action': settings.onComplete}, function(event, ID, fileObj, response, data) {
-                                       if (event.data.action(event, ID, fileObj, unescape(response), data) !== false) {
-                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(' - Completed');
-                                               jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(250, function() { jQuery(this).remove()});
-                                       }
-                               });
-                               if (typeof(settings.onAllComplete) == 'function') {
-                                       jQuery(this).bind("uploadifyAllComplete", {'action': settings.onAllComplete}, function(event, uploadObj) {
-                                               if (event.data.action(event, uploadObj) !== false) {
-                                                       errorArray = [];
-                                               }
-                                       });
-                               }
-                       });
-               },
-               uploadifySettings:function(settingName, settingValue, resetObject) {
-                       var returnValue = false;
-                       jQuery(this).each(function() {
-                               if (settingName == 'scriptData' && settingValue != null) {
-                                       if (resetObject) {
-                                               var scriptData = settingValue;
-                                       } else {
-                                               var scriptData = jQuery.extend(settings.scriptData, settingValue);
-                                       }
-                                       var scriptDataString = '';
-                                       for (var name in scriptData) {
-                                               scriptDataString += '&' + name + '=' + escape(scriptData[name]);
-                                       }
-                                       settingValue = scriptDataString.substr(1);
-                               }
-                               returnValue = document.getElementById(jQuery(this).attr('id') + 'Uploader').updateSettings(settingName, settingValue);
-                       });
-                       if (settingValue == null) {
-                               if (settingName == 'scriptData') {
-                                       var returnSplit = unescape(returnValue).split('&');
-                                       var returnObj   = new Object();
-                                       for (var i = 0; i < returnSplit.length; i++) {
-                                               var iSplit = returnSplit[i].split('=');
-                                               returnObj[iSplit[0]] = iSplit[1];
-                                       }
-                                       returnValue = returnObj;
-                               }
-                               return returnValue;
-                       }
-               },
-               uploadifyUpload:function(ID) {
-                       jQuery(this).each(function() {
-                               document.getElementById(jQuery(this).attr('id') + 'Uploader').startFileUpload(ID, false);
-                       });
-               },
-               uploadifyCancel:function(ID) {
-                       jQuery(this).each(function() {
-                               document.getElementById(jQuery(this).attr('id') + 'Uploader').cancelFileUpload(ID, true, false);
-                       });
-               },
-               uploadifyClearQueue:function() {
-                       jQuery(this).each(function() {
-                               document.getElementById(jQuery(this).attr('id') + 'Uploader').clearFileUploadQueue(false);
-                       });
-               }
-       })
-})(jQuery);
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js b/platforma/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js
deleted file mode 100644 (file)
index 4305311..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Uploadify v2.1.0
-Release Date: August 24, 2009
-
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels
-
-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.
-*/
-
-if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('<div id="'+a(this).attr("id")+'Uploader"></div>');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('<div id="'+a(this).attr("id")+'Queue" class="uploadifyQueue"></div>')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('<div id="'+a(this).attr("id")+h+'" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#'+a(this).attr("id")+"').uploadifyCancel('"+h+'\')"><img src="'+settings.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+k+l+')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="'+a(this).attr("id")+h+'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full.  The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d<b.length;d++){var h=b[d].split("=");e[h[0]]=h[1]}g=e}return g}},uploadifyUpload:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").startFileUpload(b,false)})},uploadifyCancel:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").cancelFileUpload(b,true,false)})},uploadifyClearQueue:function(){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").clearFileUploadQueue(false)})}})})(jQuery)};
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/swfobject.js b/platforma/static/filebrowser/uploadify/swfobject.js
deleted file mode 100644 (file)
index acc7da4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/*     SWFObject v2.2 <http://code.google.com/p/swfobject/>
-       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/uploadify.allglyphs.swf b/platforma/static/filebrowser/uploadify/uploadify.allglyphs.swf
deleted file mode 100644 (file)
index 4bad011..0000000
Binary files a/platforma/static/filebrowser/uploadify/uploadify.allglyphs.swf and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/uploadify.css b/platforma/static/filebrowser/uploadify/uploadify.css
deleted file mode 100644 (file)
index 0cf8c0e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-.uploadifyQueueItem {\r
-       font: 11px Verdana, Geneva, sans-serif;\r
-       border: 2px solid #E5E5E5;\r
-       background-color: #F5F5F5;\r
-       margin-top: 5px;\r
-       padding: 10px;\r
-       width: 350px;\r
-}\r
-.uploadifyError {\r
-       border: 2px solid #FBCBBC !important;\r
-       background-color: #FDE5DD !important;\r
-}\r
-.uploadifyQueueItem .cancel {\r
-       float: right;\r
-}\r
-.uploadifyProgress {\r
-       background-color: #FFFFFF;\r
-       border-top: 1px solid #808080;\r
-       border-left: 1px solid #808080;\r
-       border-right: 1px solid #C5C5C5;\r
-       border-bottom: 1px solid #C5C5C5;\r
-       margin-top: 10px;\r
-       width: 100%;\r
-}\r
-.uploadifyProgressBar {\r
-       background-color: #0099FF;\r
-       width: 1px;\r
-       height: 3px;\r
-}
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/uploadify.fla b/platforma/static/filebrowser/uploadify/uploadify.fla
deleted file mode 100644 (file)
index c07bbaf..0000000
Binary files a/platforma/static/filebrowser/uploadify/uploadify.fla and /dev/null differ
diff --git a/platforma/static/filebrowser/uploadify/uploadify.php b/platforma/static/filebrowser/uploadify/uploadify.php
deleted file mode 100644 (file)
index 8bf14a6..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php\r
-/*\r
-Uploadify v2.1.0\r
-Release Date: August 24, 2009\r
-\r
-Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
-*/\r
-if (!empty($_FILES)) {\r
-       $tempFile = $_FILES['Filedata']['tmp_name'];\r
-       $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';\r
-       $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];\r
-       \r
-       // $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);\r
-       // $fileTypes  = str_replace(';','|',$fileTypes);\r
-       // $typesArray = split('\|',$fileTypes);\r
-       // $fileParts  = pathinfo($_FILES['Filedata']['name']);\r
-       \r
-       // if (in_array($fileParts['extension'],$typesArray)) {\r
-               // Uncomment the following line if you want to make the directory if it doesn't exist\r
-               // mkdir(str_replace('//','/',$targetPath), 0755, true);\r
-               \r
-               move_uploaded_file($tempFile,$targetFile);\r
-               echo "1";\r
-       // } else {\r
-       //      echo 'Invalid file type.';\r
-       // }\r
-}\r
-?>
\ No newline at end of file
diff --git a/platforma/static/filebrowser/uploadify/uploadify.swf b/platforma/static/filebrowser/uploadify/uploadify.swf
deleted file mode 100644 (file)
index 0385d9e..0000000
Binary files a/platforma/static/filebrowser/uploadify/uploadify.swf and /dev/null differ
diff --git a/platforma/static/icons/close.png b/platforma/static/icons/close.png
deleted file mode 100644 (file)
index 5c08b05..0000000
Binary files a/platforma/static/icons/close.png and /dev/null differ
diff --git a/platforma/static/icons/go-next.png b/platforma/static/icons/go-next.png
deleted file mode 100644 (file)
index 6ef8de7..0000000
Binary files a/platforma/static/icons/go-next.png and /dev/null differ
diff --git a/platforma/static/icons/go-previous.png b/platforma/static/icons/go-previous.png
deleted file mode 100644 (file)
index 659cd90..0000000
Binary files a/platforma/static/icons/go-previous.png and /dev/null differ
diff --git a/platforma/static/icons/zoom.png b/platforma/static/icons/zoom.png
deleted file mode 100644 (file)
index 6033b4d..0000000
Binary files a/platforma/static/icons/zoom.png and /dev/null differ
diff --git a/platforma/static/icons/zoom_in.png b/platforma/static/icons/zoom_in.png
deleted file mode 100644 (file)
index c7feedc..0000000
Binary files a/platforma/static/icons/zoom_in.png and /dev/null differ
diff --git a/platforma/static/icons/zoom_out.png b/platforma/static/icons/zoom_out.png
deleted file mode 100644 (file)
index fdd7124..0000000
Binary files a/platforma/static/icons/zoom_out.png and /dev/null differ
diff --git a/platforma/static/img/gallery.png b/platforma/static/img/gallery.png
deleted file mode 100644 (file)
index 851a678..0000000
Binary files a/platforma/static/img/gallery.png and /dev/null differ
diff --git a/platforma/static/img/logo.png b/platforma/static/img/logo.png
deleted file mode 100644 (file)
index 398f45d..0000000
Binary files a/platforma/static/img/logo.png and /dev/null differ
diff --git a/platforma/static/img/sample_cover.png b/platforma/static/img/sample_cover.png
deleted file mode 100644 (file)
index eb7e7d1..0000000
Binary files a/platforma/static/img/sample_cover.png and /dev/null differ
diff --git a/platforma/static/img/spinner.gif b/platforma/static/img/spinner.gif
deleted file mode 100644 (file)
index c69e937..0000000
Binary files a/platforma/static/img/spinner.gif and /dev/null differ
diff --git a/platforma/static/js/button_scripts.js b/platforma/static/js/button_scripts.js
deleted file mode 100644 (file)
index 0d38b00..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-(function() {
-  var slice = Array.prototype.slice;
-
-  function update(array, args) {
-    var arrayLength = array.length, length = args.length;
-    while (length--) array[arrayLength + length] = args[length];
-    return array;
-  };
-
-  function merge(array, args) {
-    array = slice.call(array, 0);
-    return update(array, args);
-  };
-
-  Function.prototype.bind = function(context) {
-    if (arguments.length < 2 && typeof arguments[0] === 'undefined') {
-      return this;
-    }
-    var __method = this;
-    var args = slice.call(arguments, 1);
-    return function() {
-      var a = merge(args, arguments);
-      return __method.apply(context, a);
-    }
-  }
-
-})();
-
-function nblck_each(array, body, after) {
-       $.each(array, function(i) {
-               body(this, i);
-       });
-
-       after();
-};
-
-function nblck_map(array, func, after) {
-       var acc = [];
-
-       nblck_each(array, function(elem, index) {
-               acc.push(func(elem, index));
-       }, function(){
-               after(acc);
-       });
-};
-
-function ScriptletCenter()
-{
-    this.scriptlets = {};
-
-    this.scriptlets['insert_tag'] = function(context, params, done)
-    {
-        var text = this.XMLEditorSelectedText(context);
-        var start_tag = '<'+params.tag;
-        var move_cursor = false;
-
-        for (var attr in params.attrs) {
-            start_tag += ' '+attr+'="' + params.attrs[attr] + '"';
-        }
-
-        start_tag += '>';
-        var end_tag = '</'+params.tag+'>';
-
-        if(text.length > 0) {
-            // tokenize
-            var output = '';
-            var token = '';
-            for(var index=0; index < text.length; index++)
-            {
-                if (text[index].match(/\s/)) { // whitespace
-                    token += text[index];
-                }
-                else { // character
-                    output += token;
-                    if(output == token) output += start_tag;
-                    token = '';
-                    output += text[index];
-                }
-            }
-
-            if( output[output.length-1] == '\\' ) {
-                output = output.substr(0, output.length-1) + end_tag + '\\';
-            } else {
-                output += end_tag;
-            }
-            output += token;
-        }
-        else {
-            if(params.nocontent) {
-                output = "<"+params.tag +" />";
-            }
-            else {
-                output = start_tag + end_tag;
-                move_cursor = true;
-            }
-        }
-
-        this.XMLEditorReplaceSelectedText(context, output);
-
-        try {
-            if (move_cursor) {
-                this.XMLEditorMoveCursorForward(context, params.tag.length+2);
-            }
-        } catch(e) {}
-
-               done();
-    }.bind(this);
-
-    this.scriptlets['lineregexp'] = function(context, params, done) {
-               var self = this;
-
-        var exprs = $.map(params.exprs, function(expr) {
-            var opts = "g";
-            if(expr.length > 2) {
-                opts = expr[2];
-            } return {
-                rx: new RegExp(expr[0], opts),
-                repl: expr[1]
-                };
-        });
-
-        var partial = true;
-        var text = this.XMLEditorSelectedText(context);
-        if(!text) return done();
-
-        var changed = 0;
-        var lines = text.split('\n');
-
-               nblck_map(lines, function(line, index) {
-            var old_line = line;
-            $(exprs).each(function() {
-                var expr = this;
-                line = line.replace(expr.rx, expr.repl);
-            });
-
-                       $progress.html(index);
-
-            if(old_line != line) changed += 1;
-            return line;
-        }, function(newlines) {
-                       if(changed > 0) {
-                               self.XMLEditorReplaceSelectedText(context, newlines.join('\n') );
-                       };
-
-                       done();
-               });
-    }.bind(this);
-
-    this.scriptlets['fulltextregexp'] = function(context, params, done) {
-               var self = this;
-
-        var exprs = $.map(params.exprs, function(expr) {
-            var opts = "mg";
-            if(expr.length > 2) {
-                opts = expr[2];
-            }
-            return {
-                rx: new RegExp(expr[0], opts),
-                repl: expr[1]
-                };
-        });
-
-        var text = this.XMLEditorSelectedText(context);
-        if(!text) return done();
-        var original = text;
-
-               nblck_each(exprs, function(expr, index) {
-                       $progress.html(600 + index);
-            text = text.replace(expr.rx, expr.repl);
-        }, function() {
-                       if( original != text) {
-                  self.XMLEditorReplaceSelectedText(context, text);
-               }
-
-                       done();
-               });
-    }.bind(this);
-
-    this.scriptlets['macro'] = function(context, params, done) {
-        var self = this;
-               var i = 0;
-
-               function next() {
-               if (i < params.length) {
-                               var e = params[i];
-                               i = i + 1;
-                               self.scriptlets[e[0]](context, e[1], next);
-                       }
-                       else {
-                               done();
-                       }
-        };
-
-               next();
-    }.bind(this);
-
-    this.scriptlets['lowercase'] = function(context, params, done)
-    {
-        var text = this.XMLEditorSelectedText(context);
-
-        if(!text) return;
-
-        var repl = '';
-        var lcase = text.toLowerCase();
-        var ucase = text.toUpperCase();
-
-        if(lcase == text) repl = ucase; /* was lowercase */
-        else if(ucase != text) repl = lcase; /* neither lower- or upper-case */
-        else { /* upper case -> camel-case */
-            var words = $(lcase.split(/\s/)).map(function() {
-                if(this.length > 0) {
-                    return this[0].toUpperCase() + this.slice(1);
-                } else {
-                    return '';
-                }
-            });
-            repl = words.join(' ');
-        }
-
-        if(repl != text) this.XMLEditorReplaceSelectedText(context, repl);
-
-               done();
-    }.bind(this);
-
-
-    this.scriptlets["insert_stanza"] = function(context, params, done) {
-        var text = this.XMLEditorSelectedText(context);
-
-        if(text) {
-            var verses = text.split('\n');
-            text = ''; var buf = ''; var ebuf = '';
-            var first = true;
-
-            for(var i=0;  i < verses.length; i++) {
-                var verse = verses[i].replace(/^\s+/, "").replace(/\s+$/, "");
-                if(verse) {
-                    text += (buf ? buf + '/\n' : '') + ebuf;
-                    buf = (first ? '<strofa>\n' : '') + verses[i];
-                    ebuf = '';
-                    first = false;
-                } else {
-                    ebuf += '\n' + verses[i];
-                }
-            }
-            text = text + buf + '\n</strofa>' + ebuf;
-            this.XMLEditorReplaceSelectedText(context, text);
-        }
-
-        if (!text) {
-            this.XMLEditorMoveCursorForward(context, params.tag.length + 2);
-        }
-
-               done();
-    }.bind(this);
-
-}
-
-ScriptletCenter.prototype.callInteractive = function(opts) {
-       $progress = $('<span>Executing script</span>');
-       var self = this;
-
-       $.blockUI({
-               message: $progress,
-
-       });
-
-
-       self.scriptlets[opts.action](opts.context, opts.extra, function(){
-               $.unblockUI(); // done
-       });
-}
-
-ScriptletCenter.prototype.XMLEditorSelectedText = function(editor) {
-
-    return editor.selection();
-};
-
-ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement)
-{
-       $progress.html("Replacing text");
-    editor.replaceSelection(replacement);
-};
-
-ScriptletCenter.prototype.XMLEditorMoveCursorForward = function(panel, n) {
-    var pos = panel.cursorPosition();
-    panel.selectLines(pos.line, pos.character + n);
-};
-
-var scriptletCenter;
-
-$(function() {
-    scriptletCenter = new ScriptletCenter();
-});
\ No newline at end of file
diff --git a/platforma/static/js/jquery-1.4.2.min.js b/platforma/static/js/jquery-1.4.2.min.js
deleted file mode 100644 (file)
index 7c24308..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={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,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/platforma/static/js/jquery.autocomplete.js b/platforma/static/js/jquery.autocomplete.js
deleted file mode 100644 (file)
index 0d25ba6..0000000
+++ /dev/null
@@ -1,808 +0,0 @@
-/*
- * jQuery Autocomplete plugin 1.1
- *
- * Copyright (c) 2009 Jörn Zaefferer
- *
- * Dual licensed under the MIT and GPL licenses:
- *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
- */
-
-;(function($) {
-
-$.fn.extend({
-       autocomplete: function(urlOrData, options) {
-               var isUrl = typeof urlOrData == "string";
-               options = $.extend({}, $.Autocompleter.defaults, {
-                       url: isUrl ? urlOrData : null,
-                       data: isUrl ? null : urlOrData,
-                       delay: isUrl ? $.Autocompleter.defaults.delay : 10,
-                       max: options && !options.scroll ? 10 : 150
-               }, options);
-
-               // if highlight is set to false, replace it with a do-nothing function
-               options.highlight = options.highlight || function(value) { return value; };
-
-               // if the formatMatch option is not specified, then use formatItem for backwards compatibility
-               options.formatMatch = options.formatMatch || options.formatItem;
-
-               return this.each(function() {
-                       new $.Autocompleter(this, options);
-               });
-       },
-       result: function(handler) {
-               return this.bind("result", handler);
-       },
-       search: function(handler) {
-               return this.trigger("search", [handler]);
-       },
-       flushCache: function() {
-               return this.trigger("flushCache");
-       },
-       setOptions: function(options){
-               return this.trigger("setOptions", [options]);
-       },
-       unautocomplete: function() {
-               return this.trigger("unautocomplete");
-       }
-});
-
-$.Autocompleter = function(input, options) {
-
-       var KEY = {
-               UP: 38,
-               DOWN: 40,
-               DEL: 46,
-               TAB: 9,
-               RETURN: 13,
-               ESC: 27,
-               COMMA: 188,
-               PAGEUP: 33,
-               PAGEDOWN: 34,
-               BACKSPACE: 8
-       };
-
-       // Create $ object for input element
-       var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
-
-       var timeout;
-       var previousValue = "";
-       var cache = $.Autocompleter.Cache(options);
-       var hasFocus = 0;
-       var lastKeyPressCode;
-       var config = {
-               mouseDownOnSelect: false
-       };
-       var select = $.Autocompleter.Select(options, input, selectCurrent, config);
-
-       var blockSubmit;
-
-       // prevent form submit in opera when selecting with return key
-       $.browser.opera && $(input.form).bind("submit.autocomplete", function() {
-               if (blockSubmit) {
-                       blockSubmit = false;
-                       return false;
-               }
-       });
-
-       // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
-       $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
-               // a keypress means the input has focus
-               // avoids issue where input had focus before the autocomplete was applied
-               hasFocus = 1;
-               // track last key pressed
-               lastKeyPressCode = event.keyCode;
-               switch(event.keyCode) {
-
-                       case KEY.UP:
-                               event.preventDefault();
-                               if ( select.visible() ) {
-                                       select.prev();
-                               } else {
-                                       onChange(0, true);
-                               }
-                               break;
-
-                       case KEY.DOWN:
-                               event.preventDefault();
-                               if ( select.visible() ) {
-                                       select.next();
-                               } else {
-                                       onChange(0, true);
-                               }
-                               break;
-
-                       case KEY.PAGEUP:
-                               event.preventDefault();
-                               if ( select.visible() ) {
-                                       select.pageUp();
-                               } else {
-                                       onChange(0, true);
-                               }
-                               break;
-
-                       case KEY.PAGEDOWN:
-                               event.preventDefault();
-                               if ( select.visible() ) {
-                                       select.pageDown();
-                               } else {
-                                       onChange(0, true);
-                               }
-                               break;
-
-                       // matches also semicolon
-                       case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
-                       case KEY.TAB:
-                       case KEY.RETURN:
-                               if( selectCurrent() ) {
-                                       // stop default to prevent a form submit, Opera needs special handling
-                                       event.preventDefault();
-                                       blockSubmit = true;
-                                       return false;
-                               }
-                               break;
-
-                       case KEY.ESC:
-                               select.hide();
-                               break;
-
-                       default:
-                               clearTimeout(timeout);
-                               timeout = setTimeout(onChange, options.delay);
-                               break;
-               }
-       }).focus(function(){
-               // track whether the field has focus, we shouldn't process any
-               // results if the field no longer has focus
-               hasFocus++;
-       }).blur(function() {
-               hasFocus = 0;
-               if (!config.mouseDownOnSelect) {
-                       hideResults();
-               }
-       }).click(function() {
-               // show select when clicking in a focused field
-               if ( hasFocus++ > 1 && !select.visible() ) {
-                       onChange(0, true);
-               }
-       }).bind("search", function() {
-               // TODO why not just specifying both arguments?
-               var fn = (arguments.length > 1) ? arguments[1] : null;
-               function findValueCallback(q, data) {
-                       var result;
-                       if( data && data.length ) {
-                               for (var i=0; i < data.length; i++) {
-                                       if( data[i].result.toLowerCase() == q.toLowerCase() ) {
-                                               result = data[i];
-                                               break;
-                                       }
-                               }
-                       }
-                       if( typeof fn == "function" ) fn(result);
-                       else $input.trigger("result", result && [result.data, result.value]);
-               }
-               $.each(trimWords($input.val()), function(i, value) {
-                       request(value, findValueCallback, findValueCallback);
-               });
-       }).bind("flushCache", function() {
-               cache.flush();
-       }).bind("setOptions", function() {
-               $.extend(options, arguments[1]);
-               // if we've updated the data, repopulate
-               if ( "data" in arguments[1] )
-                       cache.populate();
-       }).bind("unautocomplete", function() {
-               select.unbind();
-               $input.unbind();
-               $(input.form).unbind(".autocomplete");
-       });
-
-
-       function selectCurrent() {
-               var selected = select.selected();
-               if( !selected )
-                       return false;
-
-               var v = selected.result;
-               previousValue = v;
-
-               if ( options.multiple ) {
-                       var words = trimWords($input.val());
-                       if ( words.length > 1 ) {
-                               var seperator = options.multipleSeparator.length;
-                               var cursorAt = $(input).selection().start;
-                               var wordAt, progress = 0;
-                               $.each(words, function(i, word) {
-                                       progress += word.length;
-                                       if (cursorAt <= progress) {
-                                               wordAt = i;
-                                               return false;
-                                       }
-                                       progress += seperator;
-                               });
-                               words[wordAt] = v;
-                               // TODO this should set the cursor to the right position, but it gets overriden somewhere
-                               //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
-                               v = words.join( options.multipleSeparator );
-                       }
-                       v += options.multipleSeparator;
-               }
-
-               $input.val(v);
-               hideResultsNow();
-               $input.trigger("result", [selected.data, selected.value]);
-               return true;
-       }
-
-       function onChange(crap, skipPrevCheck) {
-               if( lastKeyPressCode == KEY.DEL ) {
-                       select.hide();
-                       return;
-               }
-
-               var currentValue = $input.val();
-
-               if ( !skipPrevCheck && currentValue == previousValue )
-                       return;
-
-               previousValue = currentValue;
-
-               currentValue = lastWord(currentValue);
-               if ( currentValue.length >= options.minChars) {
-                       $input.addClass(options.loadingClass);
-                       if (!options.matchCase)
-                               currentValue = currentValue.toLowerCase();
-                       request(currentValue, receiveData, hideResultsNow);
-               } else {
-                       stopLoading();
-                       select.hide();
-               }
-       };
-
-       function trimWords(value) {
-               if (!value)
-                       return [""];
-               if (!options.multiple)
-                       return [$.trim(value)];
-               return $.map(value.split(options.multipleSeparator), function(word) {
-                       return $.trim(value).length ? $.trim(word) : null;
-               });
-       }
-
-       function lastWord(value) {
-               if ( !options.multiple )
-                       return value;
-               var words = trimWords(value);
-               if (words.length == 1)
-                       return words[0];
-               var cursorAt = $(input).selection().start;
-               if (cursorAt == value.length) {
-                       words = trimWords(value)
-               } else {
-                       words = trimWords(value.replace(value.substring(cursorAt), ""));
-               }
-               return words[words.length - 1];
-       }
-
-       // fills in the input box w/the first match (assumed to be the best match)
-       // q: the term entered
-       // sValue: the first matching result
-       function autoFill(q, sValue){
-               // autofill in the complete box w/the first match as long as the user hasn't entered in more data
-               // if the last user key pressed was backspace, don't autofill
-               if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
-                       // fill in the value (keep the case the user has typed)
-                       $input.val($input.val() + sValue.substring(lastWord(previousValue).length));
-                       // select the portion of the value not typed by the user (so the next character will erase)
-                       $(input).selection(previousValue.length, previousValue.length + sValue.length);
-               }
-       };
-
-       function hideResults() {
-               clearTimeout(timeout);
-               timeout = setTimeout(hideResultsNow, 200);
-       };
-
-       function hideResultsNow() {
-               var wasVisible = select.visible();
-               select.hide();
-               clearTimeout(timeout);
-               stopLoading();
-               if (options.mustMatch) {
-                       // call search and run callback
-                       $input.search(
-                               function (result){
-                                       // if no value found, clear the input box
-                                       if( !result ) {
-                                               if (options.multiple) {
-                                                       var words = trimWords($input.val()).slice(0, -1);
-                                                       $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
-                                               }
-                                               else {
-                                                       $input.val( "" );
-                                                       $input.trigger("result", null);
-                                               }
-                                       }
-                               }
-                       );
-               }
-       };
-
-       function receiveData(q, data) {
-               if ( data && data.length && hasFocus ) {
-                       stopLoading();
-                       select.display(data, q);
-                       autoFill(q, data[0].value);
-                       select.show();
-               } else {
-                       hideResultsNow();
-               }
-       };
-
-       function request(term, success, failure) {
-               if (!options.matchCase)
-                       term = term.toLowerCase();
-               var data = cache.load(term);
-               // recieve the cached data
-               if (data && data.length) {
-                       success(term, data);
-               // if an AJAX url has been supplied, try loading the data now
-               } else if( (typeof options.url == "string") && (options.url.length > 0) ){
-
-                       var extraParams = {
-                               timestamp: +new Date()
-                       };
-                       $.each(options.extraParams, function(key, param) {
-                               extraParams[key] = typeof param == "function" ? param() : param;
-                       });
-
-                       $.ajax({
-                               // try to leverage ajaxQueue plugin to abort previous requests
-                               mode: "abort",
-                               // limit abortion to this input
-                               port: "autocomplete" + input.name,
-                               dataType: options.dataType,
-                               url: options.url,
-                               data: $.extend({
-                                       q: lastWord(term),
-                                       limit: options.max
-                               }, extraParams),
-                               success: function(data) {
-                                       var parsed = options.parse && options.parse(data) || parse(data);
-                                       cache.add(term, parsed);
-                                       success(term, parsed);
-                               }
-                       });
-               } else {
-                       // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
-                       select.emptyList();
-                       failure(term);
-               }
-       };
-
-       function parse(data) {
-               var parsed = [];
-               var rows = data.split("\n");
-               for (var i=0; i < rows.length; i++) {
-                       var row = $.trim(rows[i]);
-                       if (row) {
-                               row = row.split("|");
-                               parsed[parsed.length] = {
-                                       data: row,
-                                       value: row[0],
-                                       result: options.formatResult && options.formatResult(row, row[0]) || row[0]
-                               };
-                       }
-               }
-               return parsed;
-       };
-
-       function stopLoading() {
-               $input.removeClass(options.loadingClass);
-       };
-
-};
-
-$.Autocompleter.defaults = {
-       inputClass: "ac_input",
-       resultsClass: "ac_results",
-       loadingClass: "ac_loading",
-       minChars: 1,
-       delay: 400,
-       matchCase: false,
-       matchSubset: true,
-       matchContains: false,
-       cacheLength: 10,
-       max: 100,
-       mustMatch: false,
-       extraParams: {},
-       selectFirst: true,
-       formatItem: function(row) { return row[0]; },
-       formatMatch: null,
-       autoFill: false,
-       width: 0,
-       multiple: false,
-       multipleSeparator: ", ",
-       highlight: function(value, term) {
-               return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
-       },
-    scroll: true,
-    scrollHeight: 180
-};
-
-$.Autocompleter.Cache = function(options) {
-
-       var data = {};
-       var length = 0;
-
-       function matchSubset(s, sub) {
-               if (!options.matchCase)
-                       s = s.toLowerCase();
-               var i = s.indexOf(sub);
-               if (options.matchContains == "word"){
-                       i = s.toLowerCase().search("\\b" + sub.toLowerCase());
-               }
-               if (i == -1) return false;
-               return i == 0 || options.matchContains;
-       };
-
-       function add(q, value) {
-               if (length > options.cacheLength){
-                       flush();
-               }
-               if (!data[q]){
-                       length++;
-               }
-               data[q] = value;
-       }
-
-       function populate(){
-               if( !options.data ) return false;
-               // track the matches
-               var stMatchSets = {},
-                       nullData = 0;
-
-               // no url was specified, we need to adjust the cache length to make sure it fits the local data store
-               if( !options.url ) options.cacheLength = 1;
-
-               // track all options for minChars = 0
-               stMatchSets[""] = [];
-
-               // loop through the array and create a lookup structure
-               for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
-                       var rawValue = options.data[i];
-                       // if rawValue is a string, make an array otherwise just reference the array
-                       rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
-
-                       var value = options.formatMatch(rawValue, i+1, options.data.length);
-                       if ( value === false )
-                               continue;
-
-                       var firstChar = value.charAt(0).toLowerCase();
-                       // if no lookup array for this character exists, look it up now
-                       if( !stMatchSets[firstChar] )
-                               stMatchSets[firstChar] = [];
-
-                       // if the match is a string
-                       var row = {
-                               value: value,
-                               data: rawValue,
-                               result: options.formatResult && options.formatResult(rawValue) || value
-                       };
-
-                       // push the current match into the set list
-                       stMatchSets[firstChar].push(row);
-
-                       // keep track of minChars zero items
-                       if ( nullData++ < options.max ) {
-                               stMatchSets[""].push(row);
-                       }
-               };
-
-               // add the data items to the cache
-               $.each(stMatchSets, function(i, value) {
-                       // increase the cache size
-                       options.cacheLength++;
-                       // add to the cache
-                       add(i, value);
-               });
-       }
-
-       // populate any existing data
-       setTimeout(populate, 25);
-
-       function flush(){
-               data = {};
-               length = 0;
-       }
-
-       return {
-               flush: flush,
-               add: add,
-               populate: populate,
-               load: function(q) {
-                       if (!options.cacheLength || !length)
-                               return null;
-                       /*
-                        * if dealing w/local data and matchContains than we must make sure
-                        * to loop through all the data collections looking for matches
-                        */
-                       if( !options.url && options.matchContains ){
-                               // track all matches
-                               var csub = [];
-                               // loop through all the data grids for matches
-                               for( var k in data ){
-                                       // don't search through the stMatchSets[""] (minChars: 0) cache
-                                       // this prevents duplicates
-                                       if( k.length > 0 ){
-                                               var c = data[k];
-                                               $.each(c, function(i, x) {
-                                                       // if we've got a match, add it to the array
-                                                       if (matchSubset(x.value, q)) {
-                                                               csub.push(x);
-                                                       }
-                                               });
-                                       }
-                               }
-                               return csub;
-                       } else
-                       // if the exact item exists, use it
-                       if (data[q]){
-                               return data[q];
-                       } else
-                       if (options.matchSubset) {
-                               for (var i = q.length - 1; i >= options.minChars; i--) {
-                                       var c = data[q.substr(0, i)];
-                                       if (c) {
-                                               var csub = [];
-                                               $.each(c, function(i, x) {
-                                                       if (matchSubset(x.value, q)) {
-                                                               csub[csub.length] = x;
-                                                       }
-                                               });
-                                               return csub;
-                                       }
-                               }
-                       }
-                       return null;
-               }
-       };
-};
-
-$.Autocompleter.Select = function (options, input, select, config) {
-       var CLASSES = {
-               ACTIVE: "ac_over"
-       };
-
-       var listItems,
-               active = -1,
-               data,
-               term = "",
-               needsInit = true,
-               element,
-               list;
-
-       // Create results
-       function init() {
-               if (!needsInit)
-                       return;
-               element = $("<div/>")
-               .hide()
-               .addClass(options.resultsClass)
-               .css("position", "absolute")
-               .appendTo(document.body);
-
-               list = $("<ul/>").appendTo(element).mouseover( function(event) {
-                       if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
-                   active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
-                           $(target(event)).addClass(CLASSES.ACTIVE);
-               }
-               }).click(function(event) {
-                       $(target(event)).addClass(CLASSES.ACTIVE);
-                       select();
-                       // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
-                       input.focus();
-                       return false;
-               }).mousedown(function() {
-                       config.mouseDownOnSelect = true;
-               }).mouseup(function() {
-                       config.mouseDownOnSelect = false;
-               });
-
-               if( options.width > 0 )
-                       element.css("width", options.width);
-
-               needsInit = false;
-       }
-
-       function target(event) {
-               var element = event.target;
-               while(element && element.tagName != "LI")
-                       element = element.parentNode;
-               // more fun with IE, sometimes event.target is empty, just ignore it then
-               if(!element)
-                       return [];
-               return element;
-       }
-
-       function moveSelect(step) {
-               listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
-               movePosition(step);
-        var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
-        if(options.scroll) {
-            var offset = 0;
-            listItems.slice(0, active).each(function() {
-                               offset += this.offsetHeight;
-                       });
-            if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
-                list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
-            } else if(offset < list.scrollTop()) {
-                list.scrollTop(offset);
-            }
-        }
-       };
-
-       function movePosition(step) {
-               active += step;
-               if (active < 0) {
-                       active = listItems.size() - 1;
-               } else if (active >= listItems.size()) {
-                       active = 0;
-               }
-       }
-
-       function limitNumberOfItems(available) {
-               return options.max && options.max < available
-                       ? options.max
-                       : available;
-       }
-
-       function fillList() {
-               list.empty();
-               var max = limitNumberOfItems(data.length);
-               for (var i=0; i < max; i++) {
-                       if (!data[i])
-                               continue;
-                       var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
-                       if ( formatted === false )
-                               continue;
-                       var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
-                       $.data(li, "ac_data", data[i]);
-               }
-               listItems = list.find("li");
-               if ( options.selectFirst ) {
-                       listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
-                       active = 0;
-               }
-               // apply bgiframe if available
-               if ( $.fn.bgiframe )
-                       list.bgiframe();
-       }
-
-       return {
-               display: function(d, q) {
-                       init();
-                       data = d;
-                       term = q;
-                       fillList();
-               },
-               next: function() {
-                       moveSelect(1);
-               },
-               prev: function() {
-                       moveSelect(-1);
-               },
-               pageUp: function() {
-                       if (active != 0 && active - 8 < 0) {
-                               moveSelect( -active );
-                       } else {
-                               moveSelect(-8);
-                       }
-               },
-               pageDown: function() {
-                       if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
-                               moveSelect( listItems.size() - 1 - active );
-                       } else {
-                               moveSelect(8);
-                       }
-               },
-               hide: function() {
-                       element && element.hide();
-                       listItems && listItems.removeClass(CLASSES.ACTIVE);
-                       active = -1;
-               },
-               visible : function() {
-                       return element && element.is(":visible");
-               },
-               current: function() {
-                       return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
-               },
-               show: function() {
-                       var offset = $(input).offset();
-                       element.css({
-                               width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
-                               top: offset.top + input.offsetHeight,
-                               left: offset.left
-                       }).show();
-            if(options.scroll) {
-                list.scrollTop(0);
-                list.css({
-                                       maxHeight: options.scrollHeight,
-                                       overflow: 'auto'
-                               });
-
-                if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
-                                       var listHeight = 0;
-                                       listItems.each(function() {
-                                               listHeight += this.offsetHeight;
-                                       });
-                                       var scrollbarsVisible = listHeight > options.scrollHeight;
-                    list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
-                                       if (!scrollbarsVisible) {
-                                               // IE doesn't recalculate width when scrollbar disappears
-                                               listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
-                                       }
-                }
-
-            }
-               },
-               selected: function() {
-                       var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
-                       return selected && selected.length && $.data(selected[0], "ac_data");
-               },
-               emptyList: function (){
-                       list && list.empty();
-               },
-               unbind: function() {
-                       element && element.remove();
-               }
-       };
-};
-
-$.fn.selection = function(start, end) {
-       if (start !== undefined) {
-               return this.each(function() {
-                       if( this.createTextRange ){
-                               var selRange = this.createTextRange();
-                               if (end === undefined || start == end) {
-                                       selRange.move("character", start);
-                                       selRange.select();
-                               } else {
-                                       selRange.collapse(true);
-                                       selRange.moveStart("character", start);
-                                       selRange.moveEnd("character", end);
-                                       selRange.select();
-                               }
-                       } else if( this.setSelectionRange ){
-                               this.setSelectionRange(start, end);
-                       } else if( this.selectionStart ){
-                               this.selectionStart = start;
-                               this.selectionEnd = end;
-                       }
-               });
-       }
-       var field = this[0];
-       if ( field.createTextRange ) {
-               var range = document.selection.createRange(),
-                       orig = field.value,
-                       teststring = "<->",
-                       textLength = range.text.length;
-               range.text = teststring;
-               var caretAt = field.value.indexOf(teststring);
-               field.value = orig;
-               this.selection(caretAt, caretAt + textLength);
-               return {
-                       start: caretAt,
-                       end: caretAt + textLength
-               }
-       } else if( field.selectionStart !== undefined ){
-               return {
-                       start: field.selectionStart,
-                       end: field.selectionEnd
-               }
-       }
-};
-
-})(jQuery);
\ No newline at end of file
diff --git a/platforma/static/js/jquery.blockui.js b/platforma/static/js/jquery.blockui.js
deleted file mode 100644 (file)
index 5491667..0000000
+++ /dev/null
@@ -1,477 +0,0 @@
-/*!
- * jQuery blockUI plugin
- * Version 2.31 (06-JAN-2010)
- * @requires jQuery v1.2.3 or later
- *
- * Examples at: http://malsup.com/jquery/block/
- * Copyright (c) 2007-2008 M. Alsup
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Thanks to Amir-Hossein Sobhi for some excellent contributions!
- */
-
-;(function($) {
-
-if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
-       alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
-       return;
-}
-
-$.fn._fadeIn = $.fn.fadeIn;
-
-var noOp = function() {};
-
-// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
-// retarded userAgent strings on Vista)
-var mode = document.documentMode || 0;
-var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
-var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
-
-// global $ methods for blocking/unblocking the entire page
-$.blockUI   = function(opts) { install(window, opts); };
-$.unblockUI = function(opts) { remove(window, opts); };
-
-// convenience method for quick growl-like notifications  (http://www.google.com/search?q=growl)
-$.growlUI = function(title, message, timeout, onClose) {
-       var $m = $('<div class="growlUI"></div>');
-       if (title) $m.append('<h1>'+title+'</h1>');
-       if (message) $m.append('<h2>'+message+'</h2>');
-       if (timeout == undefined) timeout = 3000;
-       $.blockUI({
-               message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
-               timeout: timeout, showOverlay: false,
-               onUnblock: onClose,
-               css: $.blockUI.defaults.growlCSS
-       });
-};
-
-// plugin method for blocking element content
-$.fn.block = function(opts) {
-       return this.unblock({ fadeOut: 0 }).each(function() {
-               if ($.css(this,'position') == 'static')
-                       this.style.position = 'relative';
-               if ($.browser.msie)
-                       this.style.zoom = 1; // force 'hasLayout'
-               install(this, opts);
-       });
-};
-
-// plugin method for unblocking element content
-$.fn.unblock = function(opts) {
-       return this.each(function() {
-               remove(this, opts);
-       });
-};
-
-$.blockUI.version = 2.31; // 2nd generation blocking at no extra cost!
-
-// override these in your code to change the default behavior and style
-$.blockUI.defaults = {
-       // message displayed when blocking (use null for no message)
-       message:  '<h1>Please wait...</h1>',
-
-       title: null,      // title string; only used when theme == true
-       draggable: true,  // only used when theme == true (requires jquery-ui.js to be loaded)
-
-       theme: false, // set to true to use with jQuery UI themes
-
-       // styles for the message when blocking; if you wish to disable
-       // these and use an external stylesheet then do this in your code:
-       // $.blockUI.defaults.css = {};
-       css: {
-               padding:        0,
-               margin:         0,
-               width:          '30%',
-               top:            '40%',
-               left:           '35%',
-               textAlign:      'center',
-               color:          '#000',
-               border:         '3px solid #aaa',
-               backgroundColor:'#fff',
-               cursor:         'wait'
-       },
-
-       // minimal style set used when themes are used
-       themedCSS: {
-               width:  '30%',
-               top:    '40%',
-               left:   '35%'
-       },
-
-       // styles for the overlay
-       overlayCSS:  {
-               backgroundColor: '#000',
-               opacity:                 0.6,
-               cursor:                  'wait'
-       },
-
-       // styles applied when using $.growlUI
-       growlCSS: {
-               width:          '350px',
-               top:            '10px',
-               left:           '',
-               right:          '10px',
-               border:         'none',
-               padding:        '5px',
-               opacity:        0.6,
-               cursor:         'default',
-               color:          '#fff',
-               backgroundColor: '#000',
-               '-webkit-border-radius': '10px',
-               '-moz-border-radius':    '10px'
-       },
-
-       // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
-       // (hat tip to Jorge H. N. de Vasconcelos)
-       iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
-
-       // force usage of iframe in non-IE browsers (handy for blocking applets)
-       forceIframe: false,
-
-       // z-index for the blocking overlay
-       baseZ: 1000,
-
-       // set these to true to have the message automatically centered
-       centerX: true, // <-- only effects element blocking (page block controlled via css above)
-       centerY: true,
-
-       // allow body element to be stetched in ie6; this makes blocking look better
-       // on "short" pages.  disable if you wish to prevent changes to the body height
-       allowBodyStretch: true,
-
-       // enable if you want key and mouse events to be disabled for content that is blocked
-       bindEvents: true,
-
-       // be default blockUI will supress tab navigation from leaving blocking content
-       // (if bindEvents is true)
-       constrainTabKey: true,
-
-       // fadeIn time in millis; set to 0 to disable fadeIn on block
-       fadeIn:  200,
-
-       // fadeOut time in millis; set to 0 to disable fadeOut on unblock
-       fadeOut:  400,
-
-       // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
-       timeout: 0,
-
-       // disable if you don't want to show the overlay
-       showOverlay: true,
-
-       // if true, focus will be placed in the first available input field when
-       // page blocking
-       focusInput: true,
-
-       // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
-       applyPlatformOpacityRules: true,
-
-       // callback method invoked when fadeIn has completed and blocking message is visible
-       onBlock: null,
-
-       // callback method invoked when unblocking has completed; the callback is
-       // passed the element that has been unblocked (which is the window object for page
-       // blocks) and the options that were passed to the unblock call:
-       //       onUnblock(element, options)
-       onUnblock: null,
-
-       // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
-       quirksmodeOffsetHack: 4
-};
-
-// private data and functions follow...
-
-var pageBlock = null;
-var pageBlockEls = [];
-
-function install(el, opts) {
-       var full = (el == window);
-       var msg = opts && opts.message !== undefined ? opts.message : undefined;
-       opts = $.extend({}, $.blockUI.defaults, opts || {});
-       opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
-       var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
-       var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
-       msg = msg === undefined ? opts.message : msg;
-
-       // remove the current block (if there is one)
-       if (full && pageBlock)
-               remove(window, {fadeOut:0});
-
-       // if an existing element is being used as the blocking content then we capture
-       // its current place in the DOM (and current display style) so we can restore
-       // it when we unblock
-       if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
-               var node = msg.jquery ? msg[0] : msg;
-               var data = {};
-               $(el).data('blockUI.history', data);
-               data.el = node;
-               data.parent = node.parentNode;
-               data.display = node.style.display;
-               data.position = node.style.position;
-               if (data.parent)
-                       data.parent.removeChild(node);
-       }
-
-       var z = opts.baseZ;
-
-       // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
-       // layer1 is the iframe layer which is used to supress bleed through of underlying content
-       // layer2 is the overlay layer which has opacity and a wait cursor (by default)
-       // layer3 is the message content that is displayed while blocking
-
-       var lyr1 = ($.browser.msie || opts.forceIframe)
-               ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
-               : $('<div class="blockUI" style="display:none"></div>');
-       var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
-
-       var lyr3;
-       if (opts.theme && full) {
-               var s = '<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">' +
-                                       '<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
-                                       '<div class="ui-widget-content ui-dialog-content"></div>' +
-                               '</div>';
-               lyr3 = $(s);
-       }
-       else {
-               lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>')
-                                       : $('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');
-       }
-
-       // if we have a message, style it
-       if (msg) {
-               if (opts.theme) {
-                       lyr3.css(themedCSS);
-                       lyr3.addClass('ui-widget-content');
-               }
-               else
-                       lyr3.css(css);
-       }
-
-       // style the overlay
-       if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
-               lyr2.css(opts.overlayCSS);
-       lyr2.css('position', full ? 'fixed' : 'absolute');
-
-       // make iframe layer transparent in IE
-       if ($.browser.msie || opts.forceIframe)
-               lyr1.css('opacity',0.0);
-
-       //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
-       var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
-       $.each(layers, function() {
-               this.appendTo($par);
-       });
-
-       if (opts.theme && opts.draggable && $.fn.draggable) {
-               lyr3.draggable({
-                       handle: '.ui-dialog-titlebar',
-                       cancel: 'li'
-               });
-       }
-
-       // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
-       var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
-       if (ie6 || expr) {
-               // give body 100% height
-               if (full && opts.allowBodyStretch && $.boxModel)
-                       $('html,body').css('height','100%');
-
-               // fix ie6 issue when blocked element has a border width
-               if ((ie6 || !$.boxModel) && !full) {
-                       var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
-                       var fixT = t ? '(0 - '+t+')' : 0;
-                       var fixL = l ? '(0 - '+l+')' : 0;
-               }
-
-               // simulate fixed position
-               $.each([lyr1,lyr2,lyr3], function(i,o) {
-                       var s = o[0].style;
-                       s.position = 'absolute';
-                       if (i < 2) {
-                               full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
-                                        : s.setExpression('height','this.parentNode.offsetHeight + "px"');
-                               full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
-                                        : s.setExpression('width','this.parentNode.offsetWidth + "px"');
-                               if (fixL) s.setExpression('left', fixL);
-                               if (fixT) s.setExpression('top', fixT);
-                       }
-                       else if (opts.centerY) {
-                               if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
-                               s.marginTop = 0;
-                       }
-                       else if (!opts.centerY && full) {
-                               var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
-                               var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
-                               s.setExpression('top',expression);
-                       }
-               });
-       }
-
-       // show the message
-       if (msg) {
-               if (opts.theme)
-                       lyr3.find('.ui-widget-content').append(msg);
-               else
-                       lyr3.append(msg);
-               if (msg.jquery || msg.nodeType)
-                       $(msg).show();
-       }
-
-       if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
-               lyr1.show(); // opacity is zero
-       if (opts.fadeIn) {
-               var cb = opts.onBlock ? opts.onBlock : noOp;
-               var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
-               var cb2 = msg ? cb : noOp;
-               if (opts.showOverlay)
-                       lyr2._fadeIn(opts.fadeIn, cb1);
-               if (msg)
-                       lyr3._fadeIn(opts.fadeIn, cb2);
-       }
-       else {
-               if (opts.showOverlay)
-                       lyr2.show();
-               if (msg)
-                       lyr3.show();
-               if (opts.onBlock)
-                       opts.onBlock();
-       }
-
-       // bind key and mouse events
-       bind(1, el, opts);
-
-       if (full) {
-               pageBlock = lyr3[0];
-               pageBlockEls = $(':input:enabled:visible',pageBlock);
-               if (opts.focusInput)
-                       setTimeout(focus, 20);
-       }
-       else
-               center(lyr3[0], opts.centerX, opts.centerY);
-
-       if (opts.timeout) {
-               // auto-unblock
-               var to = setTimeout(function() {
-                       full ? $.unblockUI(opts) : $(el).unblock(opts);
-               }, opts.timeout);
-               $(el).data('blockUI.timeout', to);
-       }
-};
-
-// remove the block
-function remove(el, opts) {
-       var full = (el == window);
-       var $el = $(el);
-       var data = $el.data('blockUI.history');
-       var to = $el.data('blockUI.timeout');
-       if (to) {
-               clearTimeout(to);
-               $el.removeData('blockUI.timeout');
-       }
-       opts = $.extend({}, $.blockUI.defaults, opts || {});
-       bind(0, el, opts); // unbind events
-
-       var els;
-       if (full) // crazy selector to handle odd field errors in ie6/7
-               els = $('body').children().filter('.blockUI').add('body > .blockUI');
-       else
-               els = $('.blockUI', el);
-
-       if (full)
-               pageBlock = pageBlockEls = null;
-
-       if (opts.fadeOut) {
-               els.fadeOut(opts.fadeOut);
-               setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
-       }
-       else
-               reset(els, data, opts, el);
-};
-
-// move blocking element back into the DOM where it started
-function reset(els,data,opts,el) {
-       els.each(function(i,o) {
-               // remove via DOM calls so we don't lose event handlers
-               if (this.parentNode)
-                       this.parentNode.removeChild(this);
-       });
-
-       if (data && data.el) {
-               data.el.style.display = data.display;
-               data.el.style.position = data.position;
-               if (data.parent)
-                       data.parent.appendChild(data.el);
-               $(el).removeData('blockUI.history');
-       }
-
-       if (typeof opts.onUnblock == 'function')
-               opts.onUnblock(el,opts);
-};
-
-// bind/unbind the handler
-function bind(b, el, opts) {
-       var full = el == window, $el = $(el);
-
-       // don't bother unbinding if there is nothing to unbind
-       if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
-               return;
-       if (!full)
-               $el.data('blockUI.isBlocked', b);
-
-       // don't bind events when overlay is not in use or if bindEvents is false
-       if (!opts.bindEvents || (b && !opts.showOverlay))
-               return;
-
-       // bind anchors and inputs for mouse and key events
-       var events = 'mousedown mouseup keydown keypress';
-       b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
-
-// former impl...
-//        var $e = $('a,:input');
-//        b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
-};
-
-// event handler to suppress keyboard/mouse events when blocking
-function handler(e) {
-       // allow tab navigation (conditionally)
-       if (e.keyCode && e.keyCode == 9) {
-               if (pageBlock && e.data.constrainTabKey) {
-                       var els = pageBlockEls;
-                       var fwd = !e.shiftKey && e.target == els[els.length-1];
-                       var back = e.shiftKey && e.target == els[0];
-                       if (fwd || back) {
-                               setTimeout(function(){focus(back)},10);
-                               return false;
-                       }
-               }
-       }
-       // allow events within the message content
-       if ($(e.target).parents('div.blockMsg').length > 0)
-               return true;
-
-       // allow events for content that is not being blocked
-       return $(e.target).parents().children().filter('div.blockUI').length == 0;
-};
-
-function focus(back) {
-       if (!pageBlockEls)
-               return;
-       var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
-       if (e)
-               e.focus();
-};
-
-function center(el, x, y) {
-       var p = el.parentNode, s = el.style;
-       var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
-       var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
-       if (x) s.left = l > 0 ? (l+'px') : '0';
-       if (y) s.top  = t > 0 ? (t+'px') : '0';
-};
-
-function sz(el, p) {
-       return parseInt($.css(el,p))||0;
-};
-
-})(jQuery);
\ No newline at end of file
diff --git a/platforma/static/js/jquery.elastic.js b/platforma/static/js/jquery.elastic.js
deleted file mode 100644 (file)
index 24e16f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-(function(jQuery){jQuery.fn.extend({elastic:function(){var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];return this.each(function(){if(this.type!='textarea'){return false;}
-var $textarea=jQuery(this),$twin=jQuery('<div />').css({'position':'absolute','display':'none','word-wrap':'break-word'}),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;if(maxheight<0){maxheight=Number.MAX_VALUE;}
-$twin.appendTo($textarea.parent());var i=mimics.length;while(i--){$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));}
-function setHeightAndOverflow(height,overflow){curratedHeight=Math.floor(parseInt(height,10));if($textarea.height()!=curratedHeight){$textarea.css({'height':curratedHeight+'px','overflow':overflow});}}
-function update(){var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');var twinContent=$twin.html();if(textareaContent+'&nbsp;'!=twinContent){$twin.html(textareaContent+'&nbsp;');if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){var goalheight=$twin.height()+lineHeight;if(goalheight>=maxheight){setHeightAndOverflow(maxheight,'auto');}else if(goalheight<=minheight){setHeightAndOverflow(minheight,'hidden');}else{setHeightAndOverflow(goalheight,'hidden');}}}}
-$textarea.css({'overflow':'hidden'});$textarea.keyup(function(){update();});$textarea.live('input paste',function(e){setTimeout(update,250);});update();});}});})(jQuery);
\ No newline at end of file
diff --git a/platforma/static/js/lib/codemirror/codemirror.js b/platforma/static/js/lib/codemirror/codemirror.js
deleted file mode 100644 (file)
index 8c62dab..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/* CodeMirror main module
- *
- * Implements the CodeMirror constructor and prototype, which take care
- * of initializing the editor frame, and providing the outside interface.
- */
-
-// The CodeMirrorConfig object is used to specify a default
-// configuration. If you specify such an object before loading this
-// file, the values you put into it will override the defaults given
-// below. You can also assign to it after loading.
-var CodeMirrorConfig = window.CodeMirrorConfig || {};
-
-var CodeMirror = (function(){
-  function setDefaults(object, defaults) {
-    for (var option in defaults) {
-      if (!object.hasOwnProperty(option))
-        object[option] = defaults[option];
-    }
-  }
-  function forEach(array, action) {
-    for (var i = 0; i < array.length; i++)
-      action(array[i]);
-  }
-
-  // These default options can be overridden by passing a set of
-  // options to a specific CodeMirror constructor. See manual.html for
-  // their meaning.
-  setDefaults(CodeMirrorConfig, {
-    stylesheet: "",
-    path: "",
-    parserfile: [],
-    basefiles: ["util.js", "stringstream.js", "select.js", "undo.js", "editor.js", "tokenize.js"],
-    iframeClass: null,
-    passDelay: 200,
-    passTime: 50,
-    continuousScanning: false,
-    saveFunction: null,
-    onChange: null,
-    undoDepth: 50,
-    undoDelay: 800,
-    disableSpellcheck: true,
-    textWrapping: true,
-    readOnly: false,
-    width: "100%",
-    height: "300px",
-    autoMatchParens: false,
-    parserConfig: null,
-    tabMode: "indent", // or "spaces", "default", "shift"
-    reindentOnLoad: false,
-    activeTokens: null,
-    cursorActivity: null,
-    lineNumbers: false,
-    indentUnit: 2
-  });
-
-  function wrapLineNumberDiv(place) {
-    return function(node) {
-      var container = document.createElement("div"),
-          nums = document.createElement("div"),
-          scroller = document.createElement("div");
-      container.style.position = "relative";
-      nums.style.position = "absolute";
-      nums.style.height = "100%";
-      if (nums.style.setExpression) {
-        try {nums.style.setExpression("height", "this.previousSibling.offsetHeight + 'px'");}
-        catch(e) {} // Seems to throw 'Not Implemented' on some IE8 versions
-      }
-      nums.style.top = "0px";
-      nums.style.overflow = "hidden";
-      place(container);
-      container.appendChild(node);
-      container.appendChild(nums);
-      scroller.className = "CodeMirror-line-numbers";
-      nums.appendChild(scroller);
-    }
-  }
-
-  function applyLineNumbers(frame) {
-    var win = frame.contentWindow, doc = win.document,
-        nums = frame.nextSibling, scroller = nums.firstChild;
-
-    var nextNum = 1;
-
-    function update() {
-      var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
-      for (var n = Math.ceil(diff / 10); n > 0; n--) {
-        var div = document.createElement("div");
-        div.appendChild(document.createTextNode(nextNum++));
-        scroller.appendChild(div);
-      }
-      nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
-    }
-
-    update();
-    win.addEventHandler(win, "scroll", update);
-    win.addEventHandler(win, "resize", update);
-  }
-
-  function CodeMirror(place, options) {
-    // Backward compatibility for deprecated options.
-    if (options.dumbTabs) options.tabMode = "spaces";
-    else if (options.normalTab) options.tabMode = "default";
-
-    // Use passed options, if any, to override defaults.
-    this.options = options = options || {};
-    setDefaults(options, CodeMirrorConfig);
-
-    var frame = this.frame = document.createElement("iframe");
-    if (options.iframeClass) frame.className = options.iframeClass;
-    frame.frameBorder = 0;
-    frame.src = "javascript:false;";
-    frame.style.border = "0";
-    frame.style.width = options.width;
-    frame.style.height = options.height;
-    // display: block occasionally suppresses some Firefox bugs, so we
-    // always add it, redundant as it sounds.
-    frame.style.display = "block";
-
-    if (place.appendChild) {
-      var node = place;
-      place = function(n){node.appendChild(n);};
-    }
-    if (options.lineNumbers) place = wrapLineNumberDiv(place);
-    place(frame);
-
-    // Link back to this object, so that the editor can fetch options
-    // and add a reference to itself.
-    frame.CodeMirror = this;
-    this.win = frame.contentWindow;
-
-    if (typeof options.parserfile == "string")
-      options.parserfile = [options.parserfile];
-    if (typeof options.stylesheet == "string")
-      options.stylesheet = [options.stylesheet];
-
-    var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>"];
-    // Hack to work around a bunch of IE8-specific problems.
-    html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>");
-    forEach(options.stylesheet, function(file) {
-      html.push("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file + "\"/>");
-    });
-    forEach(options.basefiles.concat(options.parserfile), function(file) {
-      html.push("<script type=\"text/javascript\" src=\"" + options.path + file + "\"></script>");
-    });
-    html.push("</head><body style=\"border-width: 0;\" class=\"editbox\" spellcheck=\"" +
-              (options.disableSpellcheck ? "false" : "true") + "\"></body></html>");
-
-    var doc = this.win.document;
-    doc.open();
-    doc.write(html.join(""));
-    doc.close();
-  }
-
-  CodeMirror.prototype = {
-    init: function() {
-      if (this.options.initCallback) this.options.initCallback(this);
-      if (this.options.lineNumbers) applyLineNumbers(this.frame);
-      if (this.options.reindentOnLoad) this.reindent();
-    },
-
-    getCode: function() {return this.editor.getCode();},
-    setCode: function(code) {this.editor.importCode(code);},
-    selection: function() {return this.editor.selectedText();},
-    reindent: function() {this.editor.reindent();},
-    reindentSelection: function() {this.editor.reindentSelection(null);},
-
-    focus: function() {
-      this.win.focus();
-      if (this.editor.selectionSnapshot) // IE hack
-        this.win.select.selectCoords(this.win, this.editor.selectionSnapshot);
-    },
-    replaceSelection: function(text) {
-      this.focus();
-      this.editor.replaceSelection(text);
-      return true;
-    },
-    replaceChars: function(text, start, end) {
-      this.editor.replaceChars(text, start, end);
-    },
-    getSearchCursor: function(string, fromCursor) {
-      return this.editor.getSearchCursor(string, fromCursor);
-    },
-
-    undo: function() {this.editor.history.undo();},
-    redo: function() {this.editor.history.redo();},
-    historySize: function() {return this.editor.history.historySize();},
-    clearHistory: function() {this.editor.history.clear();},
-
-    grabKeys: function(callback, filter) {this.editor.grabKeys(callback, filter);},
-    ungrabKeys: function() {this.editor.ungrabKeys();},
-
-    setParser: function(name) {this.editor.setParser(name);},
-
-    cursorPosition: function(start) {
-      if (this.win.select.ie_selection) this.focus();
-      return this.editor.cursorPosition(start);
-    },
-    firstLine: function() {return this.editor.firstLine();},
-    lastLine: function() {return this.editor.lastLine();},
-    nextLine: function(line) {return this.editor.nextLine(line);},
-    prevLine: function(line) {return this.editor.prevLine(line);},
-    lineContent: function(line) {return this.editor.lineContent(line);},
-    setLineContent: function(line, content) {this.editor.setLineContent(line, content);},
-    insertIntoLine: function(line, position, content) {this.editor.insertIntoLine(line, position, content);},
-    selectLines: function(startLine, startOffset, endLine, endOffset) {
-      this.win.focus();
-      this.editor.selectLines(startLine, startOffset, endLine, endOffset);
-    },
-    nthLine: function(n) {
-      var line = this.firstLine();
-      for (; n > 1 && line !== false; n--)
-        line = this.nextLine(line);
-      return line;
-    },
-    lineNumber: function(line) {
-      var num = 0;
-      while (line !== false) {
-        num++;
-        line = this.prevLine(line);
-      }
-      return num;
-    },
-
-    // Old number-based line interface
-    jumpToLine: function(n) {
-      this.selectLines(this.nthLine(n), 0);
-      this.win.focus();
-    },
-    currentLine: function() {
-      return this.lineNumber(this.cursorPosition().line);
-    }
-  };
-
-  CodeMirror.InvalidLineHandle = {toString: function(){return "CodeMirror.InvalidLineHandle";}};
-
-  CodeMirror.replace = function(element) {
-    if (typeof element == "string")
-      element = document.getElementById(element);
-    return function(newElement) {
-      element.parentNode.replaceChild(newElement, element);
-    };
-  };
-
-  CodeMirror.fromTextArea = function(area, options) {
-    if (typeof area == "string")
-      area = document.getElementById(area);
-
-    options = options || {};
-    if (area.style.width && options.width == null)
-      options.width = area.style.width;
-    if (area.style.height && options.height == null)
-      options.height = area.style.height;
-    if (options.content == null) options.content = area.value;
-
-    if (area.form) {
-      function updateField() {
-        area.value = mirror.getCode();
-      }
-      if (typeof area.form.addEventListener == "function")
-        area.form.addEventListener("submit", updateField, false);
-      else
-        area.form.attachEvent("onsubmit", updateField);
-    }
-
-    function insert(frame) {
-      if (area.nextSibling)
-        area.parentNode.insertBefore(frame, area.nextSibling);
-      else
-        area.parentNode.appendChild(frame);
-    }
-
-    area.style.display = "none";
-    var mirror = new CodeMirror(insert, options);
-    return mirror;
-  };
-
-  CodeMirror.isProbablySupported = function() {
-    // This is rather awful, but can be useful.
-    var match;
-    if (window.opera)
-      return Number(window.opera.version()) >= 9.52;
-    else if (/Apple Computers, Inc/.test(navigator.vendor) && (match = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./)))
-      return Number(match[1]) >= 3;
-    else if (document.selection && window.ActiveXObject && (match = navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/)))
-      return Number(match[1]) >= 6;
-    else if (match = navigator.userAgent.match(/gecko\/(\d{8})/i))
-      return Number(match[1]) >= 20050901;
-    else if (match = navigator.userAgent.match(/AppleWebKit\/(\d+)/))
-      return Number(match[1]) >= 525;
-    else
-      return null;
-  };
-
-  return CodeMirror;
-})();
diff --git a/platforma/static/js/lib/codemirror/editor.js b/platforma/static/js/lib/codemirror/editor.js
deleted file mode 100644 (file)
index f5fe841..0000000
+++ /dev/null
@@ -1,1320 +0,0 @@
-/* The Editor object manages the content of the editable frame. It
- * catches events, colours nodes, and indents lines. This file also
- * holds some functions for transforming arbitrary DOM structures into
- * plain sequences of <span> and <br> elements
- */
-
-// Make sure a string does not contain two consecutive 'collapseable'
-// whitespace characters.
-function makeWhiteSpace(n) {
-  var buffer = [], nb = true;
-  for (; n > 0; n--) {
-    buffer.push((nb || n == 1) ? nbsp : " ");
-    nb = !nb;
-  }
-  return buffer.join("");
-}
-
-// Create a set of white-space characters that will not be collapsed
-// by the browser, but will not break text-wrapping either.
-function fixSpaces(string) {
-  if (string.charAt(0) == " ") string = nbsp + string.slice(1);
-  return string.replace(/\t/g, function(){return makeWhiteSpace(indentUnit);})
-    .replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);});
-}
-
-function cleanText(text) {
-  return text.replace(/\u00a0/g, " ").replace(/\u200b/g, "");
-}
-
-// Create a SPAN node with the expected properties for document part
-// spans.
-function makePartSpan(value, doc) {
-  var text = value;
-  if (value.nodeType == 3) text = value.nodeValue;
-  else value = doc.createTextNode(text);
-
-  var span = doc.createElement("SPAN");
-  span.isPart = true;
-  span.appendChild(value);
-  span.currentText = text;
-  return span;
-}
-
-// On webkit, when the last BR of the document does not have text
-// behind it, the cursor can not be put on the line after it. This
-// makes pressing enter at the end of the document occasionally do
-// nothing (or at least seem to do nothing). To work around it, this
-// function makes sure the document ends with a span containing a
-// zero-width space character. The traverseDOM iterator filters such
-// character out again, so that the parsers won't see them. This
-// function is called from a few strategic places to make sure the
-// zwsp is restored after the highlighting process eats it.
-var webkitLastLineHack = webkit ?
-  function(container) {
-    var last = container.lastChild;
-    if (!last || !last.isPart || last.textContent != "\u200b")
-      container.appendChild(makePartSpan("\u200b", container.ownerDocument));
-  } : function() {};
-
-var Editor = (function(){
-  // The HTML elements whose content should be suffixed by a newline
-  // when converting them to flat text.
-  var newlineElements = {"P": true, "DIV": true, "LI": true};
-
-  function asEditorLines(string) {
-    var tab = makeWhiteSpace(indentUnit);
-    return map(string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n").split("\n"), fixSpaces);
-  }
-
-  // Helper function for traverseDOM. Flattens an arbitrary DOM node
-  // into an array of textnodes and <br> tags.
-  function simplifyDOM(root, atEnd) {
-    var doc = root.ownerDocument;
-    var result = [];
-    var leaving = true;
-
-    function simplifyNode(node, top) {
-      if (node.nodeType == 3) {
-        var text = node.nodeValue = fixSpaces(node.nodeValue.replace(/[\r\u200b]/g, "").replace(/\n/g, " "));
-        if (text.length) leaving = false;
-        result.push(node);
-      }
-      else if (node.nodeName == "BR" && node.childNodes.length == 0) {
-        leaving = true;
-        result.push(node);
-      }
-      else {
-        forEach(node.childNodes, simplifyNode);
-        if (!leaving && newlineElements.hasOwnProperty(node.nodeName)) {
-          leaving = true;
-          if (!atEnd || !top)
-            result.push(doc.createElement("BR"));
-        }
-      }
-    }
-
-    simplifyNode(root, true);
-    return result;
-  }
-
-  // Creates a MochiKit-style iterator that goes over a series of DOM
-  // nodes. The values it yields are strings, the textual content of
-  // the nodes. It makes sure that all nodes up to and including the
-  // one whose text is being yielded have been 'normalized' to be just
-  // <span> and <br> elements.
-  // See the story.html file for some short remarks about the use of
-  // continuation-passing style in this iterator.
-  function traverseDOM(start){
-    function yield(value, c){cc = c; return value;}
-    function push(fun, arg, c){return function(){return fun(arg, c);};}
-    function stop(){cc = stop; throw StopIteration;};
-    var cc = push(scanNode, start, stop);
-    var owner = start.ownerDocument;
-    var nodeQueue = [];
-
-    // Create a function that can be used to insert nodes after the
-    // one given as argument.
-    function pointAt(node){
-      var parent = node.parentNode;
-      var next = node.nextSibling;
-      return function(newnode) {
-        parent.insertBefore(newnode, next);
-      };
-    }
-    var point = null;
-
-    // Insert a normalized node at the current point. If it is a text
-    // node, wrap it in a <span>, and give that span a currentText
-    // property -- this is used to cache the nodeValue, because
-    // directly accessing nodeValue is horribly slow on some browsers.
-    // The dirty property is used by the highlighter to determine
-    // which parts of the document have to be re-highlighted.
-    function insertPart(part){
-      var text = "\n";
-      if (part.nodeType == 3) {
-        select.snapshotChanged();
-        part = makePartSpan(part, owner);
-        text = part.currentText;
-      }
-      part.dirty = true;
-      nodeQueue.push(part);
-      point(part);
-      return text;
-    }
-
-    // Extract the text and newlines from a DOM node, insert them into
-    // the document, and yield the textual content. Used to replace
-    // non-normalized nodes.
-    function writeNode(node, c, end) {
-      var toYield = [];
-      forEach(simplifyDOM(node, end), function(part) {
-        toYield.push(insertPart(part));
-      });
-      return yield(toYield.join(""), c);
-    }
-
-    // Check whether a node is a normalized <span> element.
-    function partNode(node){
-      if (node.isPart && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
-        node.currentText = node.firstChild.nodeValue;
-        return !/[\n\t\r]/.test(node.currentText);
-      }
-      return false;
-    }
-
-    // Handle a node. Add its successor to the continuation if there
-    // is one, find out whether the node is normalized. If it is,
-    // yield its content, otherwise, normalize it (writeNode will take
-    // care of yielding).
-    function scanNode(node, c){
-      if (node.nextSibling)
-        c = push(scanNode, node.nextSibling, c);
-
-      if (partNode(node)){
-        nodeQueue.push(node);
-        return yield(node.currentText, c);
-      }
-      else if (node.nodeName == "BR") {
-        nodeQueue.push(node);
-        return yield("\n", c);
-      }
-      else {
-        var end = !node.nextSibling;
-        point = pointAt(node);
-        removeElement(node);
-        return writeNode(node, c, end);
-      }
-    }
-
-    // MochiKit iterators are objects with a next function that
-    // returns the next value or throws StopIteration when there are
-    // no more values.
-    return {next: function(){return cc();}, nodes: nodeQueue};
-  }
-
-  // Determine the text size of a processed node.
-  function nodeSize(node) {
-    if (node.nodeName == "BR")
-      return 1;
-    else
-      return node.currentText.length;
-  }
-
-  // Search backwards through the top-level nodes until the next BR or
-  // the start of the frame.
-  function startOfLine(node) {
-    while (node && node.nodeName != "BR") node = node.previousSibling;
-    return node;
-  }
-  function endOfLine(node, container) {
-    if (!node) node = container.firstChild;
-    else if (node.nodeName == "BR") node = node.nextSibling;
-
-    while (node && node.nodeName != "BR") node = node.nextSibling;
-    return node;
-  }
-
-  function time() {return new Date().getTime();}
-
-  // Client interface for searching the content of the editor. Create
-  // these by calling CodeMirror.getSearchCursor. To use, call
-  // findNext on the resulting object -- this returns a boolean
-  // indicating whether anything was found, and can be called again to
-  // skip to the next find. Use the select and replace methods to
-  // actually do something with the found locations.
-  function SearchCursor(editor, string, fromCursor) {
-    this.editor = editor;
-    this.history = editor.history;
-    this.history.commit();
-
-    // Are we currently at an occurrence of the search string?
-    this.atOccurrence = false;
-    // The object stores a set of nodes coming after its current
-    // position, so that when the current point is taken out of the
-    // DOM tree, we can still try to continue.
-    this.fallbackSize = 15;
-    var cursor;
-    // Start from the cursor when specified and a cursor can be found.
-    if (fromCursor && (cursor = select.cursorPos(this.editor.container))) {
-      this.line = cursor.node;
-      this.offset = cursor.offset;
-    }
-    else {
-      this.line = null;
-      this.offset = 0;
-    }
-    this.valid = !!string;
-
-    // Create a matcher function based on the kind of string we have.
-    var target = string.split("\n"), self = this;
-    this.matches = (target.length == 1) ?
-      // For one-line strings, searching can be done simply by calling
-      // indexOf on the current line.
-      function() {
-        var match = cleanText(self.history.textAfter(self.line).slice(self.offset)).indexOf(string);
-        if (match > -1)
-          return {from: {node: self.line, offset: self.offset + match},
-                  to: {node: self.line, offset: self.offset + match + string.length}};
-      } :
-      // Multi-line strings require internal iteration over lines, and
-      // some clunky checks to make sure the first match ends at the
-      // end of the line and the last match starts at the start.
-      function() {
-        var firstLine = cleanText(self.history.textAfter(self.line).slice(self.offset));
-        var match = firstLine.lastIndexOf(target[0]);
-        if (match == -1 || match != firstLine.length - target[0].length)
-          return false;
-        var startOffset = self.offset + match;
-
-        var line = self.history.nodeAfter(self.line);
-        for (var i = 1; i < target.length - 1; i++) {
-          if (cleanText(self.history.textAfter(line)) != target[i])
-            return false;
-          line = self.history.nodeAfter(line);
-        }
-
-        if (cleanText(self.history.textAfter(line)).indexOf(target[target.length - 1]) != 0)
-          return false;
-
-        return {from: {node: self.line, offset: startOffset},
-                to: {node: line, offset: target[target.length - 1].length}};
-      };
-  }
-
-  SearchCursor.prototype = {
-    findNext: function() {
-      if (!this.valid) return false;
-      this.atOccurrence = false;
-      var self = this;
-
-      // Go back to the start of the document if the current line is
-      // no longer in the DOM tree.
-      if (this.line && !this.line.parentNode) {
-        this.line = null;
-        this.offset = 0;
-      }
-
-      // Set the cursor's position one character after the given
-      // position.
-      function saveAfter(pos) {
-        if (self.history.textAfter(pos.node).length > pos.offset) {
-          self.line = pos.node;
-          self.offset = pos.offset + 1;
-        }
-        else {
-          self.line = self.history.nodeAfter(pos.node);
-          self.offset = 0;
-        }
-      }
-
-      while (true) {
-        var match = this.matches();
-        // Found the search string.
-        if (match) {
-          this.atOccurrence = match;
-          saveAfter(match.from);
-          return true;
-        }
-        this.line = this.history.nodeAfter(this.line);
-        this.offset = 0;
-        // End of document.
-        if (!this.line) {
-          this.valid = false;
-          return false;
-        }
-      }
-    },
-
-    select: function() {
-      if (this.atOccurrence) {
-        select.setCursorPos(this.editor.container, this.atOccurrence.from, this.atOccurrence.to);
-        select.scrollToCursor(this.editor.container);
-      }
-    },
-
-    replace: function(string) {
-      if (this.atOccurrence) {
-        var end = this.editor.replaceRange(this.atOccurrence.from, this.atOccurrence.to, string);
-        this.line = end.node;
-        this.offset = end.offset;
-        this.atOccurrence = false;
-      }
-    }
-  };
-
-  // The Editor object is the main inside-the-iframe interface.
-  function Editor(options) {
-    this.options = options;
-    window.indentUnit = options.indentUnit;
-    this.parent = parent;
-    this.doc = document;
-    var container = this.container = this.doc.body;
-    this.win = window;
-    this.history = new History(container, options.undoDepth, options.undoDelay,
-                               this, options.onChange);
-    var self = this;
-
-    if (!Editor.Parser)
-      throw "No parser loaded.";
-    if (options.parserConfig && Editor.Parser.configure)
-      Editor.Parser.configure(options.parserConfig);
-
-    if (!options.readOnly)
-      select.setCursorPos(container, {node: null, offset: 0});
-
-    this.dirty = [];
-    if (options.content)
-      this.importCode(options.content);
-    else // FF acts weird when the editable document is completely empty
-      container.appendChild(this.doc.createElement("BR"));
-
-    if (!options.readOnly) {
-      if (options.continuousScanning !== false) {
-        this.scanner = this.documentScanner(options.passTime);
-        this.delayScanning();
-      }
-
-      function setEditable() {
-        // In IE, designMode frames can not run any scripts, so we use
-        // contentEditable instead.
-        if (document.body.contentEditable != undefined && internetExplorer)
-          document.body.contentEditable = "true";
-        else
-          document.designMode = "on";
-
-        document.documentElement.style.borderWidth = "0";
-        if (!options.textWrapping)
-          container.style.whiteSpace = "nowrap";
-      }
-
-      // If setting the frame editable fails, try again when the user
-      // focus it (happens when the frame is not visible on
-      // initialisation, in Firefox).
-      try {
-        setEditable();
-      }
-      catch(e) {
-        var focusEvent = addEventHandler(document, "focus", function() {
-          focusEvent();
-          setEditable();
-        }, true);
-      }
-
-      addEventHandler(document, "keydown", method(this, "keyDown"));
-      addEventHandler(document, "keypress", method(this, "keyPress"));
-      addEventHandler(document, "keyup", method(this, "keyUp"));
-
-      function cursorActivity() {self.cursorActivity(false);}
-      addEventHandler(document.body, "mouseup", cursorActivity);
-      addEventHandler(document.body, "cut", cursorActivity);
-
-      addEventHandler(document.body, "paste", function(event) {
-        cursorActivity();
-        var text = null;
-        try {
-          var clipboardData = event.clipboardData || window.clipboardData;
-          if (clipboardData) text = clipboardData.getData('Text');
-        }
-        catch(e) {}
-        if (text !== null) {
-          self.replaceSelection(text);
-          event.stop();
-        }
-      });
-
-      addEventHandler(document.body, "beforepaste", method(this, "reroutePasteEvent"));
-
-      if (this.options.autoMatchParens)
-        addEventHandler(document.body, "click", method(this, "scheduleParenBlink"));
-    }
-    else if (!options.textWrapping) {
-      container.style.whiteSpace = "nowrap";
-    }
-  }
-
-  function isSafeKey(code) {
-    return (code >= 16 && code <= 18) || // shift, control, alt
-           (code >= 33 && code <= 40); // arrows, home, end
-  }
-
-  Editor.prototype = {
-    // Import a piece of code into the editor.
-    importCode: function(code) {
-      this.history.push(null, null, asEditorLines(code));
-      this.history.reset();
-    },
-
-    // Extract the code from the editor.
-    getCode: function() {
-      if (!this.container.firstChild)
-        return "";
-
-      var accum = [];
-      select.markSelection(this.win);
-      forEach(traverseDOM(this.container.firstChild), method(accum, "push"));
-      webkitLastLineHack(this.container);
-      select.selectMarked();
-      return cleanText(accum.join(""));
-    },
-
-    checkLine: function(node) {
-      if (node === false || !(node == null || node.parentNode == this.container))
-        throw parent.CodeMirror.InvalidLineHandle;
-    },
-
-    cursorPosition: function(start) {
-      if (start == null) start = true;
-      var pos = select.cursorPos(this.container, start);
-      if (pos) return {line: pos.node, character: pos.offset};
-      else return {line: null, character: 0};
-    },
-
-    firstLine: function() {
-      return null;
-    },
-
-    lastLine: function() {
-      if (this.container.lastChild) return startOfLine(this.container.lastChild);
-      else return null;
-    },
-
-    nextLine: function(line) {
-      this.checkLine(line);
-      var end = endOfLine(line, this.container);
-      return end || false;
-    },
-
-    prevLine: function(line) {
-      this.checkLine(line);
-      if (line == null) return false;
-      return startOfLine(line.previousSibling);
-    },
-
-    selectLines: function(startLine, startOffset, endLine, endOffset) {
-      this.checkLine(startLine);
-      var start = {node: startLine, offset: startOffset}, end = null;
-      if (endOffset !== undefined) {
-        this.checkLine(endLine);
-        end = {node: endLine, offset: endOffset};
-      }
-      select.setCursorPos(this.container, start, end);
-      select.scrollToCursor(this.container);
-    },
-
-    lineContent: function(line) {
-      this.checkLine(line);
-      var accum = [];
-      for (line = line ? line.nextSibling : this.container.firstChild;
-           line && line.nodeName != "BR"; line = line.nextSibling)
-        accum.push(nodeText(line));
-      return cleanText(accum.join(""));
-    },
-
-    setLineContent: function(line, content) {
-      this.history.commit();
-      this.replaceRange({node: line, offset: 0},
-                        {node: line, offset: this.history.textAfter(line).length},
-                        content);
-      this.addDirtyNode(line);
-      this.scheduleHighlight();
-    },
-
-    insertIntoLine: function(line, position, content) {
-      var before = null;
-      if (position == "end") {
-        before = endOfLine(line, this.container);
-      }
-      else {
-        for (var cur = line ? line.nextSibling : this.container.firstChild; cur; cur = cur.nextSibling) {
-          if (position == 0) {
-            before = cur;
-            break;
-          }
-          var text = (cur.innerText || cur.textContent || cur.nodeValue || "");
-          if (text.length > position) {
-            before = cur.nextSibling;
-            content = text.slice(0, position) + content + text.slice(position);
-            removeElement(cur);
-            break;
-          }
-          position -= text.length;
-        }
-      }
-
-      var lines = asEditorLines(content), doc = this.container.ownerDocument;
-      for (var i = 0; i < lines.length; i++) {
-        if (i > 0) this.container.insertBefore(doc.createElement("BR"), before);
-        this.container.insertBefore(makePartSpan(lines[i], doc), before);
-      }
-      this.addDirtyNode(line);
-      this.scheduleHighlight();
-    },
-
-    // Retrieve the selected text.
-    selectedText: function() {
-      var h = this.history;
-      h.commit();
-
-      var start = select.cursorPos(this.container, true),
-          end = select.cursorPos(this.container, false);
-      if (!start || !end) return "";
-
-      if (start.node == end.node)
-        return h.textAfter(start.node).slice(start.offset, end.offset);
-
-      var text = [h.textAfter(start.node).slice(start.offset)];
-      for (var pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos))
-        text.push(h.textAfter(pos));
-      text.push(h.textAfter(end.node).slice(0, end.offset));
-      return cleanText(text.join("\n"));
-    },
-
-    // Replace the selection with another p
-    // iece of text.
-    replaceSelection: function(text) {
-      this.history.commit();
-
-      var start = select.cursorPos(this.container, true),
-          end = select.cursorPos(this.container, false);
-      if (!start || !end) return;
-
-      end = this.replaceRange(start, end, text);
-      // select.setCursorPos(this.container, end);
-      webkitLastLineHack(this.container);
-    },
-
-    reroutePasteEvent: function() {
-      if (this.capturingPaste || window.opera) return;
-      this.capturingPaste = true;
-      var te = parent.document.createElement("TEXTAREA");
-      te.style.position = "absolute";
-      te.style.left = "-500px";
-      te.style.width = "10px";
-      te.style.top = nodeTop(frameElement) + "px";
-      parent.document.body.appendChild(te);
-      parent.focus();
-      te.focus();
-
-      var self = this;
-      this.parent.setTimeout(function() {
-        self.capturingPaste = false;
-        self.win.focus();
-        if (self.selectionSnapshot) // IE hack
-          self.win.select.selectCoords(self.win, self.selectionSnapshot);
-        var text = te.value;
-        if (text) self.replaceSelection(text);
-        removeElement(te);
-      }, 10);
-    },
-
-    replaceRange: function(from, to, text) {
-      var lines = asEditorLines(text);
-      lines[0] = this.history.textAfter(from.node).slice(0, from.offset) + lines[0];
-      var lastLine = lines[lines.length - 1];
-      lines[lines.length - 1] = lastLine + this.history.textAfter(to.node).slice(to.offset);
-      var end = this.history.nodeAfter(to.node);
-      this.history.push(from.node, end, lines);
-      return {node: this.history.nodeBefore(end),
-              offset: lastLine.length};
-    },
-
-    getSearchCursor: function(string, fromCursor) {
-      return new SearchCursor(this, string, fromCursor);
-    },
-
-    // Re-indent the whole buffer
-    reindent: function() {
-      if (this.container.firstChild)
-        this.indentRegion(null, this.container.lastChild);
-    },
-
-    reindentSelection: function(direction) {
-      if (!select.somethingSelected(this.win)) {
-        this.indentAtCursor(direction);
-      }
-      else {
-        var start = select.selectionTopNode(this.container, true),
-            end = select.selectionTopNode(this.container, false);
-        if (start === false || end === false) return;
-        this.indentRegion(start, end, direction);
-      }
-    },
-
-    grabKeys: function(eventHandler, filter) {
-      this.frozen = eventHandler;
-      this.keyFilter = filter;
-    },
-    ungrabKeys: function() {
-      this.frozen = "leave";
-      this.keyFilter = null;
-    },
-
-    setParser: function(name) {
-      Editor.Parser = window[name];
-      if (this.container.firstChild) {
-        forEach(this.container.childNodes, function(n) {
-          if (n.nodeType != 3) n.dirty = true;
-        });
-        this.addDirtyNode(this.firstChild);
-        this.scheduleHighlight();
-      }
-    },
-
-    // Intercept enter and tab, and assign their new functions.
-    keyDown: function(event) {
-      if (this.frozen == "leave") this.frozen = null;
-      if (this.frozen && (!this.keyFilter || this.keyFilter(event))) {
-        event.stop();
-        this.frozen(event);
-        return;
-      }
-
-      var code = event.keyCode;
-      // Don't scan when the user is typing.
-      this.delayScanning();
-      // Schedule a paren-highlight event, if configured.
-      if (this.options.autoMatchParens)
-        this.scheduleParenBlink();
-
-      // The various checks for !altKey are there because AltGr sets both
-      // ctrlKey and altKey to true, and should not be recognised as
-      // Control.
-      if (code == 13) { // enter
-        if (event.ctrlKey && !event.altKey) {
-          this.reparseBuffer();
-        }
-        else {
-          select.insertNewlineAtCursor(this.win);
-          this.indentAtCursor();
-          select.scrollToCursor(this.container);
-        }
-        event.stop();
-      }
-      else if (code == 9 && this.options.tabMode != "default") { // tab
-        this.handleTab(!event.ctrlKey && !event.shiftKey);
-        event.stop();
-      }
-      else if (code == 32 && event.shiftKey && this.options.tabMode == "default") { // space
-        this.handleTab(true);
-        event.stop();
-      }
-      else if (code == 36 && !event.shiftKey && !event.ctrlKey) { // home
-        if (this.home())
-          event.stop();
-      }
-      else if ((code == 219 || code == 221) && event.ctrlKey && !event.altKey) { // [, ]
-        this.blinkParens(event.shiftKey);
-        event.stop();
-      }
-      else if (event.metaKey && !event.shiftKey && (code == 37 || code == 39)) { // Meta-left/right
-        var cursor = select.selectionTopNode(this.container);
-        if (cursor === false || !this.container.firstChild) return;
-
-        if (code == 37) select.focusAfterNode(startOfLine(cursor), this.container);
-        else {
-          var end = endOfLine(cursor, this.container);
-          select.focusAfterNode(end ? end.previousSibling : this.container.lastChild, this.container);
-        }
-        event.stop();
-      }
-      else if ((event.ctrlKey || event.metaKey) && !event.altKey) {
-        if ((event.shiftKey && code == 90) || code == 89) { // shift-Z, Y
-          select.scrollToNode(this.history.redo());
-          event.stop();
-        }
-        else if (code == 90 || (safari && code == 8)) { // Z, backspace
-          select.scrollToNode(this.history.undo());
-          event.stop();
-        }
-        else if (code == 83 && this.options.saveFunction) { // S
-          this.options.saveFunction();
-          event.stop();
-        }
-      }
-    },
-
-    // Check for characters that should re-indent the current line,
-    // and prevent Opera from handling enter and tab anyway.
-    keyPress: function(event) {
-      var electric = Editor.Parser.electricChars, self = this;
-      // Hack for Opera, and Firefox on OS X, in which stopping a
-      // keydown event does not prevent the associated keypress event
-      // from happening, so we have to cancel enter and tab again
-      // here.
-      if ((this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode))) ||
-          event.code == 13 || (event.code == 9 && this.options.tabMode != "default") ||
-          (event.keyCode == 32 && event.shiftKey && this.options.tabMode == "default"))
-        event.stop();
-      else if (electric && electric.indexOf(event.character) != -1)
-        this.parent.setTimeout(function(){self.indentAtCursor(null);}, 0);
-      else if ((event.character == "v" || event.character == "V")
-               && (event.ctrlKey || event.metaKey) && !event.altKey) // ctrl-V
-        this.reroutePasteEvent();
-    },
-
-    // Mark the node at the cursor dirty when a non-safe key is
-    // released.
-    keyUp: function(event) {
-      this.cursorActivity(isSafeKey(event.keyCode));
-    },
-
-    // Indent the line following a given <br>, or null for the first
-    // line. If given a <br> element, this must have been highlighted
-    // so that it has an indentation method. Returns the whitespace
-    // element that has been modified or created (if any).
-    indentLineAfter: function(start, direction) {
-      // whiteSpace is the whitespace span at the start of the line,
-      // or null if there is no such node.
-      var whiteSpace = start ? start.nextSibling : this.container.firstChild;
-      if (whiteSpace && !hasClass(whiteSpace, "whitespace"))
-        whiteSpace = null;
-
-      // Sometimes the start of the line can influence the correct
-      // indentation, so we retrieve it.
-      var firstText = whiteSpace ? whiteSpace.nextSibling : (start ? start.nextSibling : this.container.firstChild);
-      var nextChars = (start && firstText && firstText.currentText) ? firstText.currentText : "";
-
-      // Ask the lexical context for the correct indentation, and
-      // compute how much this differs from the current indentation.
-      var newIndent = 0, curIndent = whiteSpace ? whiteSpace.currentText.length : 0;
-      if (direction != null && this.options.tabMode == "shift")
-        newIndent = direction ? curIndent + indentUnit : Math.max(0, curIndent - indentUnit)
-      else if (start)
-        newIndent = start.indentation(nextChars, curIndent, direction);
-      else if (Editor.Parser.firstIndentation)
-        newIndent = Editor.Parser.firstIndentation(nextChars, curIndent, direction);
-      var indentDiff = newIndent - curIndent;
-
-      // If there is too much, this is just a matter of shrinking a span.
-      if (indentDiff < 0) {
-        if (newIndent == 0) {
-          if (firstText) select.snapshotMove(whiteSpace.firstChild, firstText.firstChild, 0);
-          removeElement(whiteSpace);
-          whiteSpace = null;
-        }
-        else {
-          select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true);
-          whiteSpace.currentText = makeWhiteSpace(newIndent);
-          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
-        }
-      }
-      // Not enough...
-      else if (indentDiff > 0) {
-        // If there is whitespace, we grow it.
-        if (whiteSpace) {
-          whiteSpace.currentText = makeWhiteSpace(newIndent);
-          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
-        }
-        // Otherwise, we have to add a new whitespace node.
-        else {
-          whiteSpace = makePartSpan(makeWhiteSpace(newIndent), this.doc);
-          whiteSpace.className = "whitespace";
-          if (start) insertAfter(whiteSpace, start);
-          else this.container.insertBefore(whiteSpace, this.container.firstChild);
-        }
-        if (firstText) select.snapshotMove(firstText.firstChild, whiteSpace.firstChild, curIndent, false, true);
-      }
-      if (indentDiff != 0) this.addDirtyNode(start);
-      return whiteSpace;
-    },
-
-    // Re-highlight the selected part of the document.
-    highlightAtCursor: function() {
-      var pos = select.selectionTopNode(this.container, true);
-      var to = select.selectionTopNode(this.container, false);
-      if (pos === false || to === false) return;
-
-      select.markSelection(this.win);
-      if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false)
-        return false;
-      select.selectMarked();
-      return true;
-    },
-
-    // When tab is pressed with text selected, the whole selection is
-    // re-indented, when nothing is selected, the line with the cursor
-    // is re-indented.
-    handleTab: function(direction) {
-      if (this.options.tabMode == "spaces")
-        select.insertTabAtCursor(this.win);
-      else
-        this.reindentSelection(direction);
-    },
-
-    home: function() {
-      var cur = select.selectionTopNode(this.container, true), start = cur;
-      if (cur === false || !(!cur || cur.isPart || cur.nodeName == "BR") || !this.container.firstChild)
-        return false;
-
-      while (cur && cur.nodeName != "BR") cur = cur.previousSibling;
-      var next = cur ? cur.nextSibling : this.container.firstChild;
-      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
-        select.focusAfterNode(next, this.container);
-      else
-        select.focusAfterNode(cur, this.container);
-
-      select.scrollToCursor(this.container);
-      return true;
-    },
-
-    // Delay (or initiate) the next paren blink event.
-    scheduleParenBlink: function() {
-      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
-      var self = this;
-      this.parenEvent = this.parent.setTimeout(function(){self.blinkParens();}, 300);
-    },
-
-    // Take the token before the cursor. If it contains a character in
-    // '()[]{}', search for the matching paren/brace/bracket, and
-    // highlight them in green for a moment, or red if no proper match
-    // was found.
-    blinkParens: function(jump) {
-      if (!window.select) return;
-      // Clear the event property.
-      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
-      this.parenEvent = null;
-
-      // Extract a 'paren' from a piece of text.
-      function paren(node) {
-        if (node.currentText) {
-          var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);
-          return match && match[1];
-        }
-      }
-      // Determine the direction a paren is facing.
-      function forward(ch) {
-        return /[\(\[\{]/.test(ch);
-      }
-
-      var ch, self = this, cursor = select.selectionTopNode(this.container, true);
-      if (!cursor || !this.highlightAtCursor()) return;
-      cursor = select.selectionTopNode(this.container, true);
-      if (!(cursor && ((ch = paren(cursor)) || (cursor = cursor.nextSibling) && (ch = paren(cursor)))))
-        return;
-      // We only look for tokens with the same className.
-      var className = cursor.className, dir = forward(ch), match = matching[ch];
-
-      // Since parts of the document might not have been properly
-      // highlighted, and it is hard to know in advance which part we
-      // have to scan, we just try, and when we find dirty nodes we
-      // abort, parse them, and re-try.
-      function tryFindMatch() {
-        var stack = [], ch, ok = true;;
-        for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) {
-          if (runner.className == className && runner.nodeName == "SPAN" && (ch = paren(runner))) {
-            if (forward(ch) == dir)
-              stack.push(ch);
-            else if (!stack.length)
-              ok = false;
-            else if (stack.pop() != matching[ch])
-              ok = false;
-            if (!stack.length) break;
-          }
-          else if (runner.dirty || runner.nodeName != "SPAN" && runner.nodeName != "BR") {
-            return {node: runner, status: "dirty"};
-          }
-        }
-        return {node: runner, status: runner && ok};
-      }
-      // Temporarily give the relevant nodes a colour.
-      function blink(node, ok) {
-        node.style.fontWeight = "bold";
-        node.style.color = ok ? "#8F8" : "#F88";
-        self.parent.setTimeout(function() {node.style.fontWeight = ""; node.style.color = "";}, 500);
-      }
-
-      while (true) {
-        var found = tryFindMatch();
-        if (found.status == "dirty") {
-          this.highlight(found.node, endOfLine(found.node));
-          // Needed because in some corner cases a highlight does not
-          // reach a node.
-          found.node.dirty = false;
-          continue;
-        }
-        else {
-          blink(cursor, found.status);
-          if (found.node) {
-            blink(found.node, found.status);
-            if (jump) select.focusAfterNode(found.node.previousSibling, this.container);
-          }
-          break;
-        }
-      }
-    },
-
-    // Adjust the amount of whitespace at the start of the line that
-    // the cursor is on so that it is indented properly.
-    indentAtCursor: function(direction) {
-      if (!this.container.firstChild) return;
-      // The line has to have up-to-date lexical information, so we
-      // highlight it first.
-      if (!this.highlightAtCursor()) return;
-      var cursor = select.selectionTopNode(this.container, false);
-      // If we couldn't determine the place of the cursor,
-      // there's nothing to indent.
-      if (cursor === false)
-        return;
-      var lineStart = startOfLine(cursor);
-      var whiteSpace = this.indentLineAfter(lineStart, direction);
-      if (cursor == lineStart && whiteSpace)
-          cursor = whiteSpace;
-      // This means the indentation has probably messed up the cursor.
-      if (cursor == whiteSpace)
-        select.focusAfterNode(cursor, this.container);
-    },
-
-    // Indent all lines whose start falls inside of the current
-    // selection.
-    indentRegion: function(start, end, direction) {
-      var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
-      if (end.nodeName != "BR") end = endOfLine(end, this.container);
-
-      do {
-        var next = endOfLine(current, this.container);
-        if (current) this.highlight(before, next, true);
-        this.indentLineAfter(current, direction);
-        before = current;
-        current = next;
-      } while (current != end);
-      select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0});
-    },
-
-    // Find the node that the cursor is in, mark it as dirty, and make
-    // sure a highlight pass is scheduled.
-    cursorActivity: function(safe) {
-      if (internetExplorer) {
-        this.container.createTextRange().execCommand("unlink");
-        this.selectionSnapshot = select.selectionCoords(this.win);
-      }
-
-      var activity = this.options.cursorActivity;
-      if (!safe || activity) {
-        var cursor = select.selectionTopNode(this.container, false);
-        if (cursor === false || !this.container.firstChild) return;
-        cursor = cursor || this.container.firstChild;
-        if (activity) activity(cursor);
-        if (!safe) {
-          this.scheduleHighlight();
-          this.addDirtyNode(cursor);
-        }
-      }
-    },
-
-    reparseBuffer: function() {
-      forEach(this.container.childNodes, function(node) {node.dirty = true;});
-      if (this.container.firstChild)
-        this.addDirtyNode(this.container.firstChild);
-    },
-
-    // Add a node to the set of dirty nodes, if it isn't already in
-    // there.
-    addDirtyNode: function(node) {
-      node = node || this.container.firstChild;
-      if (!node) return;
-
-      for (var i = 0; i < this.dirty.length; i++)
-        if (this.dirty[i] == node) return;
-
-      if (node.nodeType != 3)
-        node.dirty = true;
-      this.dirty.push(node);
-    },
-
-    // Cause a highlight pass to happen in options.passDelay
-    // milliseconds. Clear the existing timeout, if one exists. This
-    // way, the passes do not happen while the user is typing, and
-    // should as unobtrusive as possible.
-    scheduleHighlight: function() {
-      // Timeouts are routed through the parent window, because on
-      // some browsers designMode windows do not fire timeouts.
-      var self = this;
-      this.parent.clearTimeout(this.highlightTimeout);
-      this.highlightTimeout = this.parent.setTimeout(function(){self.highlightDirty();}, this.options.passDelay);
-    },
-
-    // Fetch one dirty node, and remove it from the dirty set.
-    getDirtyNode: function() {
-      while (this.dirty.length > 0) {
-        var found = this.dirty.pop();
-        // IE8 sometimes throws an unexplainable 'invalid argument'
-        // exception for found.parentNode
-        try {
-          // If the node has been coloured in the meantime, or is no
-          // longer in the document, it should not be returned.
-          while (found && found.parentNode != this.container)
-            found = found.parentNode
-          if (found && (found.dirty || found.nodeType == 3))
-            return found;
-        } catch (e) {}
-      }
-      return null;
-    },
-
-    // Pick dirty nodes, and highlight them, until options.passTime
-    // milliseconds have gone by. The highlight method will continue
-    // to next lines as long as it finds dirty nodes. It returns
-    // information about the place where it stopped. If there are
-    // dirty nodes left after this function has spent all its lines,
-    // it shedules another highlight to finish the job.
-    highlightDirty: function(force) {
-      // Prevent FF from raising an error when it is firing timeouts
-      // on a page that's no longer loaded.
-      if (!window.select) return;
-
-      if (!this.options.readOnly) select.markSelection(this.win);
-      var start, endTime = force ? null : time() + this.options.passTime;
-      while ((time() < endTime || force) && (start = this.getDirtyNode())) {
-        var result = this.highlight(start, endTime);
-        if (result && result.node && result.dirty)
-          this.addDirtyNode(result.node);
-      }
-      if (!this.options.readOnly) select.selectMarked();
-      if (start) this.scheduleHighlight();
-      return this.dirty.length == 0;
-    },
-
-    // Creates a function that, when called through a timeout, will
-    // continuously re-parse the document.
-    documentScanner: function(passTime) {
-      var self = this, pos = null;
-      return function() {
-        // FF timeout weirdness workaround.
-        if (!window.select) return;
-        // If the current node is no longer in the document... oh
-        // well, we start over.
-        if (pos && pos.parentNode != self.container)
-          pos = null;
-        select.markSelection(self.win);
-        var result = self.highlight(pos, time() + passTime, true);
-        select.selectMarked();
-        var newPos = result ? (result.node && result.node.nextSibling) : null;
-        pos = (pos == newPos) ? null : newPos;
-        self.delayScanning();
-      };
-    },
-
-    // Starts the continuous scanning process for this document after
-    // a given interval.
-    delayScanning: function() {
-      if (this.scanner) {
-        this.parent.clearTimeout(this.documentScan);
-        this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
-      }
-    },
-
-    // The function that does the actual highlighting/colouring (with
-    // help from the parser and the DOM normalizer). Its interface is
-    // rather overcomplicated, because it is used in different
-    // situations: ensuring that a certain line is highlighted, or
-    // highlighting up to X milliseconds starting from a certain
-    // point. The 'from' argument gives the node at which it should
-    // start. If this is null, it will start at the beginning of the
-    // document. When a timestamp is given with the 'target' argument,
-    // it will stop highlighting at that time. If this argument holds
-    // a DOM node, it will highlight until it reaches that node. If at
-    // any time it comes across two 'clean' lines (no dirty nodes), it
-    // will stop, except when 'cleanLines' is true. maxBacktrack is
-    // the maximum number of lines to backtrack to find an existing
-    // parser instance. This is used to give up in situations where a
-    // highlight would take too long and freeze the browser interface.
-    highlight: function(from, target, cleanLines, maxBacktrack){
-      var container = this.container, self = this, active = this.options.activeTokens;
-      var endTime = (typeof target == "number" ? target : null);
-
-      if (!container.firstChild)
-        return;
-      // Backtrack to the first node before from that has a partial
-      // parse stored.
-      while (from && (!from.parserFromHere || from.dirty)) {
-        if (maxBacktrack != null && from.nodeName == "BR" && (--maxBacktrack) < 0)
-          return false;
-        from = from.previousSibling;
-      }
-      // If we are at the end of the document, do nothing.
-      if (from && !from.nextSibling)
-        return;
-
-      // Check whether a part (<span> node) and the corresponding token
-      // match.
-      function correctPart(token, part){
-        return !part.reduced && part.currentText == token.value && part.className == token.style;
-      }
-      // Shorten the text associated with a part by chopping off
-      // characters from the front. Note that only the currentText
-      // property gets changed. For efficiency reasons, we leave the
-      // nodeValue alone -- we set the reduced flag to indicate that
-      // this part must be replaced.
-      function shortenPart(part, minus){
-        part.currentText = part.currentText.substring(minus);
-        part.reduced = true;
-      }
-      // Create a part corresponding to a given token.
-      function tokenPart(token){
-        var part = makePartSpan(token.value, self.doc);
-        part.className = token.style;
-        return part;
-      }
-
-      function maybeTouch(node) {
-        if (node) {
-          var old = node.oldNextSibling;
-          if (lineDirty || old === undefined || node.nextSibling != old)
-            self.history.touch(node);
-          node.oldNextSibling = node.nextSibling;
-        }
-        else {
-          var old = self.container.oldFirstChild;
-          if (lineDirty || old === undefined || self.container.firstChild != old)
-            self.history.touch(null);
-          self.container.oldFirstChild = self.container.firstChild;
-        }
-      }
-
-      // Get the token stream. If from is null, we start with a new
-      // parser from the start of the frame, otherwise a partial parse
-      // is resumed.
-      var traversal = traverseDOM(from ? from.nextSibling : container.firstChild),
-          stream = stringStream(traversal),
-          parsed = from ? from.parserFromHere(stream) : Editor.Parser.make(stream);
-
-      // parts is an interface to make it possible to 'delay' fetching
-      // the next DOM node until we are completely done with the one
-      // before it. This is necessary because often the next node is
-      // not yet available when we want to proceed past the current
-      // one.
-      var parts = {
-        current: null,
-        // Fetch current node.
-        get: function(){
-          if (!this.current)
-            this.current = traversal.nodes.shift();
-          return this.current;
-        },
-        // Advance to the next part (do not fetch it yet).
-        next: function(){
-          this.current = null;
-        },
-        // Remove the current part from the DOM tree, and move to the
-        // next.
-        remove: function(){
-          container.removeChild(this.get());
-          this.current = null;
-        },
-        // Advance to the next part that is not empty, discarding empty
-        // parts.
-        getNonEmpty: function(){
-          var part = this.get();
-          // Allow empty nodes when they are alone on a line, needed
-          // for the FF cursor bug workaround (see select.js,
-          // insertNewlineAtCursor).
-          while (part && part.nodeName == "SPAN" && part.currentText == "") {
-            var old = part;
-            this.remove();
-            part = this.get();
-            // Adjust selection information, if any. See select.js for details.
-            select.snapshotMove(old.firstChild, part && (part.firstChild || part), 0);
-          }
-          return part;
-        }
-      };
-
-      var lineDirty = false, prevLineDirty = true, lineNodes = 0;
-
-      // This forEach loops over the tokens from the parsed stream, and
-      // at the same time uses the parts object to proceed through the
-      // corresponding DOM nodes.
-      forEach(parsed, function(token){
-        var part = parts.getNonEmpty();
-
-        if (token.value == "\n"){
-          // The idea of the two streams actually staying synchronized
-          // is such a long shot that we explicitly check.
-          if (part.nodeName != "BR")
-            throw "Parser out of sync. Expected BR.";
-
-          if (part.dirty || !part.indentation) lineDirty = true;
-          maybeTouch(from);
-          from = part;
-
-          // Every <br> gets a copy of the parser state and a lexical
-          // context assigned to it. The first is used to be able to
-          // later resume parsing from this point, the second is used
-          // for indentation.
-          part.parserFromHere = parsed.copy();
-          part.indentation = token.indentation;
-          part.dirty = false;
-
-          // If the target argument wasn't an integer, go at least
-          // until that node.
-          if (endTime == null && part == target) throw StopIteration;
-
-          // A clean line with more than one node means we are done.
-          // Throwing a StopIteration is the way to break out of a
-          // MochiKit forEach loop.
-          if ((endTime != null && time() >= endTime) || (!lineDirty && !prevLineDirty && lineNodes > 1 && !cleanLines))
-            throw StopIteration;
-          prevLineDirty = lineDirty; lineDirty = false; lineNodes = 0;
-          parts.next();
-        }
-        else {
-          if (part.nodeName != "SPAN")
-            throw "Parser out of sync. Expected SPAN.";
-          if (part.dirty)
-            lineDirty = true;
-          lineNodes++;
-
-          // If the part matches the token, we can leave it alone.
-          if (correctPart(token, part)){
-            part.dirty = false;
-            parts.next();
-          }
-          // Otherwise, we have to fix it.
-          else {
-            lineDirty = true;
-            // Insert the correct part.
-            var newPart = tokenPart(token);
-            container.insertBefore(newPart, part);
-            if (active) active(newPart, token, self);
-            var tokensize = token.value.length;
-            var offset = 0;
-            // Eat up parts until the text for this token has been
-            // removed, adjusting the stored selection info (see
-            // select.js) in the process.
-            while (tokensize > 0) {
-              part = parts.get();
-              var partsize = part.currentText.length;
-              select.snapshotReplaceNode(part.firstChild, newPart.firstChild, tokensize, offset);
-              if (partsize > tokensize){
-                shortenPart(part, tokensize);
-                tokensize = 0;
-              }
-              else {
-                tokensize -= partsize;
-                offset += partsize;
-                parts.remove();
-              }
-            }
-          }
-        }
-      });
-      maybeTouch(from);
-      webkitLastLineHack(this.container);
-
-      // The function returns some status information that is used by
-      // hightlightDirty to determine whether and where it has to
-      // continue.
-      return {node: parts.getNonEmpty(),
-              dirty: lineDirty};
-    }
-  };
-
-  return Editor;
-})();
-
-addEventHandler(window, "load", function() {
-  var CodeMirror = window.frameElement.CodeMirror;
-  CodeMirror.editor = new Editor(CodeMirror.options);
-  this.parent.setTimeout(method(CodeMirror, "init"), 0);
-});
diff --git a/platforma/static/js/lib/codemirror/parsexml.js b/platforma/static/js/lib/codemirror/parsexml.js
deleted file mode 100644 (file)
index 87fbf0c..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/* This file defines an XML parser, with a few kludges to make it
- * useable for HTML. autoSelfClosers defines a set of tag names that
- * are expected to not have a closing tag, and doNotIndent specifies
- * the tags inside of which no indentation should happen (see Config
- * object). These can be disabled by passing the editor an object like
- * {useHTMLKludges: false} as parserConfig option.
- */
-
-var XMLParser = Editor.Parser = (function() {
-  var Kludges = {
-    autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true,
-                      "meta": true, "col": true, "frame": true, "base": true, "area": true},
-    doNotIndent: {"pre": true, "!cdata": true}
-  };
-  var NoKludges = {autoSelfClosers: {}, doNotIndent: {"!cdata": true}};
-  var UseKludges = Kludges;
-  var alignCDATA = false;
-
-  // Simple stateful tokenizer for XML documents. Returns a
-  // MochiKit-style iterator, with a state property that contains a
-  // function encapsulating the current state. See tokenize.js.
-  var tokenizeXML = (function() {
-    function inText(source, setState) {
-      var ch = source.next();
-      if (ch == "<") {
-        if (source.equals("!")) {
-          source.next();
-          if (source.equals("[")) {
-            if (source.lookAhead("[CDATA[", true)) {
-              setState(inBlock("xml-cdata", "]]>"));
-              return null;
-            }
-            else {
-              return "xml-text";
-            }
-          }
-          else if (source.lookAhead("--", true)) {
-            setState(inBlock("xml-comment", "-->"));
-            return null;
-          }
-          else {
-            return "xml-text";
-          }
-        }
-        else if (source.equals("?")) {
-          source.next();
-          source.nextWhileMatches(/[\w\._\-]/);
-          setState(inBlock("xml-processing", "?>"));
-          return "xml-processing";
-        }
-        else {
-          if (source.equals("/")) source.next();
-          setState(inTag);
-          return "xml-punctuation";
-        }
-      }
-      else if (ch == "&") {
-        while (!source.endOfLine()) {
-          if (source.next() == ";")
-            break;
-        }
-        return "xml-entity";
-      }
-      else {
-        source.nextWhileMatches(/[^&<\n]/);
-        return "xml-text";
-      }
-    }
-
-    function inTag(source, setState) {
-      var ch = source.next();
-      if (ch == ">") {
-        setState(inText);
-        return "xml-punctuation";
-      }
-      else if (/[?\/]/.test(ch) && source.equals(">")) {
-        source.next();
-        setState(inText);
-        return "xml-punctuation";
-      }
-      else if (ch == "=") {
-        return "xml-punctuation";
-      }
-      else if (/[\'\"]/.test(ch)) {
-        setState(inAttribute(ch));
-        return null;
-      }
-      else {
-        source.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);
-        return "xml-name";
-      }
-    }
-
-    function inAttribute(quote) {
-      return function(source, setState) {
-        while (!source.endOfLine()) {
-          if (source.next() == quote) {
-            setState(inTag);
-            break;
-          }
-        }
-        return "xml-attribute";
-      };
-    }
-
-    function inBlock(style, terminator) {
-      return function(source, setState) {
-        while (!source.endOfLine()) {
-          if (source.lookAhead(terminator, true)) {
-            setState(inText);
-            break;
-          }
-          source.next();
-        }
-        return style;
-      };
-    }
-
-    return function(source, startState) {
-      return tokenizer(source, startState || inText);
-    };
-  })();
-
-  // The parser. The structure of this function largely follows that of
-  // parseJavaScript in parsejavascript.js (there is actually a bit more
-  // shared code than I'd like), but it is quite a bit simpler.
-  function parseXML(source) {
-    var tokens = tokenizeXML(source);
-    var cc = [base];
-    var tokenNr = 0, indented = 0;
-    var currentTag = null, context = null;
-    var consume, marked;
-
-    function push(fs) {
-      for (var i = fs.length - 1; i >= 0; i--)
-        cc.push(fs[i]);
-    }
-    function cont() {
-      push(arguments);
-      consume = true;
-    }
-    function pass() {
-      push(arguments);
-      consume = false;
-    }
-
-    function mark(style) {
-      marked = style;
-    }
-    function expect(text) {
-      return function(style, content) {
-        if (content == text) cont();
-        else mark("xml-error") || cont(arguments.callee);
-      };
-    }
-
-    function pushContext(tagname, startOfLine) {
-      var noIndent = UseKludges.doNotIndent.hasOwnProperty(tagname) || (context && context.noIndent);
-      context = {prev: context, name: tagname, indent: indented, startOfLine: startOfLine, noIndent: noIndent};
-    }
-    function popContext() {
-      context = context.prev;
-    }
-    function computeIndentation(baseContext) {
-      return function(nextChars, current) {
-        var context = baseContext;
-        if (context && context.noIndent)
-          return current;
-        if (alignCDATA && /<!\[CDATA\[/.test(nextChars))
-          return 0;
-        if (context && /^<\//.test(nextChars))
-          context = context.prev;
-        while (context && !context.startOfLine)
-          context = context.prev;
-        if (context)
-          return context.indent + indentUnit;
-        else
-          return 0;
-      };
-    }
-
-    function base() {
-      return pass(element, base);
-    }
-    var harmlessTokens = {"xml-text": true, "xml-entity": true, "xml-comment": true, "xml-processing": true};
-    function element(style, content) {
-      if (content == "<") cont(tagname, attributes, endtag(tokenNr == 1));
-      else if (content == "</") cont(closetagname, expect(">"));
-      else if (style == "xml-cdata") {
-        if (!context || context.name != "!cdata") pushContext("!cdata");
-        if (/\]\]>$/.test(content)) popContext();
-        cont();
-      }
-      else if (harmlessTokens.hasOwnProperty(style)) cont();
-      else mark("xml-error") || cont();
-    }
-    function tagname(style, content) {
-      if (style == "xml-name") {
-        currentTag = content.toLowerCase();
-        mark("xml-tagname");
-        cont();
-      }
-      else {
-        currentTag = null;
-        pass();
-      }
-    }
-    function closetagname(style, content) {
-      if (style == "xml-name" && context && content.toLowerCase() == context.name) {
-        popContext();
-        mark("xml-tagname");
-      }
-      else {
-        mark("xml-error");
-      }
-      cont();
-    }
-    function endtag(startOfLine) {
-      return function(style, content) {
-        if (content == "/>" || (content == ">" && UseKludges.autoSelfClosers.hasOwnProperty(currentTag))) cont();
-        else if (content == ">") pushContext(currentTag, startOfLine) || cont();
-        else mark("xml-error") || cont(arguments.callee);
-      };
-    }
-    function attributes(style) {
-      if (style == "xml-name") mark("xml-attname") || cont(attribute, attributes);
-      else pass();
-    }
-    function attribute(style, content) {
-      if (content == "=") cont(value);
-      else if (content == ">" || content == "/>") pass(endtag);
-      else pass();
-    }
-    function value(style) {
-      if (style == "xml-attribute") cont(value);
-      else pass();
-    }
-
-    return {
-      indentation: function() {return indented;},
-
-      next: function(){
-        var token = tokens.next();
-        if (token.style == "whitespace" && tokenNr == 0)
-          indented = token.value.length;
-        else
-          tokenNr++;
-        if (token.content == "\n") {
-          indented = tokenNr = 0;
-          token.indentation = computeIndentation(context);
-        }
-
-        if (token.style == "whitespace" || token.type == "xml-comment")
-          return token;
-
-        while(true){
-          consume = marked = false;
-          cc.pop()(token.style, token.content);
-          if (consume){
-            if (marked)
-              token.style = marked;
-            return token;
-          }
-        }
-      },
-
-      copy: function(){
-        var _cc = cc.concat([]), _tokenState = tokens.state, _context = context;
-        var parser = this;
-
-        return function(input){
-          cc = _cc.concat([]);
-          tokenNr = indented = 0;
-          context = _context;
-          tokens = tokenizeXML(input, _tokenState);
-          return parser;
-        };
-      }
-    };
-  }
-
-  return {
-    make: parseXML,
-    electricChars: "/",
-    configure: function(config) {
-      if (config.useHTMLKludges != null)
-        UseKludges = config.useHTMLKludges ? Kludges : NoKludges;
-      if (config.alignCDATA)
-        alignCDATA = config.alignCDATA;
-    }
-  };
-})();
diff --git a/platforma/static/js/lib/codemirror/select.js b/platforma/static/js/lib/codemirror/select.js
deleted file mode 100644 (file)
index d513ba5..0000000
+++ /dev/null
@@ -1,619 +0,0 @@
-/* Functionality for finding, storing, and restoring selections
- *
- * This does not provide a generic API, just the minimal functionality
- * required by the CodeMirror system.
- */
-
-// Namespace object.
-var select = {};
-
-(function() {
-  select.ie_selection = document.selection && document.selection.createRangeCollection;
-
-  // Find the 'top-level' (defined as 'a direct child of the node
-  // passed as the top argument') node that the given node is
-  // contained in. Return null if the given node is not inside the top
-  // node.
-  function topLevelNodeAt(node, top) {
-    while (node && node.parentNode != top)
-      node = node.parentNode;
-    return node;
-  }
-
-  // Find the top-level node that contains the node before this one.
-  function topLevelNodeBefore(node, top) {
-    while (!node.previousSibling && node.parentNode != top)
-      node = node.parentNode;
-    return topLevelNodeAt(node.previousSibling, top);
-  }
-
-  var fourSpaces = "\u00a0\u00a0\u00a0\u00a0";
-
-  select.scrollToNode = function(element) {
-    if (!element) return;
-    var doc = element.ownerDocument, body = doc.body,
-        win = (doc.defaultView || doc.parentWindow),
-        html = doc.documentElement,
-        atEnd = !element.nextSibling || !element.nextSibling.nextSibling
-                || !element.nextSibling.nextSibling.nextSibling;
-    // In Opera (and recent Webkit versions), BR elements *always*
-    // have a scrollTop property of zero.
-    var compensateHack = 0;
-    while (element && !element.offsetTop) {
-      compensateHack++;
-      element = element.previousSibling;
-    }
-    // atEnd is another kludge for these browsers -- if the cursor is
-    // at the end of the document, and the node doesn't have an
-    // offset, just scroll to the end.
-    if (compensateHack == 0) atEnd = false;
-
-    var y = compensateHack * (element ? element.offsetHeight : 0), x = 0, pos = element;
-    while (pos && pos.offsetParent) {
-      y += pos.offsetTop;
-      // Don't count X offset for <br> nodes
-      if (pos.nodeName != "BR")
-        x += pos.offsetLeft;
-      pos = pos.offsetParent;
-    }
-
-    var scroll_x = body.scrollLeft || html.scrollLeft || 0,
-        scroll_y = body.scrollTop || html.scrollTop || 0,
-        screen_x = x - scroll_x, screen_y = y - scroll_y, scroll = false;
-
-    if (screen_x < 0 || screen_x > (win.innerWidth || html.clientWidth || 0)) {
-      scroll_x = x;
-      scroll = true;
-    }
-    if (screen_y < 0 || atEnd || screen_y > (win.innerHeight || html.clientHeight || 0) - 50) {
-      scroll_y = atEnd ? 1e10 : y;
-      scroll = true;
-    }
-    if (scroll) win.scrollTo(scroll_x, scroll_y);
-  };
-
-  select.scrollToCursor = function(container) {
-    select.scrollToNode(select.selectionTopNode(container, true) || container.firstChild);
-  };
-
-  // Used to prevent restoring a selection when we do not need to.
-  var currentSelection = null;
-
-  select.snapshotChanged = function() {
-    if (currentSelection) currentSelection.changed = true;
-  };
-
-  // This is called by the code in editor.js whenever it is replacing
-  // a text node. The function sees whether the given oldNode is part
-  // of the current selection, and updates this selection if it is.
-  // Because nodes are often only partially replaced, the length of
-  // the part that gets replaced has to be taken into account -- the
-  // selection might stay in the oldNode if the newNode is smaller
-  // than the selection's offset. The offset argument is needed in
-  // case the selection does move to the new object, and the given
-  // length is not the whole length of the new node (part of it might
-  // have been used to replace another node).
-  select.snapshotReplaceNode = function(from, to, length, offset) {
-    if (!currentSelection) return;
-
-    function replace(point) {
-      if (from == point.node) {
-        currentSelection.changed = true;
-        if (length && point.offset > length) {
-          point.offset -= length;
-        }
-        else {
-          point.node = to;
-          point.offset += (offset || 0);
-        }
-      }
-    }
-    replace(currentSelection.start);
-    replace(currentSelection.end);
-  };
-
-  select.snapshotMove = function(from, to, distance, relative, ifAtStart) {
-    if (!currentSelection) return;
-
-    function move(point) {
-      if (from == point.node && (!ifAtStart || point.offset == 0)) {
-        currentSelection.changed = true;
-        point.node = to;
-        if (relative) point.offset = Math.max(0, point.offset + distance);
-        else point.offset = distance;
-      }
-    }
-    move(currentSelection.start);
-    move(currentSelection.end);
-  };
-
-  // Most functions are defined in two ways, one for the IE selection
-  // model, one for the W3C one.
-  if (select.ie_selection) {
-    function selectionNode(win, start) {
-      var range = win.document.selection.createRange();
-      range.collapse(start);
-
-      function nodeAfter(node) {
-        var found = null;
-        while (!found && node) {
-          found = node.nextSibling;
-          node = node.parentNode;
-        }
-        return nodeAtStartOf(found);
-      }
-
-      function nodeAtStartOf(node) {
-        while (node && node.firstChild) node = node.firstChild;
-        return {node: node, offset: 0};
-      }
-
-      var containing = range.parentElement();
-      if (!isAncestor(win.document.body, containing)) return null;
-      if (!containing.firstChild) return nodeAtStartOf(containing);
-
-      var working = range.duplicate();
-      working.moveToElementText(containing);
-      working.collapse(true);
-      for (var cur = containing.firstChild; cur; cur = cur.nextSibling) {
-        if (cur.nodeType == 3) {
-          var size = cur.nodeValue.length;
-          working.move("character", size);
-        }
-        else {
-          working.moveToElementText(cur);
-          working.collapse(false);
-        }
-
-        var dir = range.compareEndPoints("StartToStart", working);
-        if (dir == 0) return nodeAfter(cur);
-        if (dir == 1) continue;
-        if (cur.nodeType != 3) return nodeAtStartOf(cur);
-
-        working.setEndPoint("StartToEnd", range);
-        return {node: cur, offset: size - working.text.length};
-      }
-      return nodeAfter(containing);
-    }
-
-    select.markSelection = function(win) {
-      currentSelection = null;
-      var sel = win.document.selection;
-      if (!sel) return;
-      var start = selectionNode(win, true),
-          end = selectionNode(win, false);
-      if (!start || !end) return;
-      currentSelection = {start: start, end: end, window: win, changed: false};
-    };
-
-    select.selectMarked = function() {
-      if (!currentSelection || !currentSelection.changed) return;
-      var win = currentSelection.window, doc = win.document;
-
-      function makeRange(point) {
-        var range = doc.body.createTextRange(),
-            node = point.node;
-        if (!node) {
-          range.moveToElementText(currentSelection.window.document.body);
-          range.collapse(false);
-        }
-        else if (node.nodeType == 3) {
-          range.moveToElementText(node.parentNode);
-          var offset = point.offset;
-          while (node.previousSibling) {
-            node = node.previousSibling;
-            offset += (node.innerText || "").length;
-          }
-          range.move("character", offset);
-        }
-        else {
-          range.moveToElementText(node);
-          range.collapse(true);
-        }
-        return range;
-      }
-
-      var start = makeRange(currentSelection.start), end = makeRange(currentSelection.end);
-      start.setEndPoint("StartToEnd", end);
-      start.select();
-    };
-
-    // Get the top-level node that one end of the cursor is inside or
-    // after. Note that this returns false for 'no cursor', and null
-    // for 'start of document'.
-    select.selectionTopNode = function(container, start) {
-      var selection = container.ownerDocument.selection;
-      if (!selection) return false;
-
-      var range = selection.createRange(), range2 = range.duplicate();
-      range.collapse(start);
-      var around = range.parentElement();
-      if (around && isAncestor(container, around)) {
-        // Only use this node if the selection is not at its start.
-        range2.moveToElementText(around);
-        if (range.compareEndPoints("StartToStart", range2) == 1)
-          return topLevelNodeAt(around, container);
-      }
-
-      // Move the start of a range to the start of a node,
-      // compensating for the fact that you can't call
-      // moveToElementText with text nodes.
-      function moveToNodeStart(range, node) {
-        if (node.nodeType == 3) {
-          var count = 0, cur = node.previousSibling;
-          while (cur && cur.nodeType == 3) {
-            count += cur.nodeValue.length;
-            cur = cur.previousSibling;
-          }
-          if (cur) {
-            try{range.moveToElementText(cur);}
-            catch(e){}
-            range.collapse(false);
-          }
-          else range.moveToElementText(node.parentNode);
-          if (count) range.move("character", count);
-        }
-        else range.moveToElementText(node);
-      }
-
-      // Do a binary search through the container object, comparing
-      // the start of each node to the selection
-      var start = 0, end = container.childNodes.length - 1;
-      while (start < end) {
-        var middle = Math.ceil((end + start) / 2), node = container.childNodes[middle];
-        if (!node) return false; // Don't ask. IE6 manages this sometimes.
-        moveToNodeStart(range2, node);
-        if (range.compareEndPoints("StartToStart", range2) == 1)
-          start = middle;
-        else
-          end = middle - 1;
-      }
-      return container.childNodes[start] || null;
-    };
-
-    // Place the cursor after this.start. This is only useful when
-    // manually moving the cursor instead of restoring it to its old
-    // position.
-    select.focusAfterNode = function(node, container) {
-      var range = container.ownerDocument.body.createTextRange();
-      range.moveToElementText(node || container);
-      range.collapse(!node);
-      range.select();
-    };
-
-    select.somethingSelected = function(win) {
-      var sel = win.document.selection;
-      return sel && (sel.createRange().text != "");
-    };
-
-    function insertAtCursor(window, html) {
-      var selection = window.document.selection;
-      if (selection) {
-        var range = selection.createRange();
-        range.pasteHTML(html);
-        range.collapse(false);
-        range.select();
-      }
-    }
-
-    // Used to normalize the effect of the enter key, since browsers
-    // do widely different things when pressing enter in designMode.
-    select.insertNewlineAtCursor = function(window) {
-      insertAtCursor(window, "<br>");
-    };
-
-    select.insertTabAtCursor = function(window) {
-      insertAtCursor(window, fourSpaces);
-    };
-
-    // Get the BR node at the start of the line on which the cursor
-    // currently is, and the offset into the line. Returns null as
-    // node if cursor is on first line.
-    select.cursorPos = function(container, start) {
-      var selection = container.ownerDocument.selection;
-      if (!selection) return null;
-
-      var topNode = select.selectionTopNode(container, start);
-      while (topNode && topNode.nodeName != "BR")
-        topNode = topNode.previousSibling;
-
-      var range = selection.createRange(), range2 = range.duplicate();
-      range.collapse(start);
-      if (topNode) {
-        range2.moveToElementText(topNode);
-        range2.collapse(false);
-      }
-      else {
-        // When nothing is selected, we can get all kinds of funky errors here.
-        try { range2.moveToElementText(container); }
-        catch (e) { return null; }
-        range2.collapse(true);
-      }
-      range.setEndPoint("StartToStart", range2);
-
-      return {node: topNode, offset: range.text.length};
-    };
-
-    select.setCursorPos = function(container, from, to) {
-      function rangeAt(pos) {
-        var range = container.ownerDocument.body.createTextRange();
-        if (!pos.node) {
-          range.moveToElementText(container);
-          range.collapse(true);
-        }
-        else {
-          range.moveToElementText(pos.node);
-          range.collapse(false);
-        }
-        range.move("character", pos.offset);
-        return range;
-      }
-
-      var range = rangeAt(from);
-      if (to && to != from)
-        range.setEndPoint("EndToEnd", rangeAt(to));
-      range.select();
-    }
-
-    // Some hacks for storing and re-storing the selection when the editor loses and regains focus.
-    select.selectionCoords = function (win) {
-      var selection = win.document.selection;
-      if (!selection) return null;
-      var start = selection.createRange(), end = start.duplicate();
-      start.collapse(true);
-      end.collapse(false);
-
-      var body = win.document.body;
-      return {start: {x: start.boundingLeft + body.scrollLeft - 1,
-                      y: start.boundingTop + body.scrollTop},
-              end: {x: end.boundingLeft + body.scrollLeft - 1,
-                    y: end.boundingTop + body.scrollTop}};
-    };
-
-    // Restore a stored selection.
-    select.selectCoords = function(win, coords) {
-      if (!coords) return;
-
-      var range1 = win.document.body.createTextRange(), range2 = range1.duplicate();
-      // This can fail for various hard-to-handle reasons.
-      try {
-        range1.moveToPoint(coords.start.x, coords.start.y);
-        range2.moveToPoint(coords.end.x, coords.end.y);
-        range1.setEndPoint("EndToStart", range2);
-        range1.select();
-      } catch(e) {}
-    };
-  }
-  // W3C model
-  else {
-    // Store start and end nodes, and offsets within these, and refer
-    // back to the selection object from those nodes, so that this
-    // object can be updated when the nodes are replaced before the
-    // selection is restored.
-    select.markSelection = function (win) {
-      var selection = win.getSelection();
-      if (!selection || selection.rangeCount == 0)
-        return (currentSelection = null);
-      var range = selection.getRangeAt(0);
-
-      currentSelection = {
-        start: {node: range.startContainer, offset: range.startOffset},
-        end: {node: range.endContainer, offset: range.endOffset},
-        window: win,
-        changed: false
-      };
-
-      // We want the nodes right at the cursor, not one of their
-      // ancestors with a suitable offset. This goes down the DOM tree
-      // until a 'leaf' is reached (or is it *up* the DOM tree?).
-      function normalize(point){
-        while (point.node.nodeType != 3 && point.node.nodeName != "BR") {
-          var newNode = point.node.childNodes[point.offset] || point.node.nextSibling;
-          point.offset = 0;
-          while (!newNode && point.node.parentNode) {
-            point.node = point.node.parentNode;
-            newNode = point.node.nextSibling;
-          }
-          point.node = newNode;
-          if (!newNode)
-            break;
-        }
-      }
-
-      normalize(currentSelection.start);
-      normalize(currentSelection.end);
-    };
-
-    select.selectMarked = function () {
-      if (!currentSelection || !currentSelection.changed) return;
-      var win = currentSelection.window, range = win.document.createRange();
-
-      function setPoint(point, which) {
-        if (point.node) {
-          // Some magic to generalize the setting of the start and end
-          // of a range.
-          if (point.offset == 0)
-            range["set" + which + "Before"](point.node);
-          else
-            range["set" + which](point.node, point.offset);
-        }
-        else {
-          range.setStartAfter(win.document.body.lastChild || win.document.body);
-        }
-      }
-
-      setPoint(currentSelection.end, "End");
-      setPoint(currentSelection.start, "Start");
-      selectRange(range, win);
-    };
-
-    // Helper for selecting a range object.
-    function selectRange(range, window) {
-      var selection = window.getSelection();
-      selection.removeAllRanges();
-      selection.addRange(range);
-    };
-    function selectionRange(window) {
-      var selection = window.getSelection();
-      if (!selection || selection.rangeCount == 0)
-        return false;
-      else
-        return selection.getRangeAt(0);
-    }
-
-    // Finding the top-level node at the cursor in the W3C is, as you
-    // can see, quite an involved process.
-    select.selectionTopNode = function(container, start) {
-      var range = selectionRange(container.ownerDocument.defaultView);
-      if (!range) return false;
-
-      var node = start ? range.startContainer : range.endContainer;
-      var offset = start ? range.startOffset : range.endOffset;
-      // Work around (yet another) bug in Opera's selection model.
-      if (window.opera && !start && range.endContainer == container && range.endOffset == range.startOffset + 1 &&
-          container.childNodes[range.startOffset] && container.childNodes[range.startOffset].nodeName == "BR")
-        offset--;
-
-      // For text nodes, we look at the node itself if the cursor is
-      // inside, or at the node before it if the cursor is at the
-      // start.
-      if (node.nodeType == 3){
-        if (offset > 0)
-          return topLevelNodeAt(node, container);
-        else
-          return topLevelNodeBefore(node, container);
-      }
-      // Occasionally, browsers will return the HTML node as
-      // selection. If the offset is 0, we take the start of the frame
-      // ('after null'), otherwise, we take the last node.
-      else if (node.nodeName == "HTML") {
-        return (offset == 1 ? null : container.lastChild);
-      }
-      // If the given node is our 'container', we just look up the
-      // correct node by using the offset.
-      else if (node == container) {
-        return (offset == 0) ? null : node.childNodes[offset - 1];
-      }
-      // In any other case, we have a regular node. If the cursor is
-      // at the end of the node, we use the node itself, if it is at
-      // the start, we use the node before it, and in any other
-      // case, we look up the child before the cursor and use that.
-      else {
-        if (offset == node.childNodes.length)
-          return topLevelNodeAt(node, container);
-        else if (offset == 0)
-          return topLevelNodeBefore(node, container);
-        else
-          return topLevelNodeAt(node.childNodes[offset - 1], container);
-      }
-    };
-
-    select.focusAfterNode = function(node, container) {
-      var win = container.ownerDocument.defaultView,
-          range = win.document.createRange();
-      range.setStartBefore(container.firstChild || container);
-      // In Opera, setting the end of a range at the end of a line
-      // (before a BR) will cause the cursor to appear on the next
-      // line, so we set the end inside of the start node when
-      // possible.
-      if (node && !node.firstChild)
-        range.setEndAfter(node);
-      else if (node)
-        range.setEnd(node, node.childNodes.length);
-      else
-        range.setEndBefore(container.firstChild || container);
-      range.collapse(false);
-      selectRange(range, win);
-    };
-
-    select.somethingSelected = function(win) {
-      var range = selectionRange(win);
-      return range && !range.collapsed;
-    };
-
-    function insertNodeAtCursor(window, node) {
-      var range = selectionRange(window);
-      if (!range) return;
-
-      range.deleteContents();
-      range.insertNode(node);
-      webkitLastLineHack(window.document.body);
-      range = window.document.createRange();
-      range.selectNode(node);
-      range.collapse(false);
-      selectRange(range, window);
-    }
-
-    select.insertNewlineAtCursor = function(window) {
-      insertNodeAtCursor(window, window.document.createElement("BR"));
-    };
-
-    select.insertTabAtCursor = function(window) {
-      insertNodeAtCursor(window, window.document.createTextNode(fourSpaces));
-    };
-
-    select.cursorPos = function(container, start) {
-      var range = selectionRange(window);
-      if (!range) return;
-
-      var topNode = select.selectionTopNode(container, start);
-      while (topNode && topNode.nodeName != "BR")
-        topNode = topNode.previousSibling;
-
-      range = range.cloneRange();
-      range.collapse(start);
-      if (topNode)
-        range.setStartAfter(topNode);
-      else
-        range.setStartBefore(container);
-      return {node: topNode, offset: range.toString().length};
-    };
-
-    select.setCursorPos = function(container, from, to) {
-      var win = container.ownerDocument.defaultView,
-          range = win.document.createRange();
-
-      function setPoint(node, offset, side) {
-        if (!node)
-          node = container.firstChild;
-        else
-          node = node.nextSibling;
-
-        if (!node)
-          return;
-
-        if (offset == 0) {
-          range["set" + side + "Before"](node);
-          return true;
-        }
-
-        var backlog = []
-        function decompose(node) {
-          if (node.nodeType == 3)
-            backlog.push(node);
-          else
-            forEach(node.childNodes, decompose);
-        }
-        while (true) {
-          while (node && !backlog.length) {
-            decompose(node);
-            node = node.nextSibling;
-          }
-          var cur = backlog.shift();
-          if (!cur) return false;
-
-          var length = cur.nodeValue.length;
-          if (length >= offset) {
-            range["set" + side](cur, offset);
-            return true;
-          }
-          offset -= length;
-        }
-      }
-
-      to = to || from;
-      if (setPoint(to.node, to.offset, "End") && setPoint(from.node, from.offset, "Start"))
-        selectRange(range, win);
-    };
-  }
-})();
diff --git a/platforma/static/js/lib/codemirror/stringstream.js b/platforma/static/js/lib/codemirror/stringstream.js
deleted file mode 100644 (file)
index 8c1c042..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* String streams are the things fed to parsers (which can feed them
- * to a tokenizer if they want). They provide peek and next methods
- * for looking at the current character (next 'consumes' this
- * character, peek does not), and a get method for retrieving all the
- * text that was consumed since the last time get was called.
- *
- * An easy mistake to make is to let a StopIteration exception finish
- * the token stream while there are still characters pending in the
- * string stream (hitting the end of the buffer while parsing a
- * token). To make it easier to detect such errors, the stringstreams
- * throw an exception when this happens.
- */
-
-// Make a stringstream stream out of an iterator that returns strings.
-// This is applied to the result of traverseDOM (see codemirror.js),
-// and the resulting stream is fed to the parser.
-window.stringStream = function(source){
-  // String that's currently being iterated over.
-  var current = "";
-  // Position in that string.
-  var pos = 0;
-  // Accumulator for strings that have been iterated over but not
-  // get()-ed yet.
-  var accum = "";
-  // Make sure there are more characters ready, or throw
-  // StopIteration.
-  function ensureChars() {
-    while (pos == current.length) {
-      accum += current;
-      current = ""; // In case source.next() throws
-      pos = 0;
-      try {current = source.next();}
-      catch (e) {
-        if (e != StopIteration) throw e;
-        else return false;
-      }
-    }
-    return true;
-  }
-
-  return {
-    // Return the next character in the stream.
-    peek: function() {
-      if (!ensureChars()) return null;
-      return current.charAt(pos);
-    },
-    // Get the next character, throw StopIteration if at end, check
-    // for unused content.
-    next: function() {
-      if (!ensureChars()) {
-        if (accum.length > 0)
-          throw "End of stringstream reached without emptying buffer ('" + accum + "').";
-        else
-          throw StopIteration;
-      }
-      return current.charAt(pos++);
-    },
-    // Return the characters iterated over since the last call to
-    // .get().
-    get: function() {
-      var temp = accum;
-      accum = "";
-      if (pos > 0){
-        temp += current.slice(0, pos);
-        current = current.slice(pos);
-        pos = 0;
-      }
-      return temp;
-    },
-    // Push a string back into the stream.
-    push: function(str) {
-      current = current.slice(0, pos) + str + current.slice(pos);
-    },
-    lookAhead: function(str, consume, skipSpaces, caseInsensitive) {
-      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
-      str = cased(str);
-      var found = false;
-
-      var _accum = accum, _pos = pos;
-      if (skipSpaces) this.nextWhileMatches(/[\s\u00a0]/);
-
-      while (true) {
-        var end = pos + str.length, left = current.length - pos;
-        if (end <= current.length) {
-          found = str == cased(current.slice(pos, end));
-          pos = end;
-          break;
-        }
-        else if (str.slice(0, left) == cased(current.slice(pos))) {
-          accum += current; current = "";
-          try {current = source.next();}
-          catch (e) {break;}
-          pos = 0;
-          str = str.slice(left);
-        }
-        else {
-          break;
-        }
-      }
-
-      if (!(found && consume)) {
-        current = accum.slice(_accum.length) + current;
-        pos = _pos;
-        accum = _accum;
-      }
-
-      return found;
-    },
-
-    // Utils built on top of the above
-    more: function() {
-      return this.peek() !== null;
-    },
-    applies: function(test) {
-      var next = this.peek();
-      return (next !== null && test(next));
-    },
-    nextWhile: function(test) {
-      var next;
-      while ((next = this.peek()) !== null && test(next))
-        this.next();
-    },
-    matches: function(re) {
-      var next = this.peek();
-      return (next !== null && re.test(next));
-    },
-    nextWhileMatches: function(re) {
-      var next;
-      while ((next = this.peek()) !== null && re.test(next))
-        this.next();
-    },
-    equals: function(ch) {
-      return ch === this.peek();
-    },
-    endOfLine: function() {
-      var next = this.peek();
-      return next == null || next == "\n";
-    }
-  };
-};
diff --git a/platforma/static/js/lib/codemirror/tokenize.js b/platforma/static/js/lib/codemirror/tokenize.js
deleted file mode 100644 (file)
index b0c9545..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// A framework for simple tokenizers. Takes care of newlines and
-// white-space, and of getting the text from the source stream into
-// the token object. A state is a function of two arguments -- a
-// string stream and a setState function. The second can be used to
-// change the tokenizer's state, and can be ignored for stateless
-// tokenizers. This function should advance the stream over a token
-// and return a string or object containing information about the next
-// token, or null to pass and have the (new) state be called to finish
-// the token. When a string is given, it is wrapped in a {style, type}
-// object. In the resulting object, the characters consumed are stored
-// under the content property. Any whitespace following them is also
-// automatically consumed, and added to the value property. (Thus,
-// content is the actual meaningful part of the token, while value
-// contains all the text it spans.)
-
-function tokenizer(source, state) {
-  // Newlines are always a separate token.
-  function isWhiteSpace(ch) {
-    // The messy regexp is because IE's regexp matcher is of the
-    // opinion that non-breaking spaces are no whitespace.
-    return ch != "\n" && /^[\s\u00a0]*$/.test(ch);
-  }
-
-  var tokenizer = {
-    state: state,
-
-    take: function(type) {
-      if (typeof(type) == "string")
-        type = {style: type, type: type};
-
-      type.content = (type.content || "") + source.get();
-      if (!/\n$/.test(type.content))
-        source.nextWhile(isWhiteSpace);
-      type.value = type.content + source.get();
-      return type;
-    },
-
-    next: function () {
-      if (!source.more()) throw StopIteration;
-
-      var type;
-      if (source.equals("\n")) {
-        source.next();
-        return this.take("whitespace");
-      }
-
-      if (source.applies(isWhiteSpace))
-        type = "whitespace";
-      else
-        while (!type)
-          type = this.state(source, function(s) {tokenizer.state = s;});
-
-      return this.take(type);
-    }
-  };
-  return tokenizer;
-}
diff --git a/platforma/static/js/lib/codemirror/undo.js b/platforma/static/js/lib/codemirror/undo.js
deleted file mode 100644 (file)
index 5f717a9..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * Storage and control for undo information within a CodeMirror
- * editor. 'Why on earth is such a complicated mess required for
- * that?', I hear you ask. The goal, in implementing this, was to make
- * the complexity of storing and reverting undo information depend
- * only on the size of the edited or restored content, not on the size
- * of the whole document. This makes it necessary to use a kind of
- * 'diff' system, which, when applied to a DOM tree, causes some
- * complexity and hackery.
- *
- * In short, the editor 'touches' BR elements as it parses them, and
- * the History stores these. When nothing is touched in commitDelay
- * milliseconds, the changes are committed: It goes over all touched
- * nodes, throws out the ones that did not change since last commit or
- * are no longer in the document, and assembles the rest into zero or
- * more 'chains' -- arrays of adjacent lines. Links back to these
- * chains are added to the BR nodes, while the chain that previously
- * spanned these nodes is added to the undo history. Undoing a change
- * means taking such a chain off the undo history, restoring its
- * content (text is saved per line) and linking it back into the
- * document.
- */
-
-// A history object needs to know about the DOM container holding the
-// document, the maximum amount of undo levels it should store, the
-// delay (of no input) after which it commits a set of changes, and,
-// unfortunately, the 'parent' window -- a window that is not in
-// designMode, and on which setTimeout works in every browser.
-function History(container, maxDepth, commitDelay, editor, onChange) {
-  this.container = container;
-  this.maxDepth = maxDepth; this.commitDelay = commitDelay;
-  this.editor = editor; this.parent = editor.parent;
-  this.onChange = onChange;
-  // This line object represents the initial, empty editor.
-  var initial = {text: "", from: null, to: null};
-  // As the borders between lines are represented by BR elements, the
-  // start of the first line and the end of the last one are
-  // represented by null. Since you can not store any properties
-  // (links to line objects) in null, these properties are used in
-  // those cases.
-  this.first = initial; this.last = initial;
-  // Similarly, a 'historyTouched' property is added to the BR in
-  // front of lines that have already been touched, and 'firstTouched'
-  // is used for the first line.
-  this.firstTouched = false;
-  // History is the set of committed changes, touched is the set of
-  // nodes touched since the last commit.
-  this.history = []; this.redoHistory = []; this.touched = [];
-}
-
-History.prototype = {
-  // Schedule a commit (if no other touches come in for commitDelay
-  // milliseconds).
-  scheduleCommit: function() {
-    var self = this;
-    this.parent.clearTimeout(this.commitTimeout);
-    this.commitTimeout = this.parent.setTimeout(function(){self.tryCommit();}, this.commitDelay);
-  },
-
-  // Mark a node as touched. Null is a valid argument.
-  touch: function(node) {
-    this.setTouched(node);
-    this.scheduleCommit();
-  },
-
-  // Undo the last change.
-  undo: function() {
-    // Make sure pending changes have been committed.
-    this.commit();
-
-    if (this.history.length) {
-      // Take the top diff from the history, apply it, and store its
-      // shadow in the redo history.
-      var item = this.history.pop();
-      this.redoHistory.push(this.updateTo(item, "applyChain"));
-      if (this.onChange) this.onChange();
-      return this.chainNode(item);
-    }
-  },
-
-  // Redo the last undone change.
-  redo: function() {
-    this.commit();
-    if (this.redoHistory.length) {
-      // The inverse of undo, basically.
-      var item = this.redoHistory.pop();
-      this.addUndoLevel(this.updateTo(item, "applyChain"));
-      if (this.onChange) this.onChange();
-      return this.chainNode(item);
-    }
-  },
-
-  clear: function() {
-    this.history = [];
-    this.redoHistory = [];
-  },
-
-  // Ask for the size of the un/redo histories.
-  historySize: function() {
-    return {undo: this.history.length, redo: this.redoHistory.length};
-  },
-
-  // Push a changeset into the document.
-  push: function(from, to, lines) {
-    var chain = [];
-    for (var i = 0; i < lines.length; i++) {
-      var end = (i == lines.length - 1) ? to : this.container.ownerDocument.createElement("BR");
-      chain.push({from: from, to: end, text: cleanText(lines[i])});
-      from = end;
-    }
-    this.pushChains([chain], from == null && to == null);
-  },
-
-  pushChains: function(chains, doNotHighlight) {
-    this.commit(doNotHighlight);
-    this.addUndoLevel(this.updateTo(chains, "applyChain"));
-    this.redoHistory = [];
-  },
-
-  // Retrieve a DOM node from a chain (for scrolling to it after undo/redo).
-  chainNode: function(chains) {
-    for (var i = 0; i < chains.length; i++) {
-      var start = chains[i][0], node = start && (start.from || start.to);
-      if (node) return node;
-    }
-  },
-
-  // Clear the undo history, make the current document the start
-  // position.
-  reset: function() {
-    this.history = []; this.redoHistory = [];
-  },
-
-  textAfter: function(br) {
-    return this.after(br).text;
-  },
-
-  nodeAfter: function(br) {
-    return this.after(br).to;
-  },
-
-  nodeBefore: function(br) {
-    return this.before(br).from;
-  },
-
-  // Commit unless there are pending dirty nodes.
-  tryCommit: function() {
-    if (!window.History) return; // Stop when frame has been unloaded
-    if (this.editor.highlightDirty()) this.commit(true);
-    else this.scheduleCommit();
-  },
-
-  // Check whether the touched nodes hold any changes, if so, commit
-  // them.
-  commit: function(doNotHighlight) {
-    this.parent.clearTimeout(this.commitTimeout);
-    // Make sure there are no pending dirty nodes.
-    if (!doNotHighlight) this.editor.highlightDirty(true);
-    // Build set of chains.
-    var chains = this.touchedChains(), self = this;
-
-    if (chains.length) {
-      this.addUndoLevel(this.updateTo(chains, "linkChain"));
-      this.redoHistory = [];
-      if (this.onChange) this.onChange();
-    }
-  },
-
-  // [ end of public interface ]
-
-  // Update the document with a given set of chains, return its
-  // shadow. updateFunc should be "applyChain" or "linkChain". In the
-  // second case, the chains are taken to correspond the the current
-  // document, and only the state of the line data is updated. In the
-  // first case, the content of the chains is also pushed iinto the
-  // document.
-  updateTo: function(chains, updateFunc) {
-    var shadows = [], dirty = [];
-    for (var i = 0; i < chains.length; i++) {
-      shadows.push(this.shadowChain(chains[i]));
-      dirty.push(this[updateFunc](chains[i]));
-    }
-    if (updateFunc == "applyChain")
-      this.notifyDirty(dirty);
-    return shadows;
-  },
-
-  // Notify the editor that some nodes have changed.
-  notifyDirty: function(nodes) {
-    forEach(nodes, method(this.editor, "addDirtyNode"))
-    this.editor.scheduleHighlight();
-  },
-
-  // Link a chain into the DOM nodes (or the first/last links for null
-  // nodes).
-  linkChain: function(chain) {
-    for (var i = 0; i < chain.length; i++) {
-      var line = chain[i];
-      if (line.from) line.from.historyAfter = line;
-      else this.first = line;
-      if (line.to) line.to.historyBefore = line;
-      else this.last = line;
-    }
-  },
-
-  // Get the line object after/before a given node.
-  after: function(node) {
-    return node ? node.historyAfter : this.first;
-  },
-  before: function(node) {
-    return node ? node.historyBefore : this.last;
-  },
-
-  // Mark a node as touched if it has not already been marked.
-  setTouched: function(node) {
-    if (node) {
-      if (!node.historyTouched) {
-        this.touched.push(node);
-        node.historyTouched = true;
-      }
-    }
-    else {
-      this.firstTouched = true;
-    }
-  },
-
-  // Store a new set of undo info, throw away info if there is more of
-  // it than allowed.
-  addUndoLevel: function(diffs) {
-    this.history.push(diffs);
-    if (this.history.length > this.maxDepth)
-      this.history.shift();
-  },
-
-  // Build chains from a set of touched nodes.
-  touchedChains: function() {
-    var self = this;
-
-    // The temp system is a crummy hack to speed up determining
-    // whether a (currently touched) node has a line object associated
-    // with it. nullTemp is used to store the object for the first
-    // line, other nodes get it stored in their historyTemp property.
-    var nullTemp = null;
-    function temp(node) {return node ? node.historyTemp : nullTemp;}
-    function setTemp(node, line) {
-      if (node) node.historyTemp = line;
-      else nullTemp = line;
-    }
-
-    function buildLine(node) {
-      var text = [];
-      for (var cur = node ? node.nextSibling : self.container.firstChild;
-           cur && cur.nodeName != "BR"; cur = cur.nextSibling)
-        if (cur.currentText) text.push(cur.currentText);
-      return {from: node, to: cur, text: cleanText(text.join(""))};
-    }
-
-    // Filter out unchanged lines and nodes that are no longer in the
-    // document. Build up line objects for remaining nodes.
-    var lines = [];
-    if (self.firstTouched) self.touched.push(null);
-    forEach(self.touched, function(node) {
-      if (node && node.parentNode != self.container) return;
-
-      if (node) node.historyTouched = false;
-      else self.firstTouched = false;
-
-      var line = buildLine(node), shadow = self.after(node);
-      if (!shadow || shadow.text != line.text || shadow.to != line.to) {
-        lines.push(line);
-        setTemp(node, line);
-      }
-    });
-
-    // Get the BR element after/before the given node.
-    function nextBR(node, dir) {
-      var link = dir + "Sibling", search = node[link];
-      while (search && search.nodeName != "BR")
-        search = search[link];
-      return search;
-    }
-
-    // Assemble line objects into chains by scanning the DOM tree
-    // around them.
-    var chains = []; self.touched = [];
-    forEach(lines, function(line) {
-      // Note that this makes the loop skip line objects that have
-      // been pulled into chains by lines before them.
-      if (!temp(line.from)) return;
-
-      var chain = [], curNode = line.from, safe = true;
-      // Put any line objects (referred to by temp info) before this
-      // one on the front of the array.
-      while (true) {
-        var curLine = temp(curNode);
-        if (!curLine) {
-          if (safe) break;
-          else curLine = buildLine(curNode);
-        }
-        chain.unshift(curLine);
-        setTemp(curNode, null);
-        if (!curNode) break;
-        safe = self.after(curNode);
-        curNode = nextBR(curNode, "previous");
-      }
-      curNode = line.to; safe = self.before(line.from);
-      // Add lines after this one at end of array.
-      while (true) {
-        if (!curNode) break;
-        var curLine = temp(curNode);
-        if (!curLine) {
-          if (safe) break;
-          else curLine = buildLine(curNode);
-        }
-        chain.push(curLine);
-        setTemp(curNode, null);
-        safe = self.before(curNode);
-        curNode = nextBR(curNode, "next");
-      }
-      chains.push(chain);
-    });
-
-    return chains;
-  },
-
-  // Find the 'shadow' of a given chain by following the links in the
-  // DOM nodes at its start and end.
-  shadowChain: function(chain) {
-    var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to;
-    while (true) {
-      shadows.push(next);
-      var nextNode = next.to;
-      if (!nextNode || nextNode == end)
-        break;
-      else
-        next = nextNode.historyAfter || this.before(end);
-      // (The this.before(end) is a hack -- FF sometimes removes
-      // properties from BR nodes, in which case the best we can hope
-      // for is to not break.)
-    }
-    return shadows;
-  },
-
-  // Update the DOM tree to contain the lines specified in a given
-  // chain, link this chain into the DOM nodes.
-  applyChain: function(chain) {
-    // Some attempt is made to prevent the cursor from jumping
-    // randomly when an undo or redo happens. It still behaves a bit
-    // strange sometimes.
-    var cursor = select.cursorPos(this.container, false), self = this;
-
-    // Remove all nodes in the DOM tree between from and to (null for
-    // start/end of container).
-    function removeRange(from, to) {
-      var pos = from ? from.nextSibling : self.container.firstChild;
-      while (pos != to) {
-        var temp = pos.nextSibling;
-        removeElement(pos);
-        pos = temp;
-      }
-    }
-
-    var start = chain[0].from, end = chain[chain.length - 1].to;
-    // Clear the space where this change has to be made.
-    removeRange(start, end);
-
-    // Insert the content specified by the chain into the DOM tree.
-    for (var i = 0; i < chain.length; i++) {
-      var line = chain[i];
-      // The start and end of the space are already correct, but BR
-      // tags inside it have to be put back.
-      if (i > 0)
-        self.container.insertBefore(line.from, end);
-
-      // Add the text.
-      var node = makePartSpan(fixSpaces(line.text), this.container.ownerDocument);
-      self.container.insertBefore(node, end);
-      // See if the cursor was on this line. Put it back, adjusting
-      // for changed line length, if it was.
-      if (cursor && cursor.node == line.from) {
-        var cursordiff = 0;
-        var prev = this.after(line.from);
-        if (prev && i == chain.length - 1) {
-          // Only adjust if the cursor is after the unchanged part of
-          // the line.
-          for (var match = 0; match < cursor.offset &&
-               line.text.charAt(match) == prev.text.charAt(match); match++);
-          if (cursor.offset > match)
-            cursordiff = line.text.length - prev.text.length;
-        }
-        select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)});
-      }
-      // Cursor was in removed line, this is last new line.
-      else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) {
-        select.setCursorPos(this.container, {node: line.from, offset: line.text.length});
-      }
-    }
-
-    // Anchor the chain in the DOM tree.
-    this.linkChain(chain);
-    return start;
-  }
-};
diff --git a/platforma/static/js/lib/codemirror/util.js b/platforma/static/js/lib/codemirror/util.js
deleted file mode 100644 (file)
index 796025e..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* A few useful utility functions. */
-
-var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent);
-var webkit = /AppleWebKit/.test(navigator.userAgent);
-var safari = /Apple Computers, Inc/.test(navigator.vendor);
-
-// Capture a method on an object.
-function method(obj, name) {
-  return function() {obj[name].apply(obj, arguments);};
-}
-
-// The value used to signal the end of a sequence in iterators.
-var StopIteration = {toString: function() {return "StopIteration"}};
-
-// Apply a function to each element in a sequence.
-function forEach(iter, f) {
-  if (iter.next) {
-    try {while (true) f(iter.next());}
-    catch (e) {if (e != StopIteration) throw e;}
-  }
-  else {
-    for (var i = 0; i < iter.length; i++)
-      f(iter[i]);
-  }
-}
-
-// Map a function over a sequence, producing an array of results.
-function map(iter, f) {
-  var accum = [];
-  forEach(iter, function(val) {accum.push(f(val));});
-  return accum;
-}
-
-// Create a predicate function that tests a string againsts a given
-// regular expression. No longer used but might be used by 3rd party
-// parsers.
-function matcher(regexp){
-  return function(value){return regexp.test(value);};
-}
-
-// Test whether a DOM node has a certain CSS class. Much faster than
-// the MochiKit equivalent, for some reason.
-function hasClass(element, className){
-  var classes = element.className;
-  return classes && new RegExp("(^| )" + className + "($| )").test(classes);
-}
-
-// Insert a DOM node after another node.
-function insertAfter(newNode, oldNode) {
-  var parent = oldNode.parentNode;
-  parent.insertBefore(newNode, oldNode.nextSibling);
-  return newNode;
-}
-
-function removeElement(node) {
-  if (node.parentNode)
-    node.parentNode.removeChild(node);
-}
-
-function clearElement(node) {
-  while (node.firstChild)
-    node.removeChild(node.firstChild);
-}
-
-// Check whether a node is contained in another one.
-function isAncestor(node, child) {
-  while (child = child.parentNode) {
-    if (node == child)
-      return true;
-  }
-  return false;
-}
-
-// The non-breaking space character.
-var nbsp = "\u00a0";
-var matching = {"{": "}", "[": "]", "(": ")",
-                "}": "{", "]": "[", ")": "("};
-
-// Standardize a few unportable event properties.
-function normalizeEvent(event) {
-  if (!event.stopPropagation) {
-    event.stopPropagation = function() {this.cancelBubble = true;};
-    event.preventDefault = function() {this.returnValue = false;};
-  }
-  if (!event.stop) {
-    event.stop = function() {
-      this.stopPropagation();
-      this.preventDefault();
-    };
-  }
-
-  if (event.type == "keypress") {
-    event.code = (event.charCode == null) ? event.keyCode : event.charCode;
-    event.character = String.fromCharCode(event.code);
-  }
-  return event;
-}
-
-// Portably register event handlers.
-function addEventHandler(node, type, handler, removeFunc) {
-  function wrapHandler(event) {
-    handler(normalizeEvent(event || window.event));
-  }
-  if (typeof node.addEventListener == "function") {
-    node.addEventListener(type, wrapHandler, false);
-    if (removeFunc) return function() {node.removeEventListener(type, wrapHandler, false);};
-  }
-  else {
-    node.attachEvent("on" + type, wrapHandler);
-    if (removeFunc) return function() {node.detachEvent("on" + type, wrapHandler);};
-  }
-}
-
-function nodeText(node) {
-  return node.textContent || node.innerText || node.nodeValue || "";
-}
-
-function nodeTop(node) {
-  var top = 0;
-  while (node.offsetParent) {
-    top += node.offsetTop;
-    node = node.offsetParent;
-  }
-  return top;
-}
diff --git a/platforma/static/js/slugify.js b/platforma/static/js/slugify.js
deleted file mode 100644 (file)
index 9e17ba7..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-(function() {
-    var ALL_DOWNCODE_MAPS = new Array()
-
-    ALL_DOWNCODE_MAPS[0] = {
-        // LATIN_MAP
-        'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç':
-        'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I',
-        'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö':
-        'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U',
-        'Ý': 'Y', 'Þ': 'TH', 'ß': 'ss', 'à':'a', 'á':'a', 'â': 'a', 'ã': 'a', 'ä':
-        'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e',
-        'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó':
-        'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u',
-        'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y'
-    }
-    ALL_DOWNCODE_MAPS[1] = {
-        // LATIN_SYMBOLS_MAP
-        '©':'(c)'
-    }
-    ALL_DOWNCODE_MAPS[2] = {
-        // GREEK_MAP
-        'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h', 'θ':'8',
-        'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'3', 'ο':'o', 'π':'p',
-        'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w',
-        'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w', 'ς':'s',
-        'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i',
-        'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H', 'Θ':'8',
-        'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'3', 'Ο':'O', 'Π':'P',
-        'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'PS', 'Ω':'W',
-        'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W', 'Ϊ':'I',
-        'Ϋ':'Y'
-    }
-    ALL_DOWNCODE_MAPS[3] = {
-        // TURKISH_MAP
-        'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
-        'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
-    }
-    ALL_DOWNCODE_MAPS[4] = {
-        // RUSSIAN_MAP
-        'а':'a', 'б':'b', 'в':'v', 'г':'g', 'д':'d', 'е':'e', 'ё':'yo', 'ж':'zh',
-        'з':'z', 'и':'i', 'й':'j', 'к':'k', 'л':'l', 'м':'m', 'н':'n', 'о':'o',
-        'п':'p', 'р':'r', 'с':'s', 'т':'t', 'у':'u', 'ф':'f', 'х':'h', 'ц':'c',
-        'ч':'ch', 'ш':'sh', 'щ':'sh', 'ъ':'', 'ы':'y', 'ь':'', 'э':'e', 'ю':'yu',
-        'я':'ya',
-        'А':'A', 'Б':'B', 'В':'V', 'Г':'G', 'Д':'D', 'Е':'E', 'Ё':'Yo', 'Ж':'Zh',
-        'З':'Z', 'И':'I', 'Й':'J', 'К':'K', 'Л':'L', 'М':'M', 'Н':'N', 'О':'O',
-        'П':'P', 'Р':'R', 'С':'S', 'Т':'T', 'У':'U', 'Ф':'F', 'Х':'H', 'Ц':'C',
-        'Ч':'Ch', 'Ш':'Sh', 'Щ':'Sh', 'Ъ':'', 'Ы':'Y', 'Ь':'', 'Э':'E', 'Ю':'Yu',
-        'Я':'Ya'
-    }
-    ALL_DOWNCODE_MAPS[5] = {
-        // UKRAINIAN_MAP
-        'Є':'Ye', 'І':'I', 'Ї':'Yi', 'Ґ':'G', 'є':'ye', 'і':'i', 'ї':'yi', 'ґ':'g'
-    }
-    ALL_DOWNCODE_MAPS[6] = {
-        // CZECH_MAP
-        'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
-        'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
-        'Ů':'U', 'Ž':'Z'
-    }
-
-    ALL_DOWNCODE_MAPS[7] = {
-        // POLISH_MAP
-        'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
-        'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'e', 'Ł':'L', 'Ń':'N', 'Ó':'o', 'Ś':'S',
-        'Ź':'Z', 'Ż':'Z'
-    }
-
-    ALL_DOWNCODE_MAPS[8] = {
-        // LATVIAN_MAP
-        'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
-        'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
-        'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
-    }
-
-    var Downcoder = new Object();
-
-    Downcoder.Initialize = function() {
-        if (Downcoder.map) // already made
-            return ;
-        Downcoder.map ={}
-        Downcoder.chars = '';
-        for(var i in ALL_DOWNCODE_MAPS) {
-            var lookup = ALL_DOWNCODE_MAPS[i]
-            for (var c in lookup) {
-                Downcoder.map[c] = lookup[c];
-                Downcoder.chars += c;
-            }
-         }
-        Downcoder.regex = new RegExp('[' + Downcoder.chars + ']|[^' + Downcoder.chars + ']+','g');
-    }
-
-    downcode = function(slug) {
-        Downcoder.Initialize();
-        var downcoded =""
-        var pieces = slug.match(Downcoder.regex);
-        if(pieces) {
-            for (var i = 0 ; i < pieces.length ; i++) {
-                if (pieces[i].length == 1) {
-                    var mapped = Downcoder.map[pieces[i]];
-                    if (mapped != null) {
-                        downcoded+=mapped;
-                        continue;
-                    }
-                }
-                downcoded+=pieces[i];
-            }
-        } else {
-            downcoded = slug;
-        }
-        return downcoded;
-    }
-
-    slugify = function(s) {
-        s = downcode(s);
-        // if downcode doesn't hit, the char will be stripped here
-        s = s.replace(/[^-\w\s]/g, '');  // remove unneeded chars
-        s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
-        s = s.replace(/[-\s]+/g, '-');   // convert spaces to hyphens
-        s = s.toLowerCase();             // convert to lowercase
-
-        return s;
-    }
-})();
-
-
diff --git a/platforma/static/js/wiki/base.js b/platforma/static/js/wiki/base.js
deleted file mode 100644 (file)
index 523ad96..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-(function($)
-{
-       var noop = function() { };
-
-       $.wiki = {
-               perspectives: {},
-               cls: {},
-               state: {
-                       "version": 1,
-                       "perspectives": {
-                               "ScanGalleryPerspective": {
-                                       "show": true,
-                                       "page": 1
-                               },
-                               "CodeMirrorPerspective": {}
-                               /*
-                               "VisualPerspective": {},
-                               "HistoryPerspective": {},
-                               "SummaryPerspective": {}
-                               */
-                       }
-               }
-       };
-
-       $.wiki.loadConfig = function() {
-               if(!window.localStorage)
-                       return;
-
-               try {
-                       var value = window.localStorage.getItem(CurrentDocument.id) || "{}";
-                       var config = JSON.parse(value);
-
-                       if (config.version == $.wiki.state.version) {
-                               $.wiki.state.perspectives = $.extend($.wiki.state.perspectives, config.perspectives);
-                       }
-               } catch(e) {
-                       console.log("Failed to load config, using default.");
-               }
-
-               console.log("Loaded:", $.wiki.state, $.wiki.state.version);
-       };
-
-       $(window).bind('unload', function() {
-               if(window.localStorage)
-                       window.localStorage.setItem(CurrentDocument.id, JSON.stringify($.wiki.state));
-       })
-
-
-       $.wiki.activePerspective = function() {
-               return this.perspectives[$("#tabs li.active").attr('id')];
-       };
-
-       $.wiki.exitContext = function() {
-               var ap = this.activePerspective();
-               if(ap) ap.onExit();
-               return ap;
-       };
-
-       $.wiki.enterContext = function(ap) {
-               if(ap) ap.onEnter();
-       };
-
-       $.wiki.isDirty = function() {
-               var ap = this.activePerspective();
-               return (!!CurrentDocument && CurrentDocument.has_local_changes) || ap.dirty();
-       };
-
-       $.wiki.newTab = function(doc, title, klass) {
-               var base_id = 'id' + Math.floor(Math.random()* 5000000000);
-               var id = (''+klass)+'_' + base_id;
-               var $tab = $('<li id="'+id+'" data-ui-related="'+base_id+'" data-ui-jsclass="'+klass+'" >'
-                               + title + '<img src="/static/icons/close.png" class="tabclose"></li>');
-               var $view = $('<div class="editor '+klass+'" id="'+base_id+'"> </div>');
-
-               this.perspectives[id] = new $.wiki[klass]({
-                       doc: doc,
-                       id: id,
-                       base_id: base_id,
-               });
-
-               $('#tabs').append($tab);
-               $view.hide().appendTo('#editor');
-               return {
-                       tab: $tab[0],
-                       view: $view[0],
-               };
-       };
-
-       $.wiki.initTab = function(options) {
-               var klass = $(options.tab).attr('data-ui-jsclass');
-
-               return new $.wiki[klass]({
-                       doc: options.doc,
-                       id: $(options.tab).attr('id'),
-                       callback: function() {
-                               $.wiki.perspectives[this.perspective_id] = this;
-                               if(options.callback)
-                                       options.callback.call(this);
-                       }
-               });
-       };
-
-       $.wiki.perspectiveForTab = function(tab) { // element or id
-               return this.perspectives[ $(tab).attr('id')];
-       }
-
-       $.wiki.switchToTab = function(tab){
-               var self = this;
-               var $tab = $(tab);
-
-               if($tab.length != 1)
-                       $tab = $(DEFAULT_PERSPECTIVE);
-
-               var $old = $('#tabs li').filter('.active');
-
-               $old.each(function(){
-                       $(this).removeClass('active');
-                       self.perspectives[$(this).attr('id')].onExit();
-                       $('#' + $(this).attr('data-ui-related')).hide();
-               });
-
-               /* show new */
-               $tab.addClass('active');
-               $('#' + $tab.attr('data-ui-related')).show();
-
-               console.log($tab);
-               console.log($.wiki.perspectives);
-
-               $.wiki.perspectives[$tab.attr('id')].onEnter();
-       };
-
-       /*
-        * Basic perspective.
-        */
-       $.wiki.Perspective = function(options) {
-               if(!options) return;
-
-               this.doc = options.doc;
-               if (options.id) {
-                       this.perspective_id = options.id;
-               }
-               else {
-                       this.perspective_id = '';
-               }
-
-               if(options.callback)
-                       options.callback.call(this);
-       };
-
-       $.wiki.Perspective.prototype.config = function() {
-               return $.wiki.state.perspectives[this.perspective_id];
-       }
-
-       $.wiki.Perspective.prototype.toString = function() {
-               return this.perspective_id;
-       };
-
-       $.wiki.Perspective.prototype.dirty = function() {
-               return true;
-       };
-
-       $.wiki.Perspective.prototype.onEnter = function () {
-               // called when perspective in initialized
-               if (!this.noupdate_hash_onenter) {
-                       document.location.hash = '#' + this.perspective_id;
-               }
-       };
-
-       $.wiki.Perspective.prototype.onExit = function () {
-               // called when user switches to another perspective
-               if (!this.noupdate_hash_onenter) {
-                       document.location.hash = '';
-               }
-       };
-
-       $.wiki.Perspective.prototype.destroy = function() {
-               // pass
-       };
-
-       $.wiki.Perspective.prototype.freezeState = function () {
-               // free UI state (don't store data here)
-       };
-
-       $.wiki.Perspective.prototype.unfreezeState = function (frozenState) {
-               // restore UI state
-       };
-
-       /*
-        * Stub rendering (used in generating history)
-        */
-       $.wiki.renderStub = function(params)
-       {
-               params = $.extend({ 'filters': {} }, params);
-               var $elem = params.stub.clone();
-               $elem.removeClass('row-stub');
-               params.container.append($elem);
-
-               $('*[data-stub-value]', $elem).each(function() {
-                       var $this = $(this);
-                       var field = $this.attr('data-stub-value');
-
-                       var value = params.data[field];
-
-                       if(params.filters[field])
-                               value = params.filters[field](value);
-
-                       if(value === null || value === undefined) return;
-
-                       if(!$this.attr('data-stub-target')) {
-                               $this.text(value);
-                       }
-                       else {
-                               $this.attr($this.attr('data-stub-target'), value);
-                               $this.removeAttr('data-stub-target');
-                               $this.removeAttr('data-stub-value');
-                       }
-               });
-
-               $elem.show();
-               return $elem;
-       };
-
-       /*
-        * Dialogs
-        */
-       function GenericDialog(element) {
-               if(!element) return;
-
-               var self = this;
-
-               self.$elem = $(element);
-
-               if(!self.$elem.attr('data-ui-initialized')) {
-                       console.log("Initializing dialog", this);
-                       self.initialize();
-                       self.$elem.attr('data-ui-initialized', true);
-               }
-
-               self.show();
-       };
-
-       GenericDialog.prototype = {
-
-               /*
-               * Steps to follow when the dialog in first loaded on page.
-               */
-               initialize: function(){
-                       var self = this;
-
-                       /* bind buttons */
-                       $('button[data-ui-action]', self.$elem).click(function(event) {
-                               event.preventDefault();
-
-                               var action = $(this).attr('data-ui-action');
-                               console.log("Button pressed, action: ", action);
-
-                               try {
-                                       self[action + "Action"].call(self);
-                               } catch(e) {
-                                       console.log("Action failed:", e);
-                                       // always hide on cancel
-                                       if(action == 'cancel')
-                                               self.hide();
-                               }
-                       });
-               },
-
-               /*
-                * Prepare dialog for user. Clear any unnessary data.
-               */
-               show: function() {
-                       $.blockUI({
-                               message: this.$elem,
-                               css: {
-                                       'top': '25%',
-                                       'left': '25%',
-                                       'width': '50%'
-                               }
-                       });
-               },
-
-               hide: function(){
-                       $.unblockUI();
-               },
-
-               cancelAction: function() {
-                       this.hide();
-               },
-
-               doneAction: function() {
-                       this.hide();
-               },
-
-               clearForm: function() {
-                       $("*[data-ui-error-for]", this.$elem).text('');
-               },
-
-               reportErrors: function(errors) {
-                       var global = $("*[data-ui-error-for='__all__']", this.$elem);
-                       var unassigned = [];
-
-                       for (var field_name in errors)
-                       {
-                               var span = $("*[data-ui-error-for='"+field_name+"']", this.$elem);
-
-                               if(!span.length) {
-                                       unassigned.push(field_name);
-                                       continue;
-                               }
-
-                               span.text(errors[field_name].join(' '));
-                       }
-
-                       if(unassigned.length > 0)
-                               global.text( global.text() + 'W formularzu wystąpiły błędy');
-               }
-       };
-
-       $.wiki.cls.GenericDialog = GenericDialog;
-
-       $.wiki.showDialog = function(selector, options) {
-               var elem = $(selector);
-
-               if(elem.length != 1) {
-                       console.log("Failed to show dialog:", selector, elem);
-                       return false;
-               }
-
-               try {
-                   var klass = elem.attr('data-ui-jsclass');
-                       return new $.wiki.cls[klass](elem, options);
-               } catch(e) {
-                       console.log("Failed to show dialog", selector, klass, e);
-                       return false;
-               }
-       };
-
-})(jQuery);
diff --git a/platforma/static/js/wiki/dialog_addtag.js b/platforma/static/js/wiki/dialog_addtag.js
deleted file mode 100644 (file)
index 1a90ccf..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Dialog for saving document to the server
- *
- */
-(function($){
-
-    function AddTagDialog(element, options){
-        if (!options.revision  && options.revision != 0)
-            throw "AddTagDialog needs a revision number.";
-
-        this.ctx = $.wiki.exitContext();
-        this.clearForm();
-
-        /* fill out hidden fields */
-        this.$form = $('form', element);
-
-        $("input[name='addtag-id']", this.$form).val(CurrentDocument.id);
-        $("input[name='addtag-revision']", this.$form).val(options.revision);
-
-        $.wiki.cls.GenericDialog.call(this, element);
-    };
-
-    AddTagDialog.prototype = $.extend(new $.wiki.cls.GenericDialog(), {
-        cancelAction: function(){
-            $.wiki.enterContext(this.ctx);
-            this.hide();
-        },
-
-        saveAction: function(){
-            var self = this;
-
-            self.$elem.block({
-                message: "Dodawanie tagu",
-                fadeIn: 0,
-            });
-
-            CurrentDocument.setTag({
-                form: self.$form,
-                success: function(doc, changed, info){
-                    self.$elem.block({
-                        message: info,
-                        timeout: 2000,
-                        fadeOut: 0,
-                        onUnblock: function(){
-                            self.hide();
-                            $.wiki.enterContext(self.ctx);
-                        }
-                    });
-                },
-                failure: function(doc, info){
-                    console.log("Failure", info);
-                    self.reportErrors(info);
-                    self.$elem.unblock();
-                }
-            });
-        }
-    });
-
-    /* make it global */
-    $.wiki.cls.AddTagDialog = AddTagDialog;
-})(jQuery);
diff --git a/platforma/static/js/wiki/dialog_save.js b/platforma/static/js/wiki/dialog_save.js
deleted file mode 100644 (file)
index 916f326..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Dialog for saving document to the server
- *
- */
-(function($) {
-
-       function SaveDialog(element) {
-               this.ctx = $.wiki.exitContext();
-               this.clearForm();
-
-               /* fill out hidden fields */
-               this.$form = $('form', element);
-
-               $("input[name='textsave-id']", this.$form).val(CurrentDocument.id);
-               $("input[name='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
-
-               $.wiki.cls.GenericDialog.call(this, element);
-       };
-
-       SaveDialog.prototype = new $.wiki.cls.GenericDialog();
-
-       SaveDialog.prototype.cancelAction = function() {
-               $.wiki.enterContext(this.ctx);
-               this.hide();
-       };
-
-       SaveDialog.prototype.saveAction = function() {
-                       var self = this;
-
-                       self.$elem.block({
-                               message: "Zapisywanie...",
-                               fadeIn: 0,
-                       });
-
-                       try {
-
-                               CurrentDocument.save({
-                                       form: self.$form,
-                                       success: function(doc, changed, info){
-                                               self.$elem.block({
-                                                       message: info,
-                                                       timeout: 2000,
-                                                       fadeOut: 0,
-                                                       onUnblock: function() {
-                                                               self.hide();
-                                                               $.wiki.enterContext(self.ctx);
-                                                       }
-                                               });
-                                       },
-                                       failure: function(doc, info) {
-                                               console.log("Failure", info);
-                                               self.reportErrors(info);
-                                               self.$elem.unblock();
-                                       }
-                               });
-                       } catch(e) {
-                               console.log('Exception:', e)
-                               self.$elem.unblock();
-                       }
-       }; /* end of save dialog */
-
-       /* make it global */
-       $.wiki.cls.SaveDialog = SaveDialog;
-})(jQuery);
diff --git a/platforma/static/js/wiki/loader.js b/platforma/static/js/wiki/loader.js
deleted file mode 100644 (file)
index a441402..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-if (!window.console) {
-    window.console = {
-        log: function(){
-        }
-    }
-}
-
-var DEFAULT_PERSPECTIVE = "#SummaryPerspective";
-
-THEMES = [
-       'Alkohol', 'Ambicja', 'Anioł', 'Antysemityzm', 'Arkadia', 'Artysta', 'Bezdomność', 'Bezpieczeństwo', 'Bieda', 'Bijatyka', 'Błazen', 'Błądzenie', 'Błoto', 'Bogactwo', 'Bóg', 'Brat', 'Bunt', 'Buntownik', 'Burza', 'Car', 'Carpe diem', 'Ciemność', 'Cień', 'Cisza', 'Chciwość', 'Chleb', 'Chłop', 'Choroba', 'Chrystus', 'Chrzest', 'Ciało', 'Cierpienie', 'Cmentarz', 'Cnota', 'Córka', 'Cud', 'Czarownika', 'Czary', 'Czas', 'Czyn', 'Czyściec', 'Dama', 'Danse macabre', 'Deszcz', 'Diabeł', 'Dobro', 'Dom', 'Dorosłość', 'Drzewo', 'Duch', 'Dusza', 'Duma', 'Dworek', 'Dworzanin', 'Dwór', 'Dzieciństwo', 'Dziecko', 'Dziedzictwo', 'Dziewictwo', 'Dźwięk', 'Egzorcyzm', 'Elita', 'Emigrant', 'Fałsz', 'Filozof', 'Fircyk', 'Flirt', 'Głupiec', 'Głupota', 'Głód', 'Gospodarz', 'Gospodyni', 'Gość', 'Gotycyzm', 'Góra', 'Gra', 'Grób', 'Grzech', 'Grzeczność', 'Gwiazda', 'Handel', 'Hańba', 'Historia', 'Honor', 'Idealista', 'Imię', 'Interes', 'Jabłka', 'Jedzenie', 'Jesień', 'Kaleka', 'Kara', 'Karczma', 'Klęska', 'Kłamstwo', 'Kłótnia', 'Kobieta', 'Kobieta demoniczna', 'Kobieta "upadła"', 'Kochanek', 'Kochanek romantyczny', 'Kolonializm', 'Kondycja ludzka', 'Konflikt', 'Konflikt wewnętrzny', 'Koniec świata', 'Koń', 'Korzyść', 'Kot', 'Kradzież', 'Krew', 'Król', 'Krzywda', 'Ksiądz', 'Książka', 'Księżyc', 'Kuchnia', 'Kuszenie', 'Kwiaty', 'Labirynt', 'Las', 'Lato', 'Lekarz', 'Lenistwo', 'List', 'Liberat', 'Los', 'Lud', 'Lustro', 'Łzy', 'Małżeństwo', 'Marzenie', 'Maska', 'Maszyna', 'Matka', 'Matka Boska', 'Mądrość', 'Mąż', 'Melancholia', 'Mędrzec', 'Mężczyzna', 'Miasto', 'Mieszczanin', 'Miłosierdzie', 'Miłość', 'Miłość niespełniona', 'Miłość platoniczna', 'Miłość romantyczna', 'Miłość silniejsza niż śmierć', 'Miłość spełniona', 'Miłość tragiczna', 'Mizoginia', 'Młodość', 'Moda', 'Modlitwa', 'Morderstwo', 'Morze', 'Motyl', 'Mucha', 'Muzyka', 'Narodziny', 'Naród', 'Natura', 'Nauczyciel', 'Nauczycielka', 'Nauka', 'Niebezpieczeństwo', 'Niedziela', 'Niemiec', 'Nienawiść', 'Nieśmiertelność', 'Niewola', 'Noc', 'Nuda', 'Obcy', 'Obłok', 'Obowiązek', 'Obraz świata', 'Obrzędy', 'Obyczaje', 'Obywatel', 'Odrodzenie przez grób', 'Odwaga', 'Ofiara', 'Ogień', 'Ogród', 'Ojciec', 'Ojczyzna', 'Oko', 'Okręt', 'Okrucieństwo', 'Omen', 'Opieka', 'Organizm', 'Otchłań', 'Pająk', 'Pamięć', 'Pan', 'Panna młoda', 'Państwo', 'Patriota', 'Piekło', 'Pielgrzym', 'Pieniądz', 'Pies', 'Piętno', 'Pijaństwo', 'Piwnica', 'Plotka', 'Pobożność', 'Pocałunek', 'Pochlebstwo', 'Poeta', 'Poetka', 'Poezja', 'Podróż', 'Podstęp', 'Pogrzeb', 'Pojedynek', 'Pokora', 'Pokusa', 'Polak', 'Polityka', 'Polowanie', 'Polska', 'Portret', 'Porwanie', 'Poświęcenie', 'Potwór', 'Powstanie', 'Powstaniec', 'Pozory', 'Pozycja społeczna', 'Pożar', 'Pożądanie', 'Praca', 'Praca u podstaw', 'Praca organiczna', 'Prawda', 'Prawnik', 'Prometeusz', 'Proroctwo', 'Prorok', 'Próżność', 'Przebranie', 'Przeczucie', 'Przedmurze chrześcijaństwa', 'Przekleństwo', 'Przekupstwo', 'Przemiana', 'Przemijanie', 'Przemoc', 'Przestrzeń', 'Przyjaźń', 'Przyroda nieożywiona', 'Przysięga', 'Przywódca', 'Ptak', 'Pustynia', 'Pycha', 'Raj', 'Realista', 'Religia', 'Rewolucja', 'Robak', 'Robotnik', 'Rodzina', 'Rosja', 'Rosjanin', 'Rośliny', 'Rozczarowanie', 'Rozpacz', 'Rozstanie', 'Rozum', 'Ruiny', 'Rycerz', 'Rzeka', 'Salon', 'Samobójstwo', 'Samolubstwo', 'Samotnik', 'Samotność', 'Sarmata', 'Sąsiad', 'Sąd', 'Sąd Ostateczny', 'Sen', 'Serce', 'Sędzia', 'Sielanka', 'Sierota', 'Siła', 'Siostra', 'Sława', 'Słońce', 'Słowo', 'Sługa', 'Służalczość', 'Skąpiec', 'Sobowtór', 'Społecznik', 'Spowiedź', 'Sprawiedliwość', 'Starość', 'Strach', 'Strój', 'Stworzenie', 'Sumienie', 'Swaty', 'Syberia', 'Syn', 'Syn marnotrawny', 'Syzyf', 'Szaleniec', 'Szaleństwo', 'Szantaż', 'Szatan', 'Szczęście', 'Szkoła', 'Szlachcic', 'Szpieg', 'Sztuka', 'Ślub', 'Śmiech', 'Śmierć', 'Śmierć bohaterska', 'Śpiew', 'Światło', 'Świętoszek', 'Święty', 'Świt', 'Tajemnica', 'Taniec', 'Tchórzostwo', 'Teatr', 'Testament', 'Tęsknota', 'Theatrum mundi', 'Tłum', 'Trucizna', 'Trup', 'Twórczość', 'Uczeń', 'Uczta', 'Uroda', 'Umiarkowanie', 'Upadek', 'Upiór', 'Urzędnik', 'Vanitas', 'Walka', 'Walka klas', 'Wampir', 'Warszawa', 'Wąż', 'Wdowa', 'Wdowiec', 'Wesele', 'Wiatr', 'Wierność', 'Wierzenia', 'Wieś', 'Wiedza', 'Wieża Babel', 'Więzienie', 'Więzień', 'Wina', 'Wino', 'Wiosna', 'Wizja', 'Władza', 'Własność', 'Woda', 'Wojna', 'Wojna pokoleń', 'Wolność', 'Wróg', 'Wspomnienia', 'Współpraca', 'Wygnanie', 'Wyrzuty sumienia', 'Wyspa', 'Wzrok', 'Zabawa', 'Zabobony', 'Zamek', 'Zaręczyny', 'Zaświaty', 'Zazdrość', 'Zbawienie', 'Zbrodnia', 'Zbrodniarz', 'Zdrada', 'Zdrowie', 'Zemsta', 'Zesłaniec', 'Ziarno', 'Ziemia', 'Zima', 'Zło', 'Złodziej', 'Złoty wiek', 'Zmartwychwstanie', 'Zwątpienie', 'Zwierzęta', 'Zwycięstwo', 'Żałoba', 'Żebrak', 'Żołnierz', 'Żona', 'Życie jako wędrówka', 'Życie snem', 'Żyd', 'Żywioły', 'Oświadczyny'
-];
-
-$(function()
-{
-       var tabs = $('ol#tabs li');
-       var gallery = null;
-       CurrentDocument = new $.wikiapi.WikiDocument("document-meta");
-
-       $.blockUI.defaults.baseZ = 10000;
-
-    function initialize()
-       {
-               gallery = new $.wiki.ScanGalleryPerspective({
-                       doc: CurrentDocument, id: "ScanGalleryPerspective"
-               });
-
-               $(document).keydown(function(event) {
-                       console.log("Received key:", event);
-               });
-
-               /* The save button */
-        $('#save-button').click(function(event){
-            event.preventDefault();
-                       $.wiki.showDialog('#save_dialog');
-        });
-
-               $('.editor').hide();
-
-               /*
-                * TABS
-                */
-        $('#tabs li').live('click', function(event, callback) {
-                       $.wiki.switchToTab(this);
-        });
-
-               $('#tabs li > .tabclose').live('click', function(event, callback) {
-                       var $tab = $(this).parent();
-
-                       if($tab.is('.active'))
-                               $.wiki.switchToTab(DEFAULT_PERSPECTIVE);
-
-                       var p = $.wiki.perspectiveForTab($tab);
-                       p.destroy();
-
-                       return false;
-        });
-
-
-        $(window).resize(function(){
-            $('iframe').height($(window).height() - $('#tabs').outerHeight() - $('#source-editor .toolbar').outerHeight());
-        });
-
-        $(window).resize();
-
-        $('.vsplitbar').toggle(
-                       function() {
-                               $.wiki.state.perspectives.ScanGalleryPerspective.show = true;
-                               $('#side-gallery').show();
-                               $('.vsplitbar').css('right', 480).addClass('.active');
-                               $('#editor .editor').css('right', 510);
-                               $(window).resize();
-                               gallery.onEnter();
-                       },
-                       function() {
-                               $.wiki.state.perspectives.ScanGalleryPerspective.show = false;
-                               $('#side-gallery').hide();
-                               $('.vsplitbar').css('right', 0).removeClass('active');
-                               $('#editor .editor').css('right', 30);
-                               $(window).resize();
-                               gallery.onExit();
-                       }
-               );
-
-               if($.wiki.state.perspectives.ScanGalleryPerspective.show)
-                       $('.vsplitbar').trigger('click');
-
-        window.onbeforeunload = function(e) {
-            if($.wiki.isDirty()) {
-                               e.returnValue = "Na stronie mogą być nie zapisane zmiany.";
-                               return "Na stronie mogą być nie zapisane zmiany.";
-                       };
-        };
-
-               console.log("Fetching document's text");
-
-               $(document).bind('wlapi_document_changed', function(event, doc) {
-                       try {
-                               $('#document-revision').text(doc.revision);
-                       } catch(e) {
-                               console.log("Failed handler", e);
-                       }
-               });
-
-               CurrentDocument.fetch({
-                       success: function(){
-                               console.log("Fetch success");
-                               $('#loading-overlay').fadeOut();
-                               var active_tab = document.location.hash || DEFAULT_PERSPECTIVE;
-
-                               if(active_tab == "#ScanGalleryPerspective")
-                                       active_tab = DEFAULT_PERSPECTIVE;
-
-                               console.log("Initial tab is:", active_tab)
-                               $.wiki.switchToTab(active_tab);
-                       },
-                       failure: function() {
-                               $('#loading-overlay').fadeOut();
-                               alert("FAILURE");
-                       }
-               });
-    }; /* end of initialize() */
-
-
-       /* Load configuration */
-       $.wiki.loadConfig();
-
-       var initAll = function(a, f) {
-               if (a.length == 0) return f();
-
-               $.wiki.initTab({
-                       tab: a.pop(),
-                       doc: CurrentDocument,
-                       callback: function(){
-                               initAll(a, f);
-                       }
-               });
-       };
-
-
-       /*
-        * Initialize all perspectives
-        */
-       initAll( $.makeArray($('ol#tabs li')), initialize);
-       console.log(location.hash);
-});
diff --git a/platforma/static/js/wiki/loader_readonly.js b/platforma/static/js/wiki/loader_readonly.js
deleted file mode 100644 (file)
index c22e9d7..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-if (!window.console) {
-    window.console = {
-        log: function(){
-        }
-    }
-}
-
-
-DEFAULT_PERSPECTIVE = "#VisualPerspective";
-
-$(function()
-{
-       var tabs = $('ol#tabs li');
-       var gallery = null;
-
-       CurrentDocument = new $.wikiapi.WikiDocument("document-meta");
-       $.blockUI.defaults.baseZ = 10000;
-
-       function initialize()
-       {
-               $('.editor').hide();
-
-               /*
-                * TABS
-                */
-        $('#tabs li').live('click', function(event, callback) {
-                       $.wiki.switchToTab(this);
-        });
-
-               $('#tabs li > .tabclose').live('click', function(event, callback) {
-                       var $tab = $(this).parent();
-
-                       if($tab.is('.active'))
-                               $.wiki.switchToTab(DEFAULT_PERSPECTIVE);
-
-                       var p = $.wiki.perspectiveForTab($tab);
-                       p.destroy();
-                       return false;
-        });
-
-        $(window).resize(function(){
-            $('iframe').height($(window).height() - $('#tabs').outerHeight() - $('#source-editor .toolbar').outerHeight());
-        });
-
-               $(document).bind('wlapi_document_changed', function(event, doc) {
-                       try {
-                               $('#document-revision').text(doc.revision);
-                       } catch(e) {
-                               console.log("Failed handler", e);
-                       }
-               });
-
-               CurrentDocument.fetch({
-                       success: function(){
-                               console.log("Fetch success");
-                               $('#loading-overlay').fadeOut();
-                               var active_tab = document.location.hash || DEFAULT_PERSPECTIVE;
-
-                               $(window).resize();
-
-                               console.log("Initial tab is:", active_tab)
-                               $.wiki.switchToTab(active_tab);
-                       },
-                       failure: function() {
-                               $('#loading-overlay').fadeOut();
-                               alert("FAILURE");
-                       }
-               });
-    }; /* end of initialize() */
-
-       /* Load configuration */
-       $.wiki.loadConfig();
-
-       var initAll = function(a, f) {
-               if (a.length == 0) return f();
-
-               $.wiki.initTab({
-                       tab: a.pop(),
-                       doc: CurrentDocument,
-                       callback: function(){
-                               initAll(a, f);
-                       }
-               });
-       };
-
-
-       /*
-        * Initialize all perspectives
-        */
-       initAll( $.makeArray($('ol#tabs li')), initialize);
-       console.log(location.hash);
-});
\ No newline at end of file
diff --git a/platforma/static/js/wiki/view_column_diff.js b/platforma/static/js/wiki/view_column_diff.js
deleted file mode 100644 (file)
index a212f81..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-(function($){
-
-       function DiffPerspective(options) {
-               var old_callback = options.callback || function() {};
-               var self = this;
-
-        options.callback = function(){
-                       self.base_id = options.base_id;
-                       old_callback.call(this);
-               };
-
-               $.wiki.Perspective.call(this, options);
-    };
-
-    DiffPerspective.prototype = new $.wiki.Perspective();
-
-    DiffPerspective.prototype.freezeState = function(){
-        // must
-    };
-
-       DiffPerspective.prototype.destroy = function() {
-               $('#' + this.base_id).remove();
-               $('#' + this.perspective_id).remove();
-       };
-
-       DiffPerspective.prototype.onEnter = function(success, failure){
-               $.wiki.Perspective.prototype.onEnter.call(this);
-               console.log("Entered diff view");
-       };
-
-       $.wiki.DiffPerspective = DiffPerspective;
-
-})(jQuery);
-
diff --git a/platforma/static/js/wiki/view_editor_source.js b/platforma/static/js/wiki/view_editor_source.js
deleted file mode 100644 (file)
index a0a2e69..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/* COMMENT */
-(function($) {
-
-       function CodeMirrorPerspective(options)
-       {
-               var old_callback = options.callback;
-        options.callback = function(){
-                       var self = this;
-
-                       this.codemirror = CodeMirror.fromTextArea('codemirror_placeholder', {
-                               parserfile: 'parsexml.js',
-                               path: STATIC_URL + "js/lib/codemirror/",
-                               stylesheet: STATIC_URL + "css/xmlcolors_15032010.css",
-                               parserConfig: {
-                                       useHTMLKludges: false
-                               },
-                               iframeClass: 'xml-iframe',
-                               textWrapping: true,
-                               lineNumbers: true,
-                               width: "100%",
-                               tabMode: 'spaces',
-                               indentUnit: 0,
-                               readOnly: CurrentDocument.readonly || false,
-                               initCallback: function(){
-
-                                       self.codemirror.grabKeys(function(event) {
-                                               if (event.button) {
-                                                       $(event.button).trigger('click');
-                                                       event.button = null;
-                                               }
-                                       }, function(event) {
-                                               /* CM reports characters 2 times - as event and as code */
-                                               if((typeof event) != "object")
-                                                       return false;
-
-                                               if(!event.altKey)
-                                                       return false;
-
-                                               var c = String.fromCharCode(event.keyCode).toLowerCase();
-                                               var button = $("#source-editor button[data-ui-accesskey='"+c+"']");
-                                               if(button.length == 0)
-                                                       return false;
-
-                                               /* it doesn't matter which button we pick - all do the same */
-                                               event.button = button[0];
-                                               return true;
-                                       });
-
-                                       $('#source-editor .toolbar button').click(function(event){
-                                               event.preventDefault();
-                                               var params = eval("(" + $(this).attr('data-ui-action-params') + ")");
-                                               scriptletCenter.callInteractive({
-                                                       action: $(this).attr('data-ui-action'),
-                                                       context: self.codemirror,
-                                                       extra: params
-                                               });
-                                       });
-
-                                       $('.toolbar select').change(function(event){
-                                               var slug = $(this).val();
-
-                                               $('.toolbar-buttons-container').hide().filter('[data-group=' + slug + ']').show();
-                                               $(window).resize();
-                                       });
-
-                                       $('.toolbar-buttons-container').hide();
-                                       $('.toolbar select').change();
-
-                                       console.log("Initialized CodeMirror");
-
-                                       // textarea is no longer needed
-                                       $('codemirror_placeholder').remove();
-
-                                       old_callback.call(self);
-                               }
-                       });
-               };
-
-               $.wiki.Perspective.call(this, options);
-       };
-
-
-       CodeMirrorPerspective.prototype = new $.wiki.Perspective();
-
-       CodeMirrorPerspective.prototype.freezeState = function() {
-               this.config().position = this.codemirror.win.scrollY || 0;
-       };
-
-       CodeMirrorPerspective.prototype.unfreezeState = function () {
-               this.codemirror.win.scroll(0, this.config().position || 0);
-       };
-
-       CodeMirrorPerspective.prototype.onEnter = function(success, failure) {
-               $.wiki.Perspective.prototype.onEnter.call(this);
-
-               console.log('Entering', this.doc);
-               this.codemirror.setCode(this.doc.text);
-
-               /* fix line numbers bar */
-               var $nums = $('.CodeMirror-line-numbers');
-           var barWidth = $nums.width();
-
-               $(this.codemirror.frame.contentDocument.body).css('padding-left', barWidth);
-               // $nums.css('left', -barWidth);
-
-               $(window).resize();
-               this.unfreezeState(this._uistate);
-
-               if(success) success();
-       }
-
-       CodeMirrorPerspective.prototype.onExit = function(success, failure) {
-               this.freezeState();
-
-               $.wiki.Perspective.prototype.onExit.call(this);
-               console.log('Exiting', this.doc);
-               this.doc.setText(this.codemirror.getCode());
-
-               if(success) success();
-       }
-
-       $.wiki.CodeMirrorPerspective = CodeMirrorPerspective;
-
-})(jQuery);
diff --git a/platforma/static/js/wiki/view_editor_wysiwyg.js b/platforma/static/js/wiki/view_editor_wysiwyg.js
deleted file mode 100644 (file)
index 2ae1a8d..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-(function($){
-
-    /* Show theme to the user */
-    function selectTheme(themeId){
-        var selection = window.getSelection();
-        selection.removeAllRanges();
-
-        var range = document.createRange();
-        var s = $(".motyw[theme-class='" + themeId + "']")[0];
-        var e = $(".end[theme-class='" + themeId + "']")[0];
-
-        if (s && e) {
-            range.setStartAfter(s);
-            range.setEndBefore(e);
-            selection.addRange(range);
-        }
-    };
-
-    /* Verify insertion port for annotation or theme */
-    function verifyTagInsertPoint(node){
-        if (node.nodeType == 3) { // Text Node
-            node = node.parentNode;
-        }
-
-        if (node.nodeType != 1) {
-            return false;
-        }
-
-        node = $(node);
-        var xtype = node.attr('x-node');
-
-        if (!xtype || (xtype.search(':') >= 0) ||
-        xtype == 'motyw' ||
-        xtype == 'begin' ||
-        xtype == 'end') {
-            return false;
-        }
-
-        // don't allow themes inside annotations
-        if (node.is('*[x-annotation-box] *'))
-            return false;
-
-        return true;
-    }
-
-    /* Convert HTML frament to plaintext */
-    var ANNOT_ALLOWED = ['wyroznienie', 'slowo_obce', 'osoba'];
-
-    function html2plainText(fragment){
-        var text = "";
-
-        $(fragment.childNodes).each(function(){
-            if (this.nodeType == 3) // textNode
-                text += this.nodeValue;
-            else
-                if (this.nodeType == 1 &&
-                $.inArray($(this).attr('x-node'), ANNOT_ALLOWED) != -1) {
-                    text += html2plainText(this);
-                }
-        });
-
-        return text;
-    }
-
-
-    /* Insert annotation using current selection */
-    function addAnnotation(){
-        var selection = window.getSelection();
-        var n = selection.rangeCount;
-
-        if (n == 0) {
-            window.alert("Nie zaznaczono żadnego obszaru");
-            return false;
-        }
-
-        // for now allow only 1 range
-        if (n > 1) {
-            window.alert("Zaznacz jeden obszar");
-            return false;
-        }
-
-        // remember the selected range
-        var range = selection.getRangeAt(0);
-
-        if (!verifyTagInsertPoint(range.endContainer)) {
-            window.alert("Nie można wstawić w to miejsce przypisu.");
-            return false;
-        }
-
-        // BUG #273 - selected text can contain themes, which should be omited from
-        // defining term
-        var text = html2plainText(range.cloneContents());
-
-        var tag = $('<span></span>');
-        range.collapse(false);
-        range.insertNode(tag[0]);
-
-        xml2html({
-            xml: '<pr><slowo_obce>' + text + '</slowo_obce> --- </pr>',
-            success: function(text){
-                var t = $(text);
-                tag.replaceWith(t);
-                openForEdit(t);
-            },
-            error: function(){
-                tag.remove();
-                alert('Błąd przy dodawaniu przypisu:' + errors);
-            }
-        })
-    }
-
-
-    /* Insert theme using current selection */
-
-    function addTheme(){
-        var selection = window.getSelection();
-        var n = selection.rangeCount;
-
-        if (n == 0) {
-            window.alert("Nie zaznaczono żadnego obszaru");
-            return false;
-        }
-
-        // for now allow only 1 range
-        if (n > 1) {
-            window.alert("Zaznacz jeden obszar.");
-            return false;
-        }
-
-
-        // remember the selected range
-        var range = selection.getRangeAt(0);
-
-
-        if ($(range.startContainer).is('.html-editarea') ||
-        $(range.endContainer).is('.html-editarea')) {
-            window.alert("Motywy można oznaczać tylko na tekście nie otwartym do edycji. \n Zamknij edytowany fragment i spróbuj ponownie.");
-            return false;
-        }
-
-        // verify if the start/end points make even sense -
-        // they must be inside a x-node (otherwise they will be discarded)
-        // and the x-node must be a main text
-        if (!verifyTagInsertPoint(range.startContainer)) {
-            window.alert("Motyw nie może się zaczynać w tym miejscu.");
-            return false;
-        }
-
-        if (!verifyTagInsertPoint(range.endContainer)) {
-            window.alert("Motyw nie może się kończyć w tym miejscu.");
-            return false;
-        }
-
-        var date = (new Date()).getTime();
-        var random = Math.floor(4000000000 * Math.random());
-        var id = ('' + date) + '-' + ('' + random);
-
-        var spoint = document.createRange();
-        var epoint = document.createRange();
-
-        spoint.setStart(range.startContainer, range.startOffset);
-        epoint.setStart(range.endContainer, range.endOffset);
-
-        var mtag, btag, etag, errors;
-
-        // insert theme-ref
-
-        xml2html({
-            xml: '<end id="e' + id + '" />',
-            success: function(text){
-                etag = $('<span></span>');
-                epoint.insertNode(etag[0]);
-                etag.replaceWith(text);
-                xml2html({
-                    xml: '<motyw id="m' + id + '"></motyw>',
-                    success: function(text){
-                        mtag = $('<span></span>');
-                        spoint.insertNode(mtag[0]);
-                        mtag.replaceWith(text);
-                        xml2html({
-                            xml: '<begin id="b' + id + '" />',
-                            success: function(text){
-                                btag = $('<span></span>');
-                                spoint.insertNode(btag[0])
-                                btag.replaceWith(text);
-                                selection.removeAllRanges();
-                                openForEdit($('.motyw[theme-class=' + id + ']'));
-                            }
-                        });
-                    }
-                });
-            }
-        });
-    }
-
-    /* open edition window for selected fragment */
-    function openForEdit($origin){
-        var $box = null
-
-        // annotations overlay their sub box - not their own box //
-        if ($origin.is(".annotation-inline-box")) {
-            $box = $("*[x-annotation-box]", $origin);
-        }
-        else {
-            $box = $origin;
-        }
-
-        var x = $box[0].offsetLeft;
-        var y = $box[0].offsetTop;
-        var w = $box.outerWidth();
-        var h = $box.innerHeight();
-
-        if ($origin.is(".annotation-inline-box")) {
-            w = Math.max(w, 400);
-            h = Math.max(h, 60);
-        }
-
-        // start edition on this node
-        var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><textarea></textarea></div>').css({
-            position: 'absolute',
-            height: h,
-            left: x,
-            top: y,
-            width: w
-        }).appendTo($box[0].offsetParent || $box.parent()).show();
-
-        if ($origin.is('.motyw')) {
-            $('textarea', $overlay).autocomplete(THEMES, {
-                autoFill: true,
-                multiple: true,
-                selectFirst: true
-            });
-        }
-
-        if ($origin.is('.motyw')) {
-            $('.delete-button', $overlay).click(function(){
-                if (window.confirm("Czy jesteś pewien, że chcesz usunąć ten motyw ?")) {
-                    $('[theme-class=' + $origin.attr('theme-class') + ']').remove();
-                    $overlay.remove();
-                    $(document).unbind('click.blur-overlay');
-                    return false;
-                };
-                            });
-        }
-        else {
-            $('.delete-button', $overlay).hide();
-        }
-
-
-        var serializer = new XMLSerializer();
-
-        html2text({
-            element: $box[0],
-            stripOuter: true,
-            success: function(text){
-                $('textarea', $overlay).val($.trim(text));
-
-                setTimeout(function(){
-                    $('textarea', $overlay).elastic().focus();
-                }, 50);
-
-                function save(argument){
-                    var nodeName = $box.attr('x-node') || 'pe';
-                    var insertedText = $('textarea', $overlay).val();
-
-                    if ($origin.is('.motyw')) {
-                        insertedText = insertedText.replace(/,\s*$/, '');
-                    }
-
-                    xml2html({
-                        xml: '<' + nodeName + '>' + insertedText + '</' + nodeName + '>',
-                        success: function(element){
-                            $origin.html($(element).html());
-                            $overlay.remove();
-                        },
-                        error: function(text){
-                            $overlay.remove();
-                            alert('Błąd! ' + text);
-                        }
-                    })
-                }
-
-                $('.accept-button', $overlay).click(function(){
-                    save();
-                });
-
-                $(document).bind('click.blur-overlay', function(event){
-                    if ($(event.target).parents('.html-editarea').length > 0) {
-                        return;
-                    }
-                    save();
-
-                    $(document).unbind('click.blur-overlay');
-                });
-
-            },
-            error: function(text){
-                alert('Błąd! ' + text);
-            }
-        });
-    }
-
-    function VisualPerspective(options){
-
-        var old_callback = options.callback;
-
-        options.callback = function(){
-            var element = $("#html-view");
-            var button = $('<button class="edit-button">Edytuj</button>');
-
-            if (!CurrentDocument.readonly) {
-                $('#html-view').bind('mousemove', function(event){
-                    var editable = $(event.target).closest('*[x-editable]');
-                    $('.active', element).not(editable).removeClass('active').children('.edit-button').remove();
-
-                    if (!editable.hasClass('active')) {
-                        editable.addClass('active').append(button);
-                    }
-                    if (editable.is('.annotation-inline-box')) {
-                        $('*[x-annotation-box]', editable).css({
-                            position: 'absolute',
-                            left: event.clientX - editable.offset().left + 5,
-                            top: event.clientY - editable.offset().top + 5
-                        }).show();
-                    }
-                    else {
-                        $('*[x-annotation-box]').hide();
-                    }
-                });
-
-                $('#insert-annotation-button').click(function(){
-                    addAnnotation();
-                    return false;
-                });
-
-                $('#insert-theme-button').click(function(){
-                    addTheme();
-                    return false;
-                });
-
-                $('.edit-button').live('click', function(event){
-                    event.preventDefault();
-                    openForEdit($(this).parent());
-                });
-
-            }
-
-            $('.motyw').live('click', function(){
-                selectTheme($(this).attr('theme-class'));
-            });
-
-            old_callback.call(this);
-        };
-
-        $.wiki.Perspective.call(this, options);
-    };
-
-    VisualPerspective.prototype = new $.wiki.Perspective();
-
-    VisualPerspective.prototype.freezeState = function(){
-
-    };
-
-    VisualPerspective.prototype.onEnter = function(success, failure){
-        $.wiki.Perspective.prototype.onEnter.call(this);
-
-        $.blockUI({
-            message: 'Uaktualnianie widoku...'
-        });
-
-        function _finalize(callback){
-            $.unblockUI();
-            if (callback)
-                callback();
-        }
-
-        xml2html({
-            xml: this.doc.text,
-            success: function(element){
-                $('#html-view').html(element);
-                _finalize(success);
-            },
-            error: function(text){
-                var message = $('<pre></pre>');
-                message.text(text);
-                $('#html-view').html('<p class="error">Wystąpił błąd:</p><pre>' +
-                message.html() +
-                '</pre>');
-                _finalize(failure);
-            }
-        });
-    };
-
-    VisualPerspective.prototype.onExit = function(success, failure){
-        var self = this;
-
-        $.blockUI({
-            message: 'Zapisywanie widoku...'
-        });
-
-        function _finalize(callback){
-            $.unblockUI();
-            if (callback)
-                callback();
-        }
-
-        if ($('#html-view .error').length > 0)
-            return _finalize(failure);
-
-        html2text({
-            element: $('#html-view div').get(0),
-            success: function(text){
-                self.doc.setText(text);
-                _finalize(success);
-            },
-            error: function(text){
-                $('#source-editor').html('<p>Wystąpił błąd:</p><pre>' + text + '</pre>');
-                _finalize(failure);
-            }
-        });
-    };
-
-    $.wiki.VisualPerspective = VisualPerspective;
-
-})(jQuery);
diff --git a/platforma/static/js/wiki/view_gallery.js b/platforma/static/js/wiki/view_gallery.js
deleted file mode 100644 (file)
index aa39e15..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-(function($){
-
-    function normalizeNumber(pageNumber, pageCount){
-        // Numer strony musi być pomiędzy 1 a najwyższym numerem
-        var pageNumber = parseInt(pageNumber, 10);
-
-        if (!pageNumber ||
-        pageNumber == NaN ||
-        pageNumber == Infinity ||
-        pageNumber == -Infinity ||
-        pageNumber < 1)
-            return 1;
-
-        if (pageNumber > pageCount)
-            return pageCount;
-
-        return pageNumber;
-    }
-
-    function bounds(galleryWidth, galleryHeight, imageWidth, imageHeight){
-        return {
-            maxX: 0,
-            maxY: 0,
-            minX: galleryWidth - imageWidth,
-            minY: galleryHeight - imageHeight
-        }
-    };
-
-    function normalizePosition(x, y, galleryWidth, galleryHeight, imageWidth, imageHeight){
-        var b = bounds(galleryWidth, galleryHeight, imageWidth, imageHeight);
-        return {
-            x: Math.min(b.maxX, Math.max(b.minX, x)),
-            y: Math.min(b.maxY, Math.max(b.minY, y))
-        }
-    };
-
-    function fixImageSize(){
-
-    }
-
-    /*
-     * Perspective
-     */
-    function ScanGalleryPerspective(options){
-        var old_callback = options.callback || function() { };
-
-               this.noupdate_hash_onenter = true;
-
-        options.callback = function(){
-            var self = this;
-
-            this.dimensions = {};
-            this.zoomFactor = 1;
-            this.$element = $("#side-gallery");
-            this.$numberInput = $('.page-number', this.$element);
-
-            // ...
-            var origin = {};
-            var imageOrigin = {};
-
-            this.$image = $('.gallery-image img', this.$element).attr('unselectable', 'on');
-
-            // button handlers
-            this.$numberInput.change(function(event){
-                event.preventDefault();
-                self.setPage($(this).val());
-            });
-
-            $('.previous-page', this.$element).click(function(){
-                self.setPage(parseInt(self.$numberInput.val(),10) - 1);
-            });
-
-            $('.next-page', this.$element).click(function(){
-                self.setPage(parseInt(self.$numberInput.val(),10) + 1);
-            });
-
-            $('.zoom-in', this.$element).click(function(){
-                self.alterZoom(0.2);
-            });
-
-            $('.zoom-out', this.$element).click(function(){
-                self.alterZoom((-0.2));
-            });
-
-            $(window).resize(function(){
-                self.dimensions.galleryWidth = self.$image.parent().width();
-                self.dimensions.galleryHeight = self.$image.parent().height();
-            });
-
-            $('.gallery-image img', this.$element).load(function(){
-                console.log("Image loaded.")
-                self._resizeImage();
-            }).bind('mousedown', function() {
-                               self.imageMoveStart.apply(self, arguments);
-                       });
-
-
-
-                       old_callback.call(this);
-        };
-
-        $.wiki.Perspective.call(this, options);
-    };
-
-    ScanGalleryPerspective.prototype = new $.wiki.Perspective();
-
-    ScanGalleryPerspective.prototype._resizeImage = function(){
-        var $img = this.$image;
-
-        $img.css({
-            width: null,
-            height: null
-        });
-
-        this.dimensions = {
-            width: $img.width() * this.zoomFactor,
-            height: $img.height() * this.zoomFactor,
-            originWidth: $img.width(),
-            originHeight: $img.height(),
-                   galleryWidth: $img.parent().width(),
-            galleryHeight: $img.parent().height()
-        };
-
-        if (!(this.dimensions.width && this.dimensions.height)) {
-            setTimeout(function(){
-                $img.load();
-            }, 100);
-        }
-
-        var position = normalizePosition($img.position().left, $img.position().top, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
-
-        $img.css({
-            left: position.x,
-            top: position.y,
-            width: $img.width() * this.zoomFactor,
-            height: $img.height() * this.zoomFactor
-        });
-    };
-
-    ScanGalleryPerspective.prototype.setPage = function(newPage){
-        newPage = normalizeNumber(newPage, this.doc.galleryImages.length);
-        this.$numberInput.val(newPage);
-               this.config().page = newPage;
-        $('.gallery-image img', this.$element).attr('src', this.doc.galleryImages[newPage - 1]);
-    };
-
-    ScanGalleryPerspective.prototype.alterZoom = function(delta){
-        var zoomFactor = this.zoomFactor + delta;
-        if (zoomFactor < 0.2)
-            zoomFactor = 0.2;
-        if (zoomFactor > 2)
-            zoomFactor = 2;
-        this.setZoom(zoomFactor);
-    };
-
-    ScanGalleryPerspective.prototype.setZoom = function(factor){
-        this.zoomFactor = factor;
-
-        this.dimensions.width = this.dimensions.originWidth * this.zoomFactor;
-        this.dimensions.height = this.dimensions.originHeight * this.zoomFactor;
-
-        // var position = normalizePosition(this.$image.position().left, this.$image.position().top, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
-
-               this._resizeImage();
-        /* this.$image.css({
-            width: this.dimensions.width,
-            height: this.dimensions.height,
-            left: position.x,
-            top: position.y
-        });*/
-    };
-
-       /*
-        * Movement
-        */
-       ScanGalleryPerspective.prototype.imageMoved = function(event){
-               event.preventDefault();
-
-               // origin is where the drag started
-               // imageOrigin is where the drag started on the image
-
-               var newX = event.clientX - this.origin.x + this.imageOrigin.left;
-               var newY = event.clientY - this.origin.y + this.imageOrigin.top;
-
-               var position = normalizePosition(newX, newY, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
-
-               this.$image.css({
-                       left: position.x,
-                       top: position.y,
-               });
-
-               return false;
-       };
-
-       ScanGalleryPerspective.prototype.imageMoveStart = function(event){
-               event.preventDefault();
-
-               var self = this;
-
-               this.origin = {
-                       x: event.clientX,
-                       y: event.clientY
-               };
-
-               this.imageOrigin = self.$image.position();
-               $(document).bind('mousemove.gallery', function(){
-                       self.imageMoved.apply(self, arguments);
-               }).bind('mouseup.gallery', function() {
-                       self.imageMoveStop.apply(self, arguments);
-               });
-
-               return false;
-       };
-
-       ScanGalleryPerspective.prototype.imageMoveStop = function(event){
-               $(document).unbind('mousemove.gallery').unbind('mouseup.gallery');
-       };
-
-    /*
-     * Loading gallery
-     */
-    ScanGalleryPerspective.prototype.onEnter = function(success, failure){
-        var self = this;
-
-        $.wiki.Perspective.prototype.onEnter.call(this);
-
-        this.doc.refreshGallery({
-            success: function(doc, data){
-                self.$image.show();
-                               console.log("gconfig:", self.config().page );
-                               self.setPage( self.config().page );
-
-                $('.error_message', self.$element).hide();
-                if(success) success();
-            },
-            failure: function(doc, message){
-                self.$image.hide();
-                $('.error_message', self.$element).show().html(message);
-                if(failure) failure();
-            }
-        });
-
-    };
-
-       ScanGalleryPerspective.prototype.onExit = function(success, failure) {
-
-       };
-
-    $.wiki.ScanGalleryPerspective = ScanGalleryPerspective;
-
-})(jQuery);
\ No newline at end of file
diff --git a/platforma/static/js/wiki/view_history.js b/platforma/static/js/wiki/view_history.js
deleted file mode 100644 (file)
index b4a9dd8..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-(function($){
-
-    function HistoryPerspective(options) {
-               var old_callback = options.callback || function() {};
-
-               options.callback = function() {
-                       var self = this;
-
-                       // first time page is rendered
-               $('#make-diff-button').click(function() {
-                               self.makeDiff();
-                       });
-
-                       $('#tag-changeset-button').click(function() {
-                               self.showTagForm();
-                       });
-
-                       $('#open-preview-button').click(function(event) {
-                               var selected = $('#changes-list .entry.selected');
-
-                               if (selected.length != 1) {
-                           window.alert("Wybierz dokładnie *jedną* wersję.");
-                       return;
-                       }
-
-                               var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
-                               window.open($(this).attr('data-basehref') + "?revision=" + version);
-
-                               event.preventDefault();
-                       });
-
-               $('#changes-list .entry').live('click', function(){
-               var $this = $(this);
-               if ($this.hasClass('selected'))
-                       return $this.removeClass('selected');
-
-               if ($("#changes-list .entry.selected").length < 2)
-                       return $this.addClass('selected');
-               });
-
-           $('#changes-list span.tag').live('click', function(event){
-                   return false;
-               });
-
-               old_callback.call(this);
-               }
-
-               $.wiki.Perspective.call(this, options);
-    };
-
-    HistoryPerspective.prototype = new $.wiki.Perspective();
-
-    HistoryPerspective.prototype.freezeState = function(){
-        // must
-    };
-
-    HistoryPerspective.prototype.onEnter = function(success, failure){
-        $.wiki.Perspective.prototype.onEnter.call(this);
-
-        $.blockUI({
-            message: 'Odświeżanie historii...'
-        });
-
-        function _finalize(s){
-            $.unblockUI();
-
-            if (s) {
-                if (success)
-                    success();
-            }
-            else {
-                if (failure)
-                    failure();
-            }
-        }
-
-        function _failure(doc, message){
-            $('#history-view .message-box').html('Nie udało się odświeżyć historii:' + message).show();
-            _finalize(false);
-        };
-
-        function _success(doc, data){
-            $('#history-view .message-box').hide();
-            var changes_list = $('#changes-list');
-            var $stub = $('#history-view .row-stub');
-            changes_list.html('');
-
-                       var tags = $('select#id_addtag-tag option');
-
-            $.each(data, function(){
-                $.wiki.renderStub({
-                                       container: changes_list,
-                                       stub: $stub,
-                                       data: this,
-                                       filters: {
-                                               tag: function(value) {
-                                                       return tags.filter("*[value='"+value+"']").text();
-                                               }
-                                       }
-                               });
-            });
-
-            _finalize(true);
-        };
-
-        return this.doc.fetchHistory({
-            success: _success,
-            failure: _failure
-        });
-    };
-
-       HistoryPerspective.prototype.showTagForm = function(){
-               var selected = $('#changes-list .entry.selected');
-
-               if (selected.length != 1) {
-            window.alert("Musisz zaznaczyć dokładnie jedną wersję.");
-            return;
-        }
-
-               var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
-               $.wiki.showDialog('#add_tag_dialog', {'revision': version});
-       };
-
-       HistoryPerspective.prototype.makeDiff = function() {
-        var changelist = $('#changes-list');
-        var selected = $('.entry.selected', changelist);
-
-        if (selected.length != 2) {
-            window.alert("Musisz zaznaczyć dokładnie dwie wersje do porównania.");
-            return;
-        }
-
-        $.blockUI({
-            message: 'Wczytywanie porównania...'
-        });
-
-               var rev_from = $("*[data-stub-value='version']", selected[1]).text();
-               var rev_to =  $("*[data-stub-value='version']", selected[0]).text();
-
-        return this.doc.fetchDiff({
-            from: rev_from,
-                       to: rev_to,
-            success: function(doc, data){
-                var result = $.wiki.newTab(doc, ''+rev_from +' -> ' + rev_to, 'DiffPerspective');
-
-                               $(result.view).html(data);
-                               $.wiki.switchToTab(result.tab);
-                               $.unblockUI();
-            },
-            failure: function(doc){
-                $.unblockUI();
-            }
-        });
-    };
-
-    $.wiki.HistoryPerspective = HistoryPerspective;
-
-})(jQuery);
diff --git a/platforma/static/js/wiki/view_summary.js b/platforma/static/js/wiki/view_summary.js
deleted file mode 100644 (file)
index 811096d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-(function($){
-
-       function SummaryPerspective(options) {
-               var old_callback = options.callback;
-               var self = this;
-
-        options.callback = function(){
-                       $('#publish_button').click(function() {
-                               $.blockUI({message: "Oczekiwanie na odpowiedź serwera..."});
-                               self.doc.publish({
-                                       success: function(doc, data) {
-                                               $.blockUI({message: "Udało się.", timeout: 2000});
-                                       },
-                                       failure: function(doc, message) {
-                                               $.blockUI({
-                                                       message: message,
-                                                       timeout: 5000
-                                               });
-                                       }
-
-                               });
-                       });
-
-                       old_callback.call(this);
-               };
-
-               $.wiki.Perspective.call(this, options);
-    };
-
-    SummaryPerspective.prototype = new $.wiki.Perspective();
-
-    SummaryPerspective.prototype.freezeState = function(){
-        // must
-    };
-
-       SummaryPerspective.prototype.onEnter = function(success, failure){
-               $.wiki.Perspective.prototype.onEnter.call(this);
-
-               console.log("Entered summery view");
-       };
-
-       $.wiki.SummaryPerspective = SummaryPerspective;
-
-})(jQuery);
-
diff --git a/platforma/static/js/wiki/wikiapi.js b/platforma/static/js/wiki/wikiapi.js
deleted file mode 100644 (file)
index 27ab97e..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-(function($) {
-       $.wikiapi = {};
-       var noop = function() {
-       };
-       var noops = {
-               success: noop,
-               failure: noop
-       };
-       /*
-        * Return absolute reverse path of given named view.
-        * (at least he have it hard-coded in one place)
-        *
-        * TODO: think of a way, not to hard-code it here ;)
-        *
-        */
-       function reverse() {
-               var vname = arguments[0];
-               var base_path = "/documents";
-
-               if (vname == "ajax_document_text") {
-                       var path = "/" + arguments[1] + "/text";
-
-               if (arguments[2] !== undefined)
-                               path += "/" + arguments[2];
-
-                       return base_path + path;
-               }
-
-               if (vname == "ajax_document_history") {
-
-                       return base_path + "/" + arguments[1] + "/history";
-               }
-
-               if (vname == "ajax_document_gallery") {
-
-                       return base_path + "/gallery/" + arguments[1];
-               }
-
-               if (vname == "ajax_document_diff")
-                       return base_path + "/" + arguments[1] + "/diff";
-
-               if (vname == "ajax_document_addtag")
-                       return base_path + "/" + arguments[1] + "/tags";
-
-               if (vname == "ajax_publish")
-                       return base_path + "/" + arguments[1] + "/publish";
-
-               console.log("Couldn't reverse match:", vname);
-               return "/404.html";
-       };
-
-       /*
-        * Document Abstraction
-        */
-       function WikiDocument(element_id) {
-               var meta = $('#' + element_id);
-               this.id = meta.attr('data-document-name');
-
-               this.revision = $("*[data-key='revision']", meta).text();
-               this.readonly = !!$("*[data-key='readonly']", meta).text();
-
-               this.galleryLink = $("*[data-key='gallery']", meta).text();
-               this.galleryImages = [];
-               this.text = null;
-               this.has_local_changes = false;
-               this._lock = -1;
-               this._context_lock = -1;
-               this._lock_count = 0;
-       };
-
-       WikiDocument.prototype.triggerDocumentChanged = function() {
-               $(document).trigger('wlapi_document_changed', this);
-       };
-       /*
-        * Fetch text of this document.
-        */
-       WikiDocument.prototype.fetch = function(params) {
-               params = $.extend({}, noops, params);
-               var self = this;
-               $.ajax({
-                       method: "GET",
-                       url: reverse("ajax_document_text", self.id),
-                       data: {"revision": self.revision},
-                       dataType: 'json',
-                       success: function(data) {
-                               var changed = false;
-
-                               if (self.text === null || self.revision !== data.revision) {
-                                       self.text = data.text;
-                                       self.revision = data.revision;
-                                       self.gallery = data.gallery;
-                                       changed = true;
-                                       self.triggerDocumentChanged();
-                               };
-
-                               self.has_local_changes = false;
-                               params['success'](self, changed);
-                       },
-                       error: function() {
-                               params['failure'](self, "Nie udało się wczytać treści dokumentu.");
-                       }
-               });
-       };
-       /*
-        * Fetch history of this document.
-        *
-        * from - First revision to fetch (default = 0)
-        * upto - Last revision to fetch (default = tip)
-        *
-        */
-       WikiDocument.prototype.fetchHistory = function(params) {
-               /* this doesn't modify anything, so no locks */
-               params = $.extend({}, noops, params);
-               var self = this;
-               $.ajax({
-                       method: "GET",
-                       url: reverse("ajax_document_history", self.id),
-                       dataType: 'json',
-                       data: {
-                               "from": params['from'],
-                               "upto": params['upto']
-                       },
-                       success: function(data) {
-                               params['success'](self, data);
-                       },
-                       error: function() {
-                               params['failure'](self, "Nie udało się wczytać historii dokumentu.");
-                       }
-               });
-       };
-       WikiDocument.prototype.fetchDiff = function(params) {
-               /* this doesn't modify anything, so no locks */
-               var self = this;
-               params = $.extend({
-                       'from': self.revision,
-                       'to': self.revision
-               }, noops, params);
-               $.ajax({
-                       method: "GET",
-                       url: reverse("ajax_document_diff", self.id),
-                       dataType: 'html',
-                       data: {
-                               "from": params['from'],
-                               "to": params['to']
-                       },
-                       success: function(data) {
-                               params['success'](self, data);
-                       },
-                       error: function() {
-                               params['failure'](self, "Nie udało się wczytać porównania wersji.");
-                       }
-               });
-       };
-
-       /*
-        * Fetch gallery
-        */
-       WikiDocument.prototype.refreshGallery = function(params) {
-               params = $.extend({}, noops, params);
-               var self = this;
-               $.ajax({
-                       method: "GET",
-                       url: reverse("ajax_document_gallery", self.galleryLink),
-                       dataType: 'json',
-                       // data: {},
-                       success: function(data) {
-                               self.galleryImages = data;
-                               params['success'](self, data);
-                       },
-                       error: function() {
-                               self.galleryImages = [];
-                               params['failure'](self, "<p>Nie udało się wczytać gallerii pod nazwą: '" + self.galleryLink + "'.</p>");
-                       }
-               });
-       };
-
-       /*
-        * Set document's text
-        */
-       WikiDocument.prototype.setText = function(text) {
-               this.text = text;
-               this.has_local_changes = true;
-       };
-
-       /*
-        * Set document's gallery link
-        */
-       WikiDocument.prototype.setGalleryLink = function(gallery) {
-               this.galleryLink = gallery;
-               this.has_local_changes = true;
-       };
-
-       /*
-        * Save text back to the server
-        */
-       WikiDocument.prototype.save = function(params) {
-               params = $.extend({}, noops, params);
-               var self = this;
-
-               if (!self.has_local_changes) {
-                       console.log("Abort: no changes.");
-                       return params['success'](self, false, "Nie ma zmian do zapisania.");
-               };
-
-               // Serialize form to dictionary
-               var data = {};
-               $.each(params['form'].serializeArray(), function() {
-                       data[this.name] = this.value;
-               });
-
-               var metaComment = '<!--';
-               metaComment += '\n\tgallery:' + self.galleryLink;
-               metaComment += '\n-->\n'
-
-               data['textsave-text'] = metaComment + self.text;
-
-               $.ajax({
-                       url: reverse("ajax_document_text", self.id),
-                       type: "POST",
-                       dataType: "json",
-                       data: data,
-                       success: function(data) {
-                               var changed = false;
-
-                               if (data.text) {
-                                       self.text = data.text;
-                                       self.revision = data.revision;
-                                       self.gallery = data.gallery;
-                                       changed = true;
-                                       self.triggerDocumentChanged();
-                               };
-
-                               params['success'](self, changed, ((changed && "Udało się zapisać :)") || "Twoja wersja i serwera jest identyczna"));
-                       },
-                       error: function(xhr) {
-                               try {
-                                       params['failure'](self, $.parseJSON(xhr.responseText));
-                               }
-                               catch (e) {
-                                       params['failure'](self, {
-                                               "__message": "<p>Nie udało się zapisać - błąd serwera.</p>"
-                                       });
-                               };
-
-                       }
-               });
-       }; /* end of save() */
-
-       WikiDocument.prototype.publish = function(params) {
-               params = $.extend({}, noops, params);
-               var self = this;
-               $.ajax({
-                       url: reverse("ajax_publish", self.id),
-                       type: "POST",
-                       dataType: "json",
-                       success: function(data) {
-                               params.success(self, data);
-                       },
-                       error: function(xhr) {
-                               if (xhr.status == 403 || xhr.status == 401) {
-                                       params.failure(self, "Nie masz uprawnień lub nie jesteś zalogowany.");
-                               }
-                               else {
-                                       try {
-                                               params.failure(self, xhr.responseText);
-                                       }
-                                       catch (e) {
-                                               params.failure(self, "Nie udało się - błąd serwera.");
-                                       };
-                               };
-
-                       }
-               });
-       };
-       WikiDocument.prototype.setTag = function(params) {
-               params = $.extend({}, noops, params);
-               var self = this;
-               var data = {
-                       "addtag-id": self.id,
-               };
-
-               /* unpack form */
-               $.each(params.form.serializeArray(), function() {
-                       data[this.name] = this.value;
-               });
-
-               $.ajax({
-                       url: reverse("ajax_document_addtag", self.id),
-                       type: "POST",
-                       dataType: "json",
-                       data: data,
-                       success: function(data) {
-                               params.success(self, data.message);
-                       },
-                       error: function(xhr) {
-                               if (xhr.status == 403 || xhr.status == 401) {
-                                       params.failure(self, {
-                                               "__all__": ["Nie masz uprawnień lub nie jesteś zalogowany."]
-                                       });
-                               }
-                               else {
-                                       try {
-                                               params.failure(self, $.parseJSON(xhr.responseText));
-                                       }
-                                       catch (e) {
-                                               params.failure(self, {
-                                                       "__all__": ["Nie udało się - błąd serwera."]
-                                               });
-                                       };
-                               };
-                       }
-               });
-       };
-
-       $.wikiapi.WikiDocument = WikiDocument;
-})(jQuery);
diff --git a/platforma/static/js/wiki/xslt.js b/platforma/static/js/wiki/xslt.js
deleted file mode 100644 (file)
index dda12a1..0000000
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- *
- * XSLT STUFF
- *
- */
-function createXSLT(xsl) {
-    var p = new XSLTProcessor();
-    p.importStylesheet(xsl);
-    return p;
-}
-
-var xml2htmlStylesheet = null;
-
-// Wykonuje block z załadowanymi arkuszami stylów
-function withStylesheets(code_block, onError)
-{
-    if (!xml2htmlStylesheet) {
-       $.blockUI({message: 'Ładowanie arkuszy stylów...'});
-       $.ajax({
-               url: STATIC_URL + 'xsl/wl2html_client.xsl',
-               dataType: 'xml',
-               success: function(data) {
-               xml2htmlStylesheet = createXSLT(data);
-                $.unblockUI();
-                               code_block();
-
-            },
-                       error: onError
-        })
-    }
-       else {
-               code_block();
-       }
-}
-
-
-function xml2html(options) {
-    withStylesheets(function() {
-        var xml = options.xml.replace(/\/\s+/g, '<br />');
-        var parser = new DOMParser();
-        var serializer = new XMLSerializer();
-        var doc = parser.parseFromString(xml, 'text/xml');
-        var error = $('parsererror', doc);
-
-        if (error.length == 0) {
-            doc = xml2htmlStylesheet.transformToFragment(doc, document);
-                       console.log(doc.firstChild);
-
-                       if(doc.firstChild === null) {
-                               options.error("Błąd w przetwarzaniu XML.");
-                               return;
-                       }
-
-            error = $('parsererror', doc);
-        }
-
-        if (error.length > 0 && options.error) {
-            options.error(error.text());
-        } else {
-            options.success(doc.firstChild);
-        }
-    }, function() { options.error && options.error('Nie udało się załadować XSLT'); });
-}
-
-/* USEFULL CONSTANTS */
-const ELEMENT_NODE                                      = 1;
-const ATTRIBUTE_NODE                 = 2;
-const TEXT_NODE                      = 3;
-const CDATA_SECTION_NODE             = 4;
-const ENTITY_REFERENCE_NODE          = 5;
-const ENTITY_NODE                    = 6;
-const PROCESSING_INSTRUCTION_NODE    = 7;
-const COMMENT_NODE                   = 8;
-const DOCUMENT_NODE                  = 9;
-const DOCUMENT_TYPE_NODE             = 10;
-const DOCUMENT_FRAGMENT_NODE         = 11;
-const NOTATION_NODE                  = 12;
-const XATTR_RE = /^x-attr-name-(.*)$/;
-
-const ELEM_START = 1;
-const ELEM_END = 2;
-const NS_END = 3;
-
-const NAMESPACES = {
-       // namespaces not listed here will be assigned random names
-       "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
-       "http://purl.org/dc/elements/1.1/": "dc",
-       "http://www.w3.org/XML/1998/namespace": "xml"
-};
-
-/*
- * PADDING for pretty-printing
- */
-const PADDING = {
-    dramat_wierszowany_l: 4,
-    dramat_wierszowany_lp: 4,
-    dramat_wspolczesny: 4,
-    wywiad: 4,
-    opowiadanie: 4,
-    powiesc: 4,
-    liryka_l: 4,
-    liryka_lp: 4,
-    naglowek_czesc: 4,
-    naglowek_akt: 4,
-    naglowek_rozdzial: 4,
-    naglowek_osoba: 4,
-    lista_osob: 4,
-
-    akap: 3,
-    akap_cd: 3,
-    akap_dialog: 3,
-    strofa: 3,
-    motto: 3,
-    miejsce_czas: 3,
-
-    autor_utworu: 2,
-    nazwa_utworu: 2,
-    dzielo_nadrzedne: 2,
-
-    didaskalia: 2,
-    motto_podpis: 2,
-    naglowek_listy: 2,
-    kwestia: 1,
-    lista_osoba: 1,
-
-       "podpis": 1,
-       "wers": 0,
-       "wers_cd": 0,
-       "wers_akap": 0,
-       "wers_wciety": 0,
-
-       "rdf:RDF": 3,
-       "rdf:Description": 1,
-};
-
-function getPadding(name) {
-
-       if(name.match(/^dc:.*$/))
-               return -1;
-
-       if(PADDING[name])
-               return PADDING[name];
-
-       return 0;
-}
-
-function HTMLSerializer() {
-       // empty constructor
-}
-
-
-
-HTMLSerializer.prototype._prepare = function() {
-       this.stack = [];
-
-       // XML namespace is implicit
-       this.nsMap = {"http://www.w3.org/XML/1998/namespace": "xml"};
-
-       this.result = "";
-       this.nsCounter = 1;
-}
-
-HTMLSerializer.prototype._pushElement = function(element) {
-       this.stack.push({
-               "type": ELEM_START,
-               "node": element
-       });
-}
-
-HTMLSerializer.prototype._pushChildren = function(element) {
-       for(var i = element.childNodes.length-1; i >= 0; i--)
-               this._pushElement(element.childNodes.item(i));
-}
-
-HTMLSerializer.prototype._pushTagEnd = function(tagName) {
-       this.stack.push({
-               "type": ELEM_END,
-               "tagName": tagName
-       });
-}
-
-HTMLSerializer.prototype._verseBefore = function(node) {
-       var prev = node.previousSibling;
-
-       while((prev !== null) && (prev.nodeType != ELEMENT_NODE)) {
-               prev = prev.previousSibling;
-       }
-
-       return (prev !== null) && prev.hasAttribute('x-verse');
-}
-
-HTMLSerializer.prototype.serialize = function(rootElement, stripOuter)
-{
-       var self = this;
-       self._prepare();
-
-       if(!stripOuter)
-               self._pushElement(rootElement);
-       else
-               self._pushChildren(rootElement);
-
-       while(self.stack.length > 0) {
-               var token = self.stack.pop();
-
-               if(token.type === ELEM_END) {
-                       self.result += "</" + token.tagName + ">";
-                       for(var padding = getPadding(token.tagName); padding > 0; padding--) {
-                               self.result += "\n";
-                       }
-                       continue;
-               };
-
-               if(token.type === NS_END) {
-                       self._unassignNamespace(token.namespace);
-                       continue;
-               }
-
-
-               switch(token.node.nodeType) {
-                       case ELEMENT_NODE:
-                               if(token.node.hasAttribute('x-pass-thru')) {
-                                       self._pushChildren(token.node);
-                                       break;
-                               }
-
-                               if(!token.node.hasAttribute('x-node'))
-                                       break;
-
-                               var xnode = token.node.getAttribute('x-node');
-
-                               if(xnode === 'wers') {
-                                       /* push children */
-                                       if(self._verseBefore(token.node))
-                                               self.result += '/\n';
-                                       self._pushChildren(token.node);
-                                       break;
-                               };
-
-                               if(xnode === 'out-of-flow-text') {
-                                       self._pushChildren(token.node);
-                                       break;
-                               }
-
-                               if(token.node.hasAttribute('x-verse') && self._verseBefore(token.node)) {
-                                       self.result += '/\n';
-                               };
-
-                               self._serializeElement(token.node);
-                               break;
-                       case TEXT_NODE:
-                               self.result += token.node.nodeValue;
-                               break;
-               };
-       };
-
-       return this.result;
-}
-
-/*
- * TODO: this doesn't support prefix redefinitions
- */
-HTMLSerializer.prototype._unassignNamespace = function(nsData) {
-       this.nsMap[nsData.uri] = undefined;
-};
-
-HTMLSerializer.prototype._assignNamespace = function(uri) {
-       if(uri === null) {
-               // default namespace
-               return ({"prefix": "", "uri": "", "fresh": false});
-       }
-
-       if(this.nsMap[uri] === undefined) {
-               // this prefix hasn't been defined yet in current context
-               var prefix = NAMESPACES[uri];
-
-               if (prefix === undefined) { // not predefined
-                       prefix = "ns" + this.nsCounter;
-                       this.nsCounter += 1;
-               }
-
-               this.nsMap[uri] = prefix;
-               return ({
-                       "prefix": prefix,
-                       "uri": uri,
-                       "fresh": true
-               });
-       }
-
-       return ({"prefix": this.nsMap[uri], "uri": uri, "fresh": false});
-};
-
-HTMLSerializer.prototype._join = function(prefix, name) {
-       if(!!prefix)
-               return prefix + ":" + name;
-       return name;
-};
-
-HTMLSerializer.prototype._rjoin = function(prefix, name) {
-       if(!!name)
-               return prefix + ":" + name;
-       return prefix;
-};
-
-HTMLSerializer.prototype._serializeElement = function(node) {
-       var self = this;
-
-       var ns = node.getAttribute('x-ns');
-       var nsPrefix = null;
-       var newNamespaces = [];
-
-       var nsData = self._assignNamespace(node.getAttribute('x-ns'));
-
-       if(nsData.fresh) {
-               newNamespaces.push(nsData);
-               self.stack.push({
-                       "type": NS_END,
-                       "namespace": nsData
-               });
-       }
-
-       var tagName = self._join(nsData.prefix, node.getAttribute('x-node'));
-
-       /* retrieve attributes */
-       var attributeIDs = [];
-       for (var i = 0; i < node.attributes.length; i++) {
-               var attr = node.attributes.item(i);
-
-               // check if name starts with "x-attr-name"
-               var m = attr.name.match(XATTR_RE);
-               if (m !== null)
-                       attributeIDs.push(m[1]);
-       };
-
-       /* print out */
-       if (getPadding(tagName))
-               self.result += '\n';
-
-       self.result += '<' + tagName;
-
-       $.each(attributeIDs, function() {
-               var nsData = self._assignNamespace(node.getAttribute('x-attr-ns-'+this));
-
-               if(nsData.fresh) {
-                       newNamespaces.push(nsData);
-                       self.stack.push({
-                               "type": NS_END,
-                               "namespace": nsData
-                       });
-               };
-
-               self.result += ' ' + self._join(nsData.prefix, node.getAttribute('x-attr-name-'+this));
-               self.result += '="'+node.getAttribute('x-attr-value-'+this) +'"';
-       });
-
-       /* print new namespace declarations */
-       $.each(newNamespaces, function() {
-               self.result += " " + self._rjoin("xmlns", this.prefix);
-               self.result += '="' + this.uri + '"';
-       });
-
-       if (node.childNodes.length > 0) {
-               self.result += ">";
-               self._pushTagEnd(tagName);
-               self._pushChildren(node);
-       }
-       else {
-               self.result += "/>";
-       };
-};
-
-function html2text(params) {
-       try {
-               var s = new HTMLSerializer();
-               params.success( s.serialize(params.element, params.stripOuter) );
-       } catch(e) {
-               params.error("Nie udało się zserializować tekstu:" + e)
-       }
-}
\ No newline at end of file
diff --git a/platforma/static/xsl/wl2html_client.xsl b/platforma/static/xsl/wl2html_client.xsl
deleted file mode 100644 (file)
index 6dd5080..0000000
+++ /dev/null
@@ -1,810 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"    
-    xmlns="http://www.w3.org/1999/xhtml"    
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-    <!--
-        Dokument ten opisuje jednoznaczne przekształcenie WLML 0.1 -> XHTML.
-    -->        
-    <xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" indent="no" />
-
-    <!--
-        Base tag for rendering a fragment of text
-    -->
-    <xsl:template match="chunk">        
-        <xsl:apply-templates select="child::node()">            
-            <xsl:with-param name="mixed" select="true()" />
-        </xsl:apply-templates>        
-    </xsl:template>
-    
-    <!--
-        Base tag for rendering the whole text 
-    -->
-
-    <xsl:template match="utwor">
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>    
-    
-    <!-- 
-        Przekształcenia poszczególnych elementów zgodnie z:            
-        http://wiki.wolnepodreczniki.pl/Lektury:Sk%C5%82ad/Tagi_sk%C5%82adu
-    -->
-
-    <!-- TAGI MASTERÓW STYLÓW
-    
-        Tagi rozpoczynające i kończące tekst utworu lirycznego o standardowej szerokości łamu:
-    -->
-
-    <xsl:template match="opowiadanie|powiesc">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="liryka_l|liryka_lp">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="wywiad">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!-- 
-        *****************************
-        ELEMENTY POZA TEKSTEM GŁÓWNYM
-        *****************************
-    -->
-
-    <!--
-        Autor składanego utworu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
-        np. na stronie internetowej) :
-
-        <autor_utworu> imiona-itd.-autora-składanego-utworu </autor_utworu>
-    -->
-    <xsl:template match="autor_utworu">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!-- 
-        Nazwa składanego utworu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
-        np. na stronie internetowej
-
-        <nazwa_utworu> tytuł-składanego-utworu </nazwa_utworu>
-    -->
-    <xsl:template match="nazwa_utworu">
-        <xsl:param name="mixed" />
-        <h1 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h1>
-    </xsl:template>
-
-    <!--
-        Nazwa utworu nadrzędnego, w którego skład wchodzi dany utwór
-        <dzielo_nadrzedne> tytuł-dzieła-nadrzędnego </dzielo_nadrzedne>
-
-         Przykład:
-
-         <utwor>
-         <liryka_l>
-            <autor_utworu>Bruno Jasieński</autor_utworu>
-            <dzielo_nadrzedne>But w butonierce</dzielo_nadrzedne>
-            <nazwa_utworu>Deszcz</nazwa_utworu>
-            ....
-    -->
-    <xsl:template match="dzielo_nadrzedne">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-        Podtytuł, czyli wszystkie dopiski do tytułu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni.
-        <podtytul> podtytuł-składanego-utworu </podtytul>
-
-        Przykład:
-        <utwor>
-            <powiesc>
-            <autor_utworu>Daniel Defoe</autor_utworu>
-            <nazwa_utworu>Robinson Crusoe</nazwa_utworu>
-            <podtytul>Jego życia losy, doświadczenia i przypadki</podtytul>
-            ...
-    -->
-    <xsl:template match="podtytul">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-
-    <!--
-       Tagi obejmujące tekst noty poprzedzającej tekst główny (styl wieloakapitowy):
-
-        <nota><akap> tekst-noty </akap></nota> (styl wieloakapitowy)
-    -->
-
-    <xsl:template match="nota">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        Tagi obejmujące tekst dedykacji (styl wieloakapitowy bądź wielostrofowy):
-        <dedykacja> tekst-dedykacji </dedykacja>
-    -->
-    <xsl:template match="dedykacja">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        Tagi obejmujące tekst motta (styl wieloakapitowy bądź wielostrofowy):
-        <motto> tekst-motta </motto>
-    -->
-    <xsl:template match="motto">
-        <xsl:param name="mixed" />
-        <div class="motto_container">
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>            
-        </div>
-        <xsl:apply-templates select="following-sibling::*[1][self::motto_podpis]" mode="motto">
-            <xsl:with-param name="mixed" select="true()" />
-        </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--  
-        Catch stand-alone "motto_podpis" and make then render properly.
-        If not, editing will fail :(.
-        
-        TODO: Make "motto" & "motto_podpis" one block in edit mode (like strofa) 
-    -->
-    <xsl:template match="motto_podpis[not(preceding-sibling::*[1][self::motto])]">
-       <xsl:apply-templates select="." mode="motto">
-            <xsl:with-param name="mixed" select="true()" />
-        </xsl:apply-templates>
-    </xsl:template>        
-        
-    <xsl:template match="motto_podpis" mode="motto">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>    
-    
-    <xsl:template match="motto_podpis" />
-    
-    
-
-    <!--
-        Tagi obejmujące listę osób poprzedzającą tekst dramatu
-          (zwykle składaną na osobnej stronie; to odmiana stylu listy):
-
-        <lista_osob> osoby </lista_osob>
-    -->
-    <xsl:template match="lista_osob">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="naglowek_listy">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-    <xsl:template match="lista_osoba">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-    <!--  Tagi obejmujące inne komentarze wprowadzające
-        przed tekstem dramatu (składane razem z listą osób):
-
-        <miejsce_czas> komentarze-wprowadzające </miejsce_czas>
-    -->
-    <xsl:template match="miejsce_czas">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-
-    <!--
-        ***************************
-        TAGI STYLÓW TEKSTU GŁÓWNEGO
-        ***************************
-    -->
-
-    <!--
-      Tagi nagłówka części/księgi:
-      <naglowek_czesc> nagłówek-części-lub-księgi </naglowek_czesc>
-    -->
-    <xsl:template match="naglowek_czesc">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-      Tagi tytułu rozdziału:
-      <naglowek_rozdzial> nr-i/lub-tytuł </naglowek_rozdzial>
-    -->
-    <xsl:template match="naglowek_rozdzial">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-
-    <!--
-      Tagi tytułu podrozdziału:
-      <naglowek_podrozdzial> nr-i/lub-podtytuł </naglowek_podrozdzial>
-    -->
-    <xsl:template match="naglowek_podrozdzial">
-        <xsl:param name="mixed" />
-        <h4 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h4>
-    </xsl:template>
-
-    <!--
-       Tagi sródtytułu:
-       <srodtytul> śródtytuł </srodtytul>
-
-       Tagi nagłówków aktów:
-       <naglowek_akt> nagłówek-aktu </naglowek_akt>
-    -->
-
-    <xsl:template match="srodtytul">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <xsl:template match="naglowek_akt">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-      Tagi nagłówków scen:
-      <naglowek_scena> nagłówek-sceny </naglowek_scena>
-    -->
-
-    <xsl:template match="naglowek_scena">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-    
-    <xsl:template match="naglowek_osoba">
-        <xsl:param name="mixed" />
-        <h4 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h4>
-    </xsl:template>
-
-    <!--
-       ************************
-       Bloki w tekście głównym
-       ************************
-    -->
-    
-    <xsl:template match="dlugi_cytat">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-    
-    <xsl:template match="poezja_cyt">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="kwestia">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="didaskalia">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="wywiad_pyt">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="wywiad_odp">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        ***********************************
-        Style akapitowe oraz strofy i wersy
-        ***********************************
-    -->
-
-    <xsl:template match="akap">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-    <xsl:template match="akap_cd">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-    <xsl:template match="akap_dialog">
-        <xsl:param name="mixed" />
-        <p x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </p>
-    </xsl:template>
-
-    <!--
-        ********
-        STROFA
-        ********
-    -->
-    <xsl:template match="strofa">
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-         
-            <xsl:choose>
-                <xsl:when test="count(br) > 0">
-                    <xsl:variable name="first-verse" select="br[1]/preceding-sibling::node()" />                    
-                    <xsl:call-template name="verse">
-                        <xsl:with-param name="verse-content" select="$first-verse" />                        
-                    </xsl:call-template>
-                    <xsl:for-each select="br">
-                        <xsl:variable name="lnum" select="count(preceding-sibling::br)" />
-                        <!-- select all nodes up to the next br or end of stanza -->
-                        <xsl:variable name="current-verse"
-                            select="following-sibling::node()[count(preceding-sibling::br) = $lnum+1]" />                        
-                        <xsl:call-template name="verse">
-                            <xsl:with-param name="verse-content" select="$current-verse" />                            
-                        </xsl:call-template>
-                    </xsl:for-each>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:call-template name="verse">
-                        <xsl:with-param name="verse-content" select="child::node()" />                        
-                    </xsl:call-template>
-                </xsl:otherwise>
-            </xsl:choose>
-        </div>
-    </xsl:template>
-
-    <xsl:template name="verse">
-        <!-- the verse contents including the last br (if any) -->
-        <xsl:param name="verse-content" />
-        <xsl:variable name="first-tag-name" select="name($verse-content/self::*)" />
-        <!-- name of text nodes is '' == false -->
-
-        <!-- THIS IS A HORROR!!! -->
-        <!-- Possible variants: -->
-        <xsl:choose>
-            <!-- Simple verse == not wers_ tags anywhere until the ending br -->
-            <xsl:when test="not($verse-content[starts-with(name(), 'wers_')])">
-                <p class="wers" x-node="wers" x-verse="true">
-                <xsl:apply-templates select="$verse-content[local-name(.) != 'br']">
-                    <xsl:with-param name="mixed" select="true()" />
-                </xsl:apply-templates>
-                </p>
-            </xsl:when>
-
-            <xsl:otherwise>
-            <xsl:apply-templates select="$verse-content[local-name(.) != 'br']">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-
-    <xsl:template match="wers_cd|wers_akap|wers_wciety">
-        <xsl:param name="mixed" />
-               <!-- <xsl:choose>
-               <xsl:when test="ancestor::*[0]/self::strofa"> -->
-               <p x-verse="true">
-               <xsl:call-template name="standard-attributes" />
-               <xsl:apply-templates select="child::node()">
-                       <xsl:with-param name="mixed" select="true()" />
-               </xsl:apply-templates>
-               </p>
-               <!-- </xsl:when> 
-               <xsl:choose> -->
-    </xsl:template>
-
-    <xsl:template match="br"><xsl:text>/</xsl:text></xsl:template>
-
-
-    <!--
-        *************
-        STYLE ZNAKOWE
-        *************
-    -->
-
-    <!--
-        Tagi obejmujące tytuł dzieła, np. książki, filmu, piosenki,
-        modlitwy, przedstawienia teatr. itd.:
-
-        <tytul_dziela> tytuł-dzieła </tytul_dziela>
-    -->
-    <xsl:template match="tytul_dziela">
-        <xsl:param name="mixed" />
-        <em>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </em>
-    </xsl:template>
-
-    <xsl:template match="wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www">
-        <xsl:param name="mixed" />
-        <em>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </em>
-    </xsl:template>
-
-    <!--
-        **********
-        SEPARATORY
-        **********
-    -->
-    <xsl:template match="sekcja_swiatlo">
-        <xsl:param name="mixed" />
-        <br><xsl:call-template name="standard-attributes" /></br>
-    </xsl:template>
-
-    <xsl:template match="sekcja_asterysk">
-        <xsl:param name="mixed" />
-        <hr><xsl:call-template name="standard-attributes" /></hr>
-    </xsl:template>
-
-    <xsl:template match="separator_linia">
-        <xsl:param name="mixed" />
-        <hr><xsl:call-template name="standard-attributes" /></hr>
-    </xsl:template>
-
-    <xsl:template match="zastepnik_wersu">
-        <xsl:param name="mixed" />
-        <hr><xsl:call-template name="standard-attributes" /></hr>
-    </xsl:template>
-
-    <!--
-        *************
-           PRZYPISY
-        *************
-    -->
-
-    <!--
-        Przypisy i motywy
-    -->
-    <xsl:template match="pr|pa|pe|pt">       
-        <span x-editable="true" x-common="common">
-            <xsl:call-template name="standard-attributes">
-                <xsl:with-param name="extra-class" select="'annotation-inline-box'" />
-            </xsl:call-template>
-            <a name="anchor-{generate-id(.)}" />
-            <!-- the link to the non-inline version -->
-            <a href="#annotation-{generate-id(.)}" class="annotation"></a>
-            <!-- inline contents -->
-            <span x-annotation-box="true" x-pass-thru="true">
-                <xsl:call-template name="context-menu" />
-                <xsl:apply-templates select="node()">
-                    <xsl:with-param name="mixed" select="true()" />
-                </xsl:apply-templates>
-            </span>
-        </span>
-    </xsl:template>
-
-    <xsl:template match="begin">        
-        <span>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:attribute name="theme-class">
-                <xsl:value-of select="substring-after(@id, 'b')" />
-            </xsl:attribute>
-        </span>
-    </xsl:template>
-
-    <xsl:template match="extra|uwaga">
-        <span x-common="common">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </span>
-    </xsl:template>
-
-    <xsl:template match="motyw">
-        <span x-editable="true" x-common="common">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:attribute name="theme-class">
-                <xsl:value-of select="substring-after(@id, 'm')" />
-            </xsl:attribute>
-            <xsl:call-template name="context-menu" />
-            <span x-pass-thru="true" class="theme-text-list"><xsl:value-of select=".|node()" /></span>
-        </span>
-    </xsl:template>
-
-    <xsl:template match="end">
-        <span>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:attribute name="theme-class">
-                <xsl:value-of select="substring-after(@id, 'e')" />
-            </xsl:attribute>
-        </span>
-    </xsl:template>
-
-
-    <!--
-        ****************
-         TEKST WŁAŚCIWY
-        ****************
-    -->
-
-    <xsl:template match="text()">
-        <!-- <xsl:value-of select="." /> -->
-        <xsl:param name="mixed" />
-        <xsl:choose>
-            <xsl:when test="normalize-space(.) = ''" />
-            <xsl:when test="not($mixed)">
-               <span x-node="out-of-flow-text" class="out-of-flow-text" x-editable="true">
-                       <xsl:value-of select="." />
-                               </span>
-                       </xsl:when>
-            <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-
-    <xsl:template match="comment()">
-        <xsl:comment><xsl:value-of select="." /></xsl:comment>
-    </xsl:template>
-
-    <xsl:template match="*[name() != local-name()]">
-        <span>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </span>
-    </xsl:template>
-       
-       <!-- 
-               Earlier versions of html2wl introduced a BUG, that 'causes "out-of-flow-text" tag to appear.
-               Instead of marking it as "unknown", just pass thru it
-       -->
-       <xsl:template match="out-of-flow-text">
-               <xsl:param name="mixed" />
-               <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="$mixed" />
-            </xsl:apply-templates>
-       </xsl:template> 
-
-    <xsl:template match="*">
-        <span class="unknown-tag" x-node="{name()}">
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>        
-        </span>
-    </xsl:template>
-
-    <xsl:template name="context-menu">
-        <!-- <span class="default-menu context-menu"> -->
-        <!-- <button class="edit-button">Edytuj</button> -->
-            <!-- <span class="delete-button">Delete</span> -->
-        <!-- </span> -->
-        <!-- <span class="edit-menu context-menu">
-            <span class="accept-button">Accept</span>
-            <span class="reject-button">Close</span>
-        </span> -->
-    </xsl:template>
-
-    <xsl:template name="standard-attributes">
-        <xsl:param name="extra-class" />
-        <xsl:attribute name="class"><xsl:value-of select="local-name()" /><xsl:text>&#x0020;</xsl:text><xsl:value-of select="$extra-class" /></xsl:attribute>
-
-        <xsl:attribute name="x-node"><xsl:value-of select="local-name()" /></xsl:attribute>
-
-        <xsl:if test="local-name() != name()">
-            <xsl:attribute name="x-ns"><xsl:value-of select="namespace-uri()" /></xsl:attribute>
-        </xsl:if>
-
-        <xsl:for-each select="@*">
-            <xsl:variable name="id" select="generate-id()" />
-            <xsl:attribute name="x-attr-value-{$id}"><xsl:value-of select="."/></xsl:attribute>
-            <xsl:attribute name="x-attr-name-{$id}"><xsl:value-of select="local-name()"/></xsl:attribute>
-            <xsl:choose>
-               <xsl:when test="namespace-uri()">
-                <xsl:attribute name="x-attr-ns-{$id}"><xsl:value-of select="namespace-uri()"/></xsl:attribute>
-                               </xsl:when>
-                               <!-- if the element belongs to default namespace and attribut has no namespace -->
-               <xsl:when test="not(namespace-uri(.))">
-                               <xsl:attribute name="data-wlf-{local-name()}"><xsl:value-of select="."/></xsl:attribute>
-                               </xsl:when>
-                       </xsl:choose>               
-        </xsl:for-each>
-    </xsl:template>
-    
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/platforma/templates/404.html b/platforma/templates/404.html
deleted file mode 100644 (file)
index 72d1875..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<!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" xmlns:p="http://platforma.wolnelektury.pl/">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-        <title>Platforma Redakcyjna</title>
-               <style type="text/css">
-                       body {
-                               background-color: #84BF2A;
-                       }
-
-                       #main {
-                               position: absolute;
-                               top: 20%;
-                               left: 20%;
-                               right: 20%;
-                               border-width: 3px;
-                               border-color: black;
-                               border-style: ridge;
-                               padding: 1em;
-                               background: white;
-                       }
-
-                       #logo {
-                               vertical-align: middle;
-                       }
-
-                       p {
-                               text-indent: 1em;
-                               text-align: justify;
-                       }
-
-                       #main a {
-                               text-decoration:none;
-                               color: #325f70;
-                       }
-
-                       #main a:hover {
-                               color: #f9c325;
-                       }
-
-               </style>
-    </head>
-    <body>
-       <div id="main">
-       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
-               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
-                       </a>
-        Nie odnaleziono strony</h1>
-               <p>Strona o podanym przez ciebie adresie:</p>
-               <pre style="margin-left: 2em;">{{request.build_absolute_uri}}</pre>
-                       <p>nie instnieje.</p>
-                       <ul>
-                               <li>Sprawdź, czy adres nie zawiera literówek, np:
-                               <em>bog_mnie_oposcil</em>, zamiast <em>bog_mnie_opuscil</em>.
-                               </li>
-                               <li>
-                                       Upewnij się, że dokument do którego chcesz się dostać jest na
-                                       <a href="http://stigma.nowoczesnapolska.org.pl/platforma">liście utworów</a>.
-                               </li>
-                               </ul>
-                       <p>Jeśli nadal nie jesteś w stanie odszukać dokumentu, skontaktuj się
-                               z <a href="mailto:platfroma@stigma.nowoczesnapolska.org.pl">administratorem</a>.</p>
-
-
-               </div>
-               </div>
-    </body>
-</html>
diff --git a/platforma/templates/500.html b/platforma/templates/500.html
deleted file mode 100644 (file)
index 1774b5a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<!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" xmlns:p="http://platforma.wolnelektury.pl/">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-        <title>Platforma Redakcyjna</title>
-               <style type="text/css">
-                       body {
-                               background-color: #84BF2A;
-                       }
-
-                       #main {
-                               position: absolute;
-                               top: 20%;
-                               left: 20%;
-                               right: 20%;
-                               border-width: 3px;
-                               border-color: black;
-                               border-style: ridge;
-                               padding: 1em;
-                               background: white;
-                       }
-
-                       #logo {
-                               vertical-align: middle;
-                       }
-
-                       p {
-                               text-indent: 1em;
-                               text-align: justify;
-                       }
-
-                       #main a {
-                               text-decoration:none;
-                               color: #325f70;
-                       }
-
-                       #main a:hover {
-                               color: #f9c325;
-                       }
-               </style>
-    </head>
-    <body>
-       <div id="main">
-       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
-               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
-                       </a>
-               Błąd po stronie serwera.</h1>
-               <p>Niestety nasz serwer WWW nie był w stanie dostarczyć Ci strony o którą prosiłeś.</p>
-                       <p><b>Serdecznie przepraszamy.</b></p>
-                       <p>Administrator został już powiadomiony o błędzie, ale jeśli chciałbyś
-                       przekazać nam więcej informacji na temat błędu, napisz <a href="mailto:platforma@stigma.nowoczesnapolska.org.pl">nasz adres</a>.</p>
-               </div>
-               </div>
-    </body>
-</html>
diff --git a/platforma/templates/503.html b/platforma/templates/503.html
deleted file mode 100644 (file)
index 7f85276..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<!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" xmlns:p="http://platforma.wolnelektury.pl/">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-        <title>Platforma Redakcyjna</title>
-               <style type="text/css">
-                       body {
-                               background-color: #84BF2A;
-                       }
-
-                       #main {
-                               position: absolute;
-                               top: 20%;
-                               left: 20%;
-                               right: 20%;
-                               border-width: 3px;
-                               border-color: black;
-                               border-style: ridge;
-                               padding: 1em;
-                               background: white;
-                       }
-
-                       #logo {
-                               vertical-align: middle;
-                       }
-
-                       p {
-                               text-indent: 1em;
-                               text-align: justify;
-                       }
-
-                       #main a {
-                               text-decoration:none;
-                               color: #325f70;
-                       }
-
-                       #main a:hover {
-                               color: #f9c325;
-                       }
-               </style>
-    </head>
-    <body>
-       <div id="main">
-       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
-               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
-                       </a>
-               Serwis tymczasowo niedostępny</h1>
-               <p>Platfroma redakcyjna serwisu <a href="http://wolnelektury.pl/">wolnelektury.pl</a> jest
-               tymczasowo niedostępna z powodu prac administracyjnych.
-                       </p>
-                       <p>Prosimy o wyrozumiałość i ponowne odwiedziny.</p>
-               </div>
-               </div>
-    </body>
-</html>
diff --git a/platforma/templates/admin/index.html b/platforma/templates/admin/index.html
deleted file mode 100644 (file)
index 45de219..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{% extends "admin/base_site.html" %}
-{% load i18n %}
-
-{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
-
-{% block coltype %}colMS{% endblock %}
-
-{% block bodyclass %}dashboard{% endblock %}
-
-{% block breadcrumbs %}{% endblock %}
-
-{% block content %}
-<div id="content-main">
-
-{% if app_list %}
-
-    {% include "filebrowser/append.html" %}
-
-    {% for app in app_list %}
-        <div class="module">
-        <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
-        <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
-        {% for model in app.models %}
-            <tr>
-            {% if model.perms.change %}
-                <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
-            {% else %}
-                <th scope="row">{{ model.name }}</th>
-            {% endif %}
-
-            {% if model.perms.add %}
-                <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
-            {% else %}
-                <td>&nbsp;</td>
-            {% endif %}
-
-            {% if model.perms.change %}
-                <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
-            {% else %}
-                <td>&nbsp;</td>
-            {% endif %}
-            </tr>
-        {% endfor %}
-        </table>
-        </div>
-    {% endfor %}
-{% else %}
-    <p>{% trans "You don't have permission to edit anything." %}</p>
-{% endif %}
-</div>
-{% endblock %}
-
-{% block sidebar %}
-<div id="content-related">
-    <div class="module" id="recent-actions-module">
-        <h2>{% trans 'Recent Actions' %}</h2>
-        <h3>{% trans 'My Actions' %}</h3>
-            {% load log %}
-            {% get_admin_log 10 as admin_log for_user user %}
-            {% if not admin_log %}
-            <p>{% trans 'None available' %}</p>
-            {% else %}
-            <ul class="actionlist">
-            {% for entry in admin_log %}
-            <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
-                {% if entry.is_deletion %}
-                    {{ entry.object_repr }}
-                {% else %}
-                    <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
-                {% endif %}
-                <br/>
-                {% if entry.content_type %}
-                    <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
-                {% else %}
-                    <span class="mini quiet">{% trans 'Unknown content' %}</span>
-                {% endif %}
-            </li>
-            {% endfor %}
-            </ul>
-            {% endif %}
-    </div>
-</div>
-{% endblock %}
diff --git a/platforma/templates/base.html b/platforma/templates/base.html
deleted file mode 100644 (file)
index ac728d0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!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=utf-8" />
-        <title>{% block title %}Platforma Redakcyjna{% block subtitle %}{% endblock subtitle %}{% endblock title%}</title>
-        {% block extrahead %}
-        {% endblock %}
-    </head>
-    <body id="{% block bodyid %}base{% endblock %}">
-       <div id="body-wrap">
-        <div id="content">{% block maincontent %} {% endblock %}</div>
-        </div>
-       <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> -->
-    {% block extrabody %}{% endblock %}
-    </body>
-</html>
diff --git a/platforma/templates/registration/head_login.html b/platforma/templates/registration/head_login.html
deleted file mode 100644 (file)
index f051213..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% load i18n %}
-
-{% if user.is_authenticated %}
-<span class="user_name">{{ user.username }}</span> |
-<a href='{% url logout %}'>{% trans "Log Out" %}</a>
-{% else %}
-{% url login as login_url %}
-{% ifnotequal login_url request.path %}
-    <a href='{{ login_url }}'>{% trans "Log In" %}</a>
-{% endifnotequal %}
-{% endif %}
diff --git a/platforma/templates/registration/login.html b/platforma/templates/registration/login.html
deleted file mode 100644 (file)
index e4b0897..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "base.html" %}
-
-{% block subtitle %} - Logowanie {% endblock subtitle %}
-
-{% block maincontent %}
-
-<div class="isection">
-<form method="POST" action="{% url django.contrib.auth.views.login %}">
-{{ form.as_p }}
-<p><input type="submit" value="Login" /></p>
-<input type="hidden" name="next" value="{{ next|urlencode }}" />
-</form>
-</div>
-
-{% endblock maincontent %}
diff --git a/platforma/urls.py b/platforma/urls.py
deleted file mode 100644 (file)
index 904ad44..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from django.conf.urls.defaults import *
-from django.contrib import admin
-from django.conf import settings
-
-admin.autodiscover()
-
-urlpatterns = patterns('',
-    # Auth
-    url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
-    url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
-
-    # Admin panel
-    (r'^admin/filebrowser/', include('filebrowser.urls')),
-    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-    (r'^admin/', include(admin.site.urls)),
-
-    # Static files (should be served by Apache)
-    url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
-        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
-    url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
-        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
-    url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
-        {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
-
-    url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
-    url(r'^documents/', include('wiki.urls')),
-)
diff --git a/redakcja.vhost.template b/redakcja.vhost.template
new file mode 100644 (file)
index 0000000..fbd21a9
--- /dev/null
@@ -0,0 +1,25 @@
+<VirtualHost *:80>
+    ServerName $DOMAIN
+    ServerAlias $DOMAIN_ALIASES
+    ServerAdmin $ADMIN_EMAIL
+
+    WSGIDaemonProcess $PROJECT_NAME user=$WSGI_USER group=$WSGI_USER processes=$WSGI_PROCESSES threads=$WSGI_THREADS display-name=%{GROUP}
+    WSGIProcessGroup $PROJECT_NAME
+
+    WSGIScriptAlias / $WSGI_TARGET
+    <Directory $WSGI_DIR>
+        Order allow,deny
+        allow from all
+    </Directory>
+
+    Alias /media $MEDIA_ROOT
+    <Directory $MEDIA_ROOT >
+        Options Indexes, FollowLinks
+        Order allow,deny
+        Allow from all
+    </Directory>
+
+    LogLevel warn
+    ErrorLog /var/log/apache2/$PROJECT_NAME/error.log
+    CustomLog /var/log/apache2/$PROJECT_NAME/access.log combined
+</VirtualHost>
diff --git a/redakcja.wsgi.template b/redakcja.wsgi.template
new file mode 100644 (file)
index 0000000..6b772f3
--- /dev/null
@@ -0,0 +1,24 @@
+#!$PYTHON
+import site
+site.addsitedir('$PYTHON_SITE')
+
+import os
+from os.path import abspath, dirname, join
+import sys
+
+# Redirect sys.stdout to sys.stderr for bad libraries like geopy that use
+# print statements for optional import exceptions.
+sys.stdout = sys.stderr
+
+# Add apps and lib directories to PYTHONPATH
+sys.path = [
+    '$PROJECT_ROOT',
+       '$PROJECT_ROOT/lib',
+       '$PROJECT_ROOT/apps',
+] + sys.path
+
+# Run Django
+os.environ['DJANGO_SETTINGS_MODULE'] = '$PROJECT_NAME.settings'
+
+from django.core.handlers.wsgi import WSGIHandler
+application = WSGIHandler()
diff --git a/redakcja/__init__.py b/redakcja/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/redakcja/compress_settings.py b/redakcja/compress_settings.py
new file mode 100644 (file)
index 0000000..fa416c4
--- /dev/null
@@ -0,0 +1,70 @@
+# CSS and JS files to compress
+COMPRESS_CSS = {
+    'detail': {
+         'source_filenames': (
+            'css/master.css',
+            'css/gallery.css',
+            'css/history.css',
+            'css/summary.css',
+            'css/html.css',
+            'css/jquery.autocomplete.css',
+            'css/dialogs.css',
+        ),
+        'output_filename': 'compressed/detail_styles_?.css',
+    },
+    'listing': {
+        'source_filenames': (
+            'css/filelist.css',
+        ),
+        'output_filename': 'compressed/listing_styles_?.css',
+     }
+}
+
+COMPRESS_JS = {
+    # everything except codemirror
+    'detail': {
+        'source_filenames': (
+                # libraries
+                'js/jquery-1.4.2.min.js',
+                'js/jquery.autocomplete.js',
+                'js/jquery.blockui.js',
+                'js/jquery.elastic.js',
+                'js/button_scripts.js',
+                'js/slugify.js',
+
+                # wiki scripts
+                'js/wiki/wikiapi.js',
+                'js/wiki/xslt.js',
+
+                # base UI
+                'js/wiki/base.js',
+
+                # dialogs
+                'js/wiki/dialog_save.js',
+                'js/wiki/dialog_addtag.js',
+
+                # views
+                'js/wiki/view_history.js',
+                'js/wiki/view_summary.js',
+                'js/wiki/view_editor_source.js',
+                'js/wiki/view_editor_wysiwyg.js',
+                'js/wiki/view_gallery.js',
+                'js/wiki/view_column_diff.js',
+        ),
+        'output_filename': 'compressed/detail_scripts_?.js',
+     },
+    'listing': {
+        'source_filenames': (
+                'js/jquery-1.4.2.min.js',
+                'js/slugify.js',
+        ),
+        'output_filename': 'compressed/listing_scripts_?.js',
+     }
+}
+
+COMPRESS = True
+COMPRESS_CSS_FILTERS = None
+COMPRESS_JS_FILTERS = None
+COMPRESS_AUTO = False
+COMPRESS_VERSION = True
+COMPRESS_VERSIONING = 'compress.versioning.hash.MD5Versioning'
diff --git a/redakcja/context_processors.py b/redakcja/context_processors.py
new file mode 100644 (file)
index 0000000..813d8f3
--- /dev/null
@@ -0,0 +1,9 @@
+# -*- coding: utf-8
+
+
+def settings(request):
+    from django.conf import settings
+    return {
+        'MEDIA_URL': settings.MEDIA_URL,
+        'STATIC_URL': settings.STATIC_URL,
+    }
diff --git a/redakcja/locale/pl/LC_MESSAGES/django.mo b/redakcja/locale/pl/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..a0cefb7
Binary files /dev/null and b/redakcja/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/redakcja/locale/pl/LC_MESSAGES/django.po b/redakcja/locale/pl/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..52d7a6d
--- /dev/null
@@ -0,0 +1,69 @@
+# Polskie tłumaczenie dla platformy wolnych lektur.
+# Copyright (C) 2009
+# This file is distributed under the same license as the 'platforma' package.
+# lrekucki@gmail.com, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 10:52+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: templates/explorer/editor.html:53
+msgid "Refresh panel"
+msgstr "Odśwież panel"
+
+#: templates/explorer/editor.html:67
+msgid "Print version"
+msgstr "Wersja do druku"
+
+#: templates/explorer/editor.html:96
+msgid "Next page"
+msgstr "Następna strona"
+
+#: templates/explorer/editor.html:100
+msgid "Zoom in"
+msgstr "Powiększ"
+
+#: templates/explorer/editor.html:103
+msgid "Zoom out"
+msgstr "Zmniejsz"
+
+#: templates/explorer/editor.html:106
+msgid "Reset zoom"
+msgstr "Oryginalny rozmiar"
+
+#: templates/explorer/editor.html:155
+msgid "History"
+msgstr "Historia"
+
+#: templates/explorer/editor.html:156
+msgid "Push"
+msgstr "Zatwierdź"
+
+#: templates/explorer/editor.html:157
+msgid "Pull"
+msgstr "Uaktualnij"
+
+#: templates/explorer/editor.html:158
+msgid "Save"
+msgstr "Zapisz"
+
+#: templates/explorer/editor.html:159
+msgid "Quick save"
+msgstr "Szybki zapis"
+
+#: templates/registration/head_login.html:5
+msgid "Log Out"
+msgstr "Wyloguj"
+
+#: templates/registration/head_login.html:9
+msgid "Log In"
+msgstr "Logowanie"
diff --git a/redakcja/manage.py b/redakcja/manage.py
new file mode 100755 (executable)
index 0000000..1fc25dd
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+from django.core.management import execute_manager
+try:
+    import settings  # Assumed to be in the same directory.
+except ImportError:
+    import sys
+    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+    sys.exit(1)
+
+if __name__ == "__main__":
+    # Append lib and apps directories to PYTHONPATH
+    from os import path
+    import sys
+
+    PROJECT_ROOT = path.realpath(path.dirname(__file__))
+    sys.path += [PROJECT_ROOT + '/../apps', PROJECT_ROOT + '/../lib']
+
+    execute_manager(settings)
diff --git a/redakcja/settings.py b/redakcja/settings.py
new file mode 100644 (file)
index 0000000..8fd71c7
--- /dev/null
@@ -0,0 +1,186 @@
+# -*- coding: utf-8 -*-
+import os.path
+
+PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
+
+DEBUG = False
+TEMPLATE_DEBUG = DEBUG
+
+MAINTENANCE_MODE = False
+
+ADMINS = (
+    # (u'Marek Stępniowski', 'marek@stepniowski.com'),
+    (u'Łukasz Rekucki', 'lrekucki@gmail.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_NAME = PROJECT_ROOT + '/dev.sqlite'             # Or path to database file if using sqlite3.
+DATABASE_USER = ''             # Not used with sqlite3.
+DATABASE_PASSWORD = ''         # Not used with sqlite3.
+DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Europe/Warsaw'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'pl'
+
+#import locale
+#locale.setlocale(locale.LC_ALL, '')
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
+STATIC_ROOT = PROJECT_ROOT + '/static/'
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = '/media/dynamic/'
+STATIC_URL = '/media/static/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/media/admin-media/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'ife@x^_lak+x84=lxtr!-ur$5g$+s6xt85gbbm@e_fk6q3r8=+'
+SESSION_COOKIE_NAME = "redakcja_sessionid"
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+    'django.template.loaders.filesystem.load_template_source',
+    'django.template.loaders.app_directories.load_template_source',
+#     'django.template.loaders.eggs.load_template_source',
+)
+
+TEMPLATE_CONTEXT_PROCESSORS = (
+    "django.core.context_processors.auth",
+    "django.core.context_processors.debug",
+    "django.core.context_processors.i18n",
+    "redakcja.context_processors.settings", # this is instead of media 
+    "django.core.context_processors.request",
+)
+
+
+MIDDLEWARE_CLASSES = (
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django_cas.middleware.CASMiddleware',
+
+    'django.middleware.doc.XViewMiddleware',
+    'maintenancemode.middleware.MaintenanceModeMiddleware',
+    # 'debug_toolbar.middleware.DebugToolbarMiddleware' #
+)
+
+AUTHENTICATION_BACKENDS = (
+    'django.contrib.auth.backends.ModelBackend',
+    'django_cas.backends.CASBackend',
+)
+
+ROOT_URLCONF = 'redakcja.urls'
+
+TEMPLATE_DIRS = (
+    PROJECT_ROOT + '/templates',
+)
+
+
+#
+# Central Auth System
+#
+## Set this to where the CAS server lives
+# CAS_SERVER_URL = "http://cas.fnp.pl/
+CAS_LOGOUT_COMPLETELY = True
+
+from compress_settings import *
+
+INSTALLED_APPS = (
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'django.contrib.admin',
+    'django.contrib.admindocs',
+
+    'django_cas',
+    'compress',
+    'south',
+    'sorl.thumbnail',
+    'filebrowser',
+
+    'wiki',
+    'toolbar',
+)
+
+
+#
+# Nose tests
+#
+
+TEST_RUNNER = 'django_nose.run_tests'
+TEST_MODULES = ('wiki', 'toolbar', 'vstorage')
+NOSE_ARGS = (
+    '--tests=' + ','.join(TEST_MODULES),
+    '--cover-package=' + ','.join(TEST_MODULES),
+    '-d',
+    '--with-coverage',
+    '--with-doctest',
+)
+
+
+FILEBROWSER_URL_FILEBROWSER_MEDIA = STATIC_URL + 'filebrowser/'
+FILEBROWSER_DIRECTORY = 'images/'
+FILEBROWSER_ADMIN_VERSIONS = []
+FILEBROWSER_VERSIONS_BASEDIR = 'thumbnails/'
+FILEBROWSER_DEFAULT_ORDER = "path_relative"
+
+# REPOSITORY_PATH = '/Users/zuber/Projekty/platforma/files/books'
+IMAGE_DIR = 'images'
+
+
+WL_API_CONFIG = {
+    "URL": "http://localhost:7000/api/",
+    "AUTH_REALM": "WL API",
+    "AUTH_USER": "platforma",
+    "AUTH_PASSWD": "platforma",
+}
+
+# Import localsettings file, which may override settings defined here
+try:
+    from localsettings import *
+except ImportError:
+    pass
+
+try:
+    LOGGING_CONFIG_FILE
+except NameError:
+    LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, 'config',
+                                ('logging.cfg' if not DEBUG else 'logging.cfg.dev'))
+try:
+    import logging
+
+    if os.path.isfile(LOGGING_CONFIG_FILE):
+        import logging.config
+        logging.config.fileConfig(LOGGING_CONFIG_FILE)
+    else:
+        import sys
+        logging.basicConfig(stream=sys.stderr)
+except ImportError as exc:
+    raise
diff --git a/redakcja/static/css/dialogs.css b/redakcja/static/css/dialogs.css
new file mode 100644 (file)
index 0000000..1c22868
--- /dev/null
@@ -0,0 +1,32 @@
+.dialog {
+       display: none;
+       padding: 5px;
+       text-align: left;
+       cursor: auto;
+       background-color: #E1E1E1; /* #e0ffb8; */
+}
+
+.dialog .help_text {
+       font-size: 11px;
+       color: #2e3536;  
+}
+
+.dialog .action_area {
+       padding: 1em 0.5em 0.5em;
+       border-top: 1px solid black;
+       margin-top: 0.5em;      
+}
+
+.dialog p {
+       margin: 0.5em;
+}
+
+*[data-ui-error-for] {
+       color: red;
+       font-weight: bold;
+}
+
+#save_dialog textarea {
+       width: 90%;
+       margin: 0.2em 4%;
+}
\ No newline at end of file
diff --git a/redakcja/static/css/filelist.css b/redakcja/static/css/filelist.css
new file mode 100644 (file)
index 0000000..a0b4995
--- /dev/null
@@ -0,0 +1,67 @@
+/* 
+    Document   : filelist
+    Created on : 2009-09-04, 20:44:44
+    Author     : lreqc
+    Description:
+        Dodatkowe style dla listy plików na stronie głównej.
+*/
+
+body {
+       background-color: #84BF2A;
+}
+
+#content {
+    background: #EFEFEF;
+    border: 1px solid black;
+    padding: 0.5em 2em;
+    margin: 1em;
+       overflow: hidden;    
+}
+
+#content h1 img {
+       vertical-align: middle;
+}
+
+#content h1 {
+       border-bottom: 2px solid black;
+       padding: 0.5em;
+       font-size: 2opt;
+       font-family: sans-serif;
+}
+
+#file-list {
+       overflow: visible;
+       float: left;
+       max-width: 50%;
+       padding-right: 2%;
+       border-right: 1px dashed black; 
+       
+}
+
+#last-edited-list {
+       float: left;
+       max-width: 35%;
+       margin-left: 5%;
+}
+
+#last-edited-list ul {
+       margin: 0px;
+}      
+
+#last-edited-list li {
+       margin-bottom: 1em;
+}
+
+#last-edited-list .date {
+       font-size: 70%;
+       color: grey;
+}
+
+a, a:visited, a:active {
+       color: blue;
+       text-decoration: none;  
+}
+
+a:hover {
+       text-decoration: underline;
+}
\ No newline at end of file
diff --git a/redakcja/static/css/gallery.css b/redakcja/static/css/gallery.css
new file mode 100644 (file)
index 0000000..379abcc
--- /dev/null
@@ -0,0 +1,60 @@
+/* =========== */
+/* = Gallery = */
+/* =========== */
+
+#side-gallery {
+    position: absolute;
+    /* overflow: hidden; */
+    top: 0px;
+    right: 0px;
+    bottom: 0px;
+    width: 480px;
+    display: none;
+    background-color: #FFF;
+}
+
+#side-gallery .error_message 
+{
+       background-color: white;
+       color: black;
+       padding: 0.5em 1em;
+}
+
+.change-gallery-panel {
+    width: 100%;
+    border-bottom: 1px solid #777;
+    background-color: #C1C1C1;
+    margin: 0;
+    padding: 2px;
+    z-index: 10;
+}
+
+.gallery-image {
+    position: absolute;
+    top: 30px;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    margin: 0;
+    border: none;
+    background-color: transparent;
+    overflow: hidden;
+}
+
+.gallery-image img {
+    position: absolute;
+    -moz-drag: none;
+    user-select: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    cursor: pointer;
+       
+       background-color: white;
+       min-height: 100px;
+       min-width: 100px;
+}
+
+.gallery-image img[src=''] {
+       background-color: red;  
+}
diff --git a/redakcja/static/css/history.css b/redakcja/static/css/history.css
new file mode 100644 (file)
index 0000000..b319116
--- /dev/null
@@ -0,0 +1,155 @@
+#history-view {
+    overflow: auto;
+    position: absolute;
+    top: 30px; /* 0 for no toolbar, 30 for toolbar */
+    bottom: 0px;
+    left: 0px;
+    right: 0px;
+    z-index: 1;
+}
+
+/*
+ * File History
+ */
+#changes-list-container {
+    margin: 1em auto;
+    width: 70%;
+}
+
+table#changes-list-container {
+    border-spacing: 0px 15px;
+}
+
+#changes-list {
+    margin: 0.5em 0.2em;
+}
+
+#changes-list td {
+    padding: 0.5em 1em;
+}
+
+#changes-list .entry {
+    position: relative;
+    padding: 0.5em;
+    padding-left: 3em;
+    margin: 0.5em;
+}
+
+#changes-list .entry:hover {
+    background-color: #f0f0f0;
+}
+
+#changes-list .entry.selected {
+    background-color: #ffec63;
+}
+
+#changes-list .tag {
+    display: inline-block;
+    visibility: hidden;
+    width: 60px;
+    margin: 0 0.5em 0 0;
+    font-size: 11px;
+    padding: 3px 2px;
+    text-align: center;
+    color: black;
+    background: #add8e6;
+    cursor: pointer;
+    vertical-align: middle;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+}
+
+#changes-list .entry:hover .tag {
+    visibility: visible;
+}
+
+#changes-list .tag:hover {
+    background: #bde8f6;
+}
+
+#changes-list *[data-version-tag] {
+    visibility: visible;
+    border: 1px solid black;
+    color: black;
+}
+
+#changes-list *[data-stub-value =
+'version'] {
+    font-weight: bold;
+}
+
+#changes-list td[data-stub-value =
+'version'] {
+    vertical-align: text-top;
+}
+
+#changes-list *[data-stub-value =
+'date'], #changes-list *[data-stub-value = 'author'] {
+    font-size: 11px;
+    color: gray;
+}
+
+/*
+ * Graphical DIFF view
+ *
+ */
+#history-view .diff_table {
+    width: 90%;
+}
+
+.editor.DiffPerspective {
+    overflow-y: scroll;
+}
+
+.diff_table {
+    border-width: 1px;
+    border-style: solid;
+    border-color: black;
+    empty-cells: show;
+    border-spacing: 0px;
+}
+
+.diff_table td {
+    border-width: 0px 1px 1px 0px;
+    border-style: dotted;
+    border-color: grey;
+    font-size: 10px;
+    line-height: 20px;
+    font-family: monospace;
+    padding: 0px;
+    white-space: pre-line;
+    /*word-wrap:break-word;
+     word-break:break-all; */
+}
+
+.diff_table th {
+    border-width: 0px 1px 1px 0px;
+    border-style: solid;
+    border-color: black;
+    background: #e5ffe5;
+}
+
+/* .diff_table td.left, .diff_table td.right {
+ width: 50%;
+ }*/
+.diff_table tr.change {
+    background-color: #dcdcdc;
+}
+
+.diff_mark {
+    display: inline-block;
+    padding: 2px;
+}
+
+.diff_mark_removed {
+    background-color: #ff9c94;
+}
+
+.diff_mark_added {
+    background-color: #90ee90;
+}
+
+.diff_mark_changed {
+    background-color: yellow;
+}
\ No newline at end of file
diff --git a/redakcja/static/css/html.css b/redakcja/static/css/html.css
new file mode 100644 (file)
index 0000000..bd710a8
--- /dev/null
@@ -0,0 +1,569 @@
+/* Style widoku HTML. Nie należy tu ustawiać position ani marginesów */
+.htmlview {
+    counter-reset: main;
+    font-size: 16px;
+    font-family: "Georgia", "Times New Roman", serif;
+    line-height: 1.5em;
+    padding: 3em;
+    padding-left: 45px;
+    overflow-y: scroll;
+    overflow-x: auto;
+}
+
+.htmlview[data-tag-names-visible] {
+    padding-left: 90px;
+}
+
+/*
+ .htmlview[data-tag-names-visible] *[x-editable]:not(*[x-common])::before {
+ display: block;
+ float: left;
+ clear: left;
+ content: attr(x-node);
+ font-weight: bold;
+ font-style: normal;
+ font-variant:normal;
+ font-size: 8px;
+ line-height: 8px;
+ margin-bottom: 4px;
+ padding: 3px 4px;
+ vertical-align: super;
+ background-color:#add8e6;
+ margin-left: -80px;
+ width: 70px;
+ text-align: center;
+ -webkit-border-radius: 4px;
+ }
+ */
+.htmlview *[x-node = 'RDF'] {
+    display: none;
+}
+
+.htmlview * {
+    position: relative;
+}
+
+.htmlview div {
+    max-width: 36em;
+}
+
+.htmlview #toc {
+    display: none;
+}
+
+.htmlview a {
+    color: blue;
+    text-decoration: none;
+}
+
+.htmlview a:hover {
+    text-decoration: none;
+}
+
+.htmlview h1 {
+    font-size: 3em;
+    margin: 1.5em 0;
+    text-align: center;
+    line-height: 1.5em;
+    font-weight: bold;
+}
+
+.htmlview h2 {
+    font-size: 2em;
+    margin: 1.5em 0 0;
+    font-weight: bold;
+    line-height: 1.5em;
+}
+
+.htmlview h3 {
+    font-size: 1.5em;
+    margin: 1.5em 0 0;
+    font-weight: normal;
+    line-height: 1.5em;
+}
+
+.htmlview h4 {
+    font-size: 1em;
+    margin: 1.5em 0 0;
+    line-height: 1.5em;
+}
+
+.htmlview p {
+    margin: 0;
+}
+
+.htmlview #footnotes div {
+    margin: 1.5em 0 0 0;
+}
+
+.htmlview #footnotes p {
+    margin-left: 2.5em;
+    font-size: 0.875em;
+}
+
+.htmlview blockquote {
+    font-size: 0.875em;
+}
+
+/* ============= */
+/* = Numbering = */
+/* ============= */
+.htmlview .anchor {
+    position: relative;
+    margin: 0em;
+    left: -2.2em;
+    color: #777;
+    font-size: 12px;
+    width: 2em;
+    text-align: center;
+    padding: 0.25em 0.7em;
+    line-height: 1.5em;
+}
+
+.htmlview .anchor:hover, .htmlview .anchor:active {
+    color: #FFF;
+    background-color: #CCC;
+}
+
+/* =================== */
+/* = Custom elements = */
+/* =================== */
+.htmlview .autor_utwor {
+    font-size: 0.5em;
+    display: block;
+    line-height: 1.5em;
+    margin-bottom: 0.25em;
+}
+
+.htmlview .dzielo_nadrzedne {
+    /* */
+}
+
+.htmlview .podtytul {
+    /* */
+}
+
+.htmlview .didaskalia {
+    font-style: italic;
+    margin: 0.5em 0 0 1.5em;
+}
+
+.htmlview .kwestia {
+    margin: 0.5em 0 0;
+}
+
+.htmlview .strofa {
+    margin: 1.5em 0 0.5em auto;
+}
+
+/* wersy */
+.htmlview .strofa .wers_wciety, .htmlview .strofa .wers_wciety[data-wlf-typ='1'] {
+    margin-left: 1em;
+}
+
+.htmlview .strofa .wers_wciety[data-wlf-typ='2'], .htmlview .strofa .wers_cd {
+    margin-left: 2em;
+}
+
+.htmlview .strofa .wers_wciety[data-wlf-typ='3'] {
+    margin-left: 3em;
+}
+
+.htmlview .strofa .wers_wciety[data-wlf-typ='4'] {
+    margin-left: 4em;
+}
+
+.htmlview .strofa .wers_wciety[data-wlf-typ='5'] {
+    margin-left: 5em;
+}
+
+.htmlview .strofa .wers_wciety[data-wlf-typ='6'] {
+    margin-left: 6em;
+}
+
+/* błędne wersy */
+.htmlview *:
+not(.strofa) > *[x-verse]::after {
+    content: "Ten wers znajduje się poza strofą.";
+    display: inline;
+    background: red;
+    font-size: 8pt;
+    border: 1px solid black;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    padding: 1px 1em;
+    margin-left: 1em;
+    vertical-align: super;
+}
+
+.htmlview .kwestia .strofa {
+    margin: 0;
+}
+
+.htmlview .akap, .htmlview .akap_cd, .htmlview .akap_dialog {
+    text-align: justify;
+    margin: 1.5em 0 0;
+}
+
+.htmlview .motto_container {
+       display: inline-block;
+       margin: 1.5em 0 0;
+       clear: right;   
+}
+
+.htmlview .motto {
+    text-align: justify;
+    font-style: italic;    
+}
+
+.htmlview p.motto_podpis {
+       position: relative;
+       right: -3em;
+       text-align: right;      
+}
+
+.htmlview div.fragment {
+    border-bottom: 0.1em solid #999;
+    padding-bottom: 1.5em;
+}
+
+.htmlview div.nota p, .htmlview div.dedykacja p {
+    text-align: right;
+    font-style: italic;
+}
+
+.htmlview br.sekcja_swiatlo {
+    height: 3em;
+    /* visibility: hidden; */
+}
+
+.htmlview hr.separator_linia {
+    margin: 1.5em 0;
+    border: none;
+    border-bottom: 0.1em solid #000;
+}
+
+.htmlview p.sekcja_asterysk {
+    padding: 0;
+    margin: 1.5em 0;
+    text-align: center;
+}
+
+.htmlview div.lista_osob ol {
+    list-style: none;
+    padding: 0 0 0 1.5em;
+}
+
+.htmlview p.miejsce_czas {
+    font-style: italic;
+}
+
+.htmlview .mat, .htmlview .slowo_obce, .htmlview .tytul_dziela, .htmlview .didaskalia {
+    font-style: italic;
+}
+
+.htmlview .wyroznienie {
+    letter-spacing: 0.1em;
+}
+
+.htmlview .osoba {
+    font-style: normal;
+    font-variant: small-caps;
+}
+
+.htmlview .parse-warning {
+    display: block;
+    font-size: 10pt;
+    background: #C0C0C0;
+    margin: 1em;
+}
+
+.parse-warning .message {
+    color: purple;
+    font-weight: bold;
+}
+
+/* Uwaga/Extra */
+.htmlview .uwaga {
+    background-color: #96e0e4;
+    border: 1px solid black;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    display: block;
+    font-size: 10pt;
+    line-height: 12pt;
+    padding: 2px 1em;
+    float: right;
+    max-width: 20%;
+    max-height: 24pt;
+    margin-left: 0.5em;
+    overflow: hidden;
+       z-index: 500;
+}
+
+div[x-node] > .uwaga {
+    float: none;
+    padding: 0.5em 1em;
+    margin: 1em;
+    max-width: 100%;
+    max-height: 100%;
+}
+
+.htmlview .uwaga:hover {
+    max-height: 100%;
+}
+
+.htmlview .annotation-inline-box .uwaga {
+    max-height: 100%;
+}
+
+/* Motywy */
+/* ======================== */
+/* = Footnotes and themes = */
+/* ======================== */
+.htmlview .begin, .htmlview .end {
+    background: green;
+}
+
+.htmlview .motyw {
+    /* position: absolute; */
+    float: right;
+    left: auto;
+    clear: right;
+    width: 10em;
+    font-weight: normal;
+    font-size: 13px;
+    line-height: 18px;
+    font-variant: normal;
+    text-decoration: none;
+    background-color: #fff;
+    /*    border: 1px solid gray;
+     
+     border-right: none;
+     */
+    z-index: 1;
+    -moz-user-select: -moz-none;
+    -webkit-user-select: none;
+    user-select: none;
+    margin-right: -12em;
+    text-align: left;
+}
+
+.htmlview .motyw[x-editable] {
+    border-left: 4px solid #DDD;
+    padding: 0.2em 0.2em 0.2em 0.5em;
+    margin-top: 0.2em;
+}
+
+/*
+ * Przypisy
+ */
+/* Znaczniki w tekście */
+.htmlview .annotation:before {
+    content: "[" counter(main) "]";
+    counter-increment: main;
+       vertical-align: super;
+    text-decoration: none;
+       font-size: 66%;
+}
+
+.htmlview .annotation:hover {
+    background-color: #96e0e4;
+}
+*.htmlview *.annotation-inline-box {
+    position: static;
+}
+
+/*
+ * Przypisy w tekście
+ */
+.htmlview .annotation-inline-box > span[x-annotation-box] {
+    display: none;
+    position: absolute;
+    width: 300px;
+    font-size: 10pt;
+    line-height: 12pt;
+    font-weight: normal;
+    font-style: normal;
+    background: #fffe93;
+    border-color: black;
+    border-width: 1px;
+    border-style: solid;
+    border-radius: 10px;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    padding: 3px 5px;
+    text-decoration: none;
+    z-index: 600;
+}
+
+/*
+ * Przypisy na końcu utworu (aktualnie nieuzywane)
+ */
+.htmlview .annotations-block {
+    counter-reset: secondary;
+}
+
+.htmlview .annotations-block .annotation-body {
+    position: relative;
+    padding-left: 2.5em;
+    padding-top: 0.2em;
+}
+
+.htmlview .annotations-block .annotation-backref {
+    position: absolute;
+    top: 0.4em;
+    left: -0.4em;
+    width: 2.5em;
+    text-align: right;
+}
+
+.htmlview .annotations-block .annotation-backref:before {
+    content: "[" counter(secondary) "]";
+    counter-increment: secondary;
+}
+
+/*
+ * EDITABLE ELEMENTS
+ */
+.htmlview *[x-editable] {
+    position: relative;
+    padding: 2px;
+    margin-left: 0;
+    border: 1px solid #FFF;
+}
+
+/* focused editable element */
+.htmlview *[x-editable]:hover {
+    z-index: 900;
+}
+
+.htmlview *[x-editable][x-open] {
+    visibility: hidden;
+}
+
+.edit-button, .delete-button, .accept-button {
+    position: absolute;
+    top: -21px;
+    left: -1px;
+    width: 72px;
+    height: 21px;
+    display: block;
+    /*    margin: 4px 0 2px 0;*/
+    padding: 5px 5px 2px 5px;
+    border: none;
+    background-color: #FAFAFA;
+    /*    z-index: 3000;*/
+    /*    color: #FFF;
+     z-index: 1500;
+     */
+    border: 1px solid #DDD;
+    border-bottom: none;
+}
+
+.delete-button {
+    left: 70px;
+}
+
+.edit-button:hover, .edit-button:active, 
+.delete-button:hover, .delete-button:active, 
+.accept-button:hover, .accept-button:active {
+    /*    color: #FFF;*/
+    background-color: #999;
+    color: #FFF;
+}
+
+/*
+ * VISIBILITY RULES
+ */
+.default-menu {
+    visibility: inherit;
+    opacity: 0.2;
+}
+
+.default-menu:hover {
+    opacity: 1;
+    z-index: 5000;
+}
+
+.htmlview *[x-annotation-box] > .default-menu {
+    opacity: 1;
+}
+
+.htmlview *[x-editable][x-open] > .default-menu {
+    visibility: hidden;
+}
+
+.htmlview *[x-editable][x-open] *[x-annotation-box] > .default-menu {
+    visibility: hidden;
+}
+
+.htmlview *[x-editable] > .edit-menu {
+    visibility: hidden;
+}
+
+.htmlview *[x-editable] *[x-annotation-box] > .edit-menu {
+    visibility: hidden;
+}
+
+.htmlview *[x-editable][x-open] > .edit-menu {
+    visibility: visible;
+}
+
+.htmlview *[x-editable][x-open] *[x-annotation-box] > .edit-menu {
+    visibility: visible;
+}
+
+.html-editarea {
+    border: 0px;
+    background-color: gray;
+    padding: 1px;
+    z-index: 2000;
+    position: absolute;
+}
+
+.html-editarea textarea {
+    position: absolute;
+    top: 0;
+    margin: 0px;
+    padding: 0px;
+    width: 100%;
+    height: 100%;
+    z-index: 0;
+    font-size: 10pt;
+    /*    background-color: ivory;*/
+}
+
+.htmlview .out-of-flow-text {
+    display: block;
+    font-face: monospace;
+    border: 2px solid red !important;
+    white-space: pre-line;
+}
+
+.htmlview .out-of-flow-text::before {
+    content: "Tekst w tej ramce nie jest otagowany!";
+    background-color: #ff6c6c;
+    color: black;
+    font-size: 10pt;
+    line-height: 12pt;
+    border: 1px solid black;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    padding: 5px 1em;
+    margin: 0em;
+    margin-left: 1em;
+    text-align: justify;
+    display: inline;
+    float: right;
+    max-width: 25%;
+}
+
+.unknown-tag {
+    background-color: yellow;
+    margin: -0.25em;
+    padding: 0.25em;
+    border: 1px solid orange;
+}
\ No newline at end of file
diff --git a/redakcja/static/css/html_print.css b/redakcja/static/css/html_print.css
new file mode 100644 (file)
index 0000000..38cb596
--- /dev/null
@@ -0,0 +1,229 @@
+/* Style widoku HTML. Nie należy tu ustawiać position ani marginesów */
+.htmlview {
+    font-size: 16px;
+    font: Georgia, "Times New Roman", serif;
+    line-height: 1.5em;
+    padding: 3em;    
+}
+
+.htmlview div {
+    max-width: 36em;
+}
+
+.htmlview #toc {
+    display: none;
+}
+
+.htmlview a {
+    color: blue;
+    text-decoration: none;
+}
+
+.htmlview h1 {
+    font-size: 3em;
+    margin: 1.5em 0;
+    text-align: center;
+    line-height: 1.5em;
+    font-weight: bold;
+}
+
+.htmlview h2 {
+    font-size: 2em;
+    margin: 1.5em 0 0;
+    font-weight: bold;
+    line-height: 1.5em;
+}
+
+.htmlview h3 {
+    font-size: 1.5em;
+    margin: 1.5em 0 0;
+    font-weight: normal;
+    line-height: 1.5em;
+}
+
+.htmlview h4 {
+    font-size: 1em;
+    margin: 1.5em 0 0;
+    line-height: 1.5em;
+}
+
+.htmlview p {
+    margin: 0;
+}
+
+/* ======================== */
+/* = Footnotes and themes = */
+/* ======================== */
+.htmlview .theme-begin {
+    border-left: 0.1em solid #DDDDDD;
+    color: #777;
+    padding: 0 0.5em;
+    width: 7.5em;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 16px;
+    float: right;
+    margin-right: -9.5em;
+    clear: both;
+    left: 40em;
+    line-height: 1.5em;
+    text-align: left;
+}
+
+.htmlview .annotation {
+    font-style: normal;
+    font-weight: normal;
+    font-size: 12px;
+}
+
+.htmlview #footnotes .annotation {
+    display: block;
+    float: left;
+    width: 2.5em;
+    clear: both;
+}
+
+.htmlview #footnotes div {
+    margin: 1.5em 0 0 0;
+}
+
+.htmlview #footnotes p {
+    margin-left: 2.5em;
+    font-size: 0.875em;
+}
+
+.htmlview blockquote {
+    font-size: 0.875em;
+}
+
+/* ============= */
+/* = Numbering = */
+/* ============= */
+.htmlview p {
+    position: relative;
+}
+
+.htmlview .anchor {
+    position: absolute;
+    margin: 0em;
+    left: -3em;
+    color: #777;
+    font-size: 12px;
+    width: 2em;
+    text-align: center;
+    padding: 0.25em 0.5em;
+    line-height: 1.5em;
+}
+
+.htmlview .anchor:hover, .htmlview .anchor:active {
+    color: #FFF;
+    background-color: #CCC;
+}
+
+/* =================== */
+/* = Custom elements = */
+/* =================== */
+.htmlview span.author {
+    font-size: 0.5em;
+    display: block;
+    line-height: 1.5em;
+    margin-bottom: 0.25em;
+}
+
+.htmlview span.collection {
+    font-size: 0.375em;
+    display: block;
+    line-height: 1.5em;
+    margin-bottom: -0.25em;
+}
+
+.htmlview span.subtitle {
+    font-size: 0.5em;
+    display: block;
+    line-height: 1.5em;
+    margin-top: -0.25em;
+}
+
+.htmlview div.didaskalia {
+    font-style: italic;
+    margin: 0.5em 0 0 1.5em;
+}
+
+.htmlview div.kwestia {
+    margin: 0.5em 0 0;
+}
+
+.htmlview div.stanza {
+    margin: 1.5em 0 0;
+}
+
+.htmlview div.kwestia div.stanza {
+    margin: 0;
+}
+
+.htmlview p.paragraph {
+    text-align: justify;
+    margin: 1.5em 0 0;
+}
+
+.htmlview p.motto {
+    text-align: justify;
+    font-style: italic;
+    margin: 1.5em 0 0;
+}
+
+.htmlview p.motto_podpis {
+    font-size: 0.875em;
+    text-align: right;
+}
+
+.htmlview div.fragment {
+    border-bottom: 0.1em solid #999;
+    padding-bottom: 1.5em;
+}
+
+.htmlview div.note p, .htmlview div.dedication p,
+.htmlview div.note p.paragraph, .htmlview div.dedication p.paragraph {
+    text-align: right;
+    font-style: italic;
+}
+
+.htmlview hr.spacer {
+    height: 3em;
+    visibility: hidden;
+}
+
+.htmlview hr.spacer-line {
+    margin: 1.5em 0;
+    border: none;
+    border-bottom: 0.1em solid #000;
+}
+
+.htmlview p.spacer-asterisk {
+    padding: 0;
+    margin: 1.5em 0;
+    text-align: center;
+}
+
+.htmlview div.person-list ol {
+    list-style: none;
+    padding: 0 0 0 1.5em;
+}
+
+.htmlview p.place-and-time {
+    font-style: italic;
+}
+
+.htmlview em.math, .htmlview em.foreign-word,
+.htmlview em.book-title, .htmlview em.didaskalia {
+    font-style: italic;
+}
+
+.htmlview em.author-emphasis {
+    letter-spacing: 0.1em;
+}
+
+.htmlview em.person {
+    font-style: normal;
+    font-variant: small-caps;
+}
diff --git a/redakcja/static/css/jquery.autocomplete.css b/redakcja/static/css/jquery.autocomplete.css
new file mode 100644 (file)
index 0000000..91b6228
--- /dev/null
@@ -0,0 +1,48 @@
+.ac_results {
+       padding: 0px;
+       border: 1px solid black;
+       background-color: white;
+       overflow: hidden;
+       z-index: 99999;
+}
+
+.ac_results ul {
+       width: 100%;
+       list-style-position: outside;
+       list-style: none;
+       padding: 0;
+       margin: 0;
+}
+
+.ac_results li {
+       margin: 0px;
+       padding: 2px 5px;
+       cursor: default;
+       display: block;
+       /* 
+       if width will be 100% horizontal scrollbar will apear 
+       when scroll mode will be used
+       */
+       /*width: 100%;*/
+       font: menu;
+       font-size: 12px;
+       /* 
+       it is very important, if line-height not setted or setted 
+       in relative units scroll will be broken in firefox
+       */
+       line-height: 16px;
+       overflow: hidden;
+}
+
+.ac_loading {
+       background: white url('indicator.gif') right center no-repeat;
+}
+
+.ac_odd {
+       background-color: #eee;
+}
+
+.ac_over {
+       background-color: #0A246A;
+       color: white;
+}
diff --git a/redakcja/static/css/master.css b/redakcja/static/css/master.css
new file mode 100644 (file)
index 0000000..ae74266
--- /dev/null
@@ -0,0 +1,320 @@
+a, a:visited, a:active {
+       color: blue;
+       text-decoration: none;  
+}
+
+a:hover {
+       text-decoration: underline;
+}
+
+
+body {
+    margin: 0;
+    overflow: hidden;
+    padding: 0;
+    min-width: 960px;
+    width: 100%;
+    height: 100%;
+}
+
+.vsplitbar {
+    position: absolute;
+    top: 0px;
+    bottom: 0;
+    right: 0;
+    width: 26px;
+    background: #C1C1C1 url(../img/gallery.png) no-repeat scroll center center;        
+    border-left: 2px solid #999;
+    border-right: 2px solid #999;
+    cursor: pointer;   
+}
+
+.vsplitbar:hover {
+       background-color: yellow;
+       border-color: orange;
+}
+
+.editor {
+    position: absolute;
+    top: 0px;
+    bottom: 0;
+    left: 0;
+    right: 30px;
+    overflow: hidden;
+}
+
+#editor.readonly .editor {
+       right: 0px;
+}
+
+#html-view {
+    overflow: auto;
+    position: absolute;
+    top: 33px;
+    bottom: 0;
+    left: 0;
+    right: 0;
+       z-index: 1;
+}
+
+#splitter {
+       position: fixed;
+       top: 31px;
+       left: 0px;
+       right: 0px;
+       bottom: 0px;
+       overflow: hidden;
+}
+
+
+#header {
+       position: fixed;
+       top: 0px;
+       right: 0px;
+       left: 0px;
+       height: 30px;
+       border-bottom: 1px solid #999; 
+       
+    margin: 0;
+    padding: 0;
+    background-color: #C1C1C1;
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#C1C1C1), color-stop(0.9, #A2A2A2));
+       
+       /* Firefox 3.6 */
+       background-image: -moz-linear-gradient(top left, #C1C1C1, #A2A2A2, 90%);
+       
+    font: 11px Helvetica, Verdana, sans-serif;
+    font-weight: bold;
+}
+
+#header h1, #header h1 a {
+    margin: 0;
+    padding: 0;
+    font: 17px Helvetica, Verdana, sans-serif;
+    font-weight: bold;
+    float: left;
+    padding: 3px 6px 2px 6px;
+    color: #222;
+    line-height: 20px;
+}
+
+#header h1 a {
+    text-decoration: none;
+    color: #222;
+}
+
+#tabs {
+       overflow: hidden;
+    margin: 0;
+       padding: 0;
+       height: 31px;
+       border: 0px;    
+       padding-left: 1em;      
+}
+
+#tabs li {
+       height: 18px;
+       margin-top: 6px;
+       margin-bottom: 0px;     
+       
+    -webkit-user-select: none; 
+    cursor: pointer;
+    display: block;
+    float: left;
+       
+       padding-left: 12px;
+       padding-right: 12px;
+       padding-top: 5px;
+       
+    font-weight: bold;
+    color: #222;
+    margin-left: 4px;    
+       
+    background-color: #A2A2A2;
+       
+       -moz-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
+    -webkit-box-shadow: 1px -1px 2px rgba(127, 127, 127, 0.25);
+
+    border: 1px solid #999;
+       border-bottom-width: 0px;       
+       -moz-border-radius: 4px 4px 0px 0px;
+       -webkit-border-radius: 4px;
+    -webkit-border-bottom-left-radius: 0px;
+    -webkit-border-bottom-right-radius: 0px;
+}
+
+#tabs li.active {
+    background-color: #C1C1C1;    
+}
+
+#tools {
+       float: right;
+       clear: right;
+       overflow: hidden;
+    margin: 0;
+       padding: 0;
+       height: 30px;  
+       margin-right: 5px;
+       line-height: 30px;
+       font-size: 10px;
+       vertical-align: middle;
+}
+
+
+/*
+ * Toolbars
+ */
+
+.toolbar {
+    width: 100%;
+    border-bottom: 1px solid #777;
+    background-color: #C1C1C1;
+    margin: 0;
+    padding: 2px;
+    z-index: 100;
+    height: 28px;
+}
+
+.toolbar button {
+    display: block;
+    float: left;
+    margin: 4px 0 2px 0;
+    padding: 2px 5px;
+    border: none;
+    background: none;
+}
+
+.toolbar button img {
+       margin: 0;
+       padding: 0;     
+       margin-bottom: -3px;
+}
+
+
+.toolbar select {
+    float: left;
+    margin: 1px 5px 1px 0;
+    background: none;
+    border: 1px solid #999;
+    padding: 1px;
+}
+
+.toolbar input {
+    float: left;
+    font-size: 11px;
+    padding: 0;
+    margin: 4px 5px 0px 5px;
+       vertical-align:baseline;
+}
+
+.toolbar-end {
+    clear: both;
+}
+
+.toolbar button:hover, .toolbar button:active {
+    background: #777;
+    color: #FFF;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+}
+
+/* Remove extra padding in Firefox */
+button::-moz-focus-inner { 
+    border: 0;
+    padding: 0;
+}
+
+p { margin: 0;}
+
+#body-wrap {
+    height: 100%;
+    width: 100%;
+}
+
+#content {
+    height: 100%;
+    width: 100%;
+}
+
+#loading-overlay {
+    background-color: #FFF;
+    position: absolute;
+    z-index: 1000;
+    padding: 0;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+}
+
+#loading-message {
+    position: absolute;
+    height: 20px;
+    width: 120px;
+    left: 50%;
+    margin-left: -60px;
+    top: 50%;
+    margin-top: -10px;
+/*    text-align: center;*/
+}
+
+#loading-message img {
+    float: left;
+    margin-right: 10px;
+    margin-top: -6px;
+}
+
+/*
+ * CodeMirror 
+ */
+
+.CodeMirror-line-numbers {
+       padding: 0px;
+       padding-top: 5px;               
+       text-align: right;
+       overflow: hidden;
+       width: 40px;
+       border-right: 1px solid black;
+       background-color: #e6e6fa;
+}
+
+.CodeMirror-line-numbers div {
+       display: block;  
+       font-family:"Lucida Console", monospace;
+    font-size: 13px;
+    line-height: 18px;
+       padding-right: 5px;
+}
+
+img.tabclose {
+       padding-left: 8px;
+       width: 16px;
+       height: 16px;   
+       vertical-align: middle;
+       vertical-align: text-bottom;
+}
+
+
+/*
+ * HTML Editor view
+ */ 
+.htmlview {
+       z-index: 1;
+       overflow: hidden;
+}
+
+.htmlview *[x-editable] {
+    background-color: white;
+       
+}
+.htmlview .active[x-editable] {
+    background-color: #FAFAFA;
+    border: 1px solid #DDD;
+/*    -webkit-transition: all 1s linear;*/
+}
+
+.blockOverlay {
+       background-color: black;
+       opacity: 0.4;
+}
diff --git a/redakcja/static/css/summary.css b/redakcja/static/css/summary.css
new file mode 100644 (file)
index 0000000..8fac6e1
--- /dev/null
@@ -0,0 +1,31 @@
+#summary-view-editor {
+       background: white;
+}
+
+#summary-view {
+       padding: 1em;                   
+}
+
+#summary-view .book-cover {
+       float: left;
+       margin: 1em;
+       margin-right: 2em;
+       
+       height: 300px;
+       width: 212px;
+       
+       
+       border: 1px dashed black;
+}
+
+#summary-view p {
+       margin: 0.5em; 
+}
+
+#summary-view label {
+       font-weight: bold; 
+}  
+
+#summary-view .book-cover {
+       
+}
diff --git a/redakcja/static/css/xmlcolors_15032010.css b/redakcja/static/css/xmlcolors_15032010.css
new file mode 100644 (file)
index 0000000..099f94a
--- /dev/null
@@ -0,0 +1,61 @@
+.editbox {  
+  margin: .4em;
+  margin-top: 5px;
+  margin-left: 5px;
+  padding: 0;
+  font-family:"Lucida Console", monospace;
+  font-size: 13px;
+  line-height: 18px;  
+  color: black;
+}
+
+.editbox p {
+  margin: 0;
+}
+
+.editbox span {
+       display: inline;  
+       font-size: 13px;
+    line-height: 18px; 
+}
+
+span.xml-tagname {
+  color: #0e5f0e;
+}
+
+span.xml-attribute {
+  color: #8b8b8b;
+}
+
+span.xml-punctuation {
+  color: black;
+}
+
+span.xml-attname {
+  color: #817aff;
+}
+
+span.xml-comment {
+  color: #A70;
+}
+
+span.xml-cdata {
+  color: #48A;
+}
+
+span.xml-processing {
+  color: #999;
+}
+
+span.xml-entity {
+  color: #A22;
+}
+
+span.xml-error {
+  color: #F00;
+  font-weight: bolder;
+}
+
+span.xml-text {
+  color: black;
+}
diff --git a/redakcja/static/filebrowser/css/filebrowser.css b/redakcja/static/filebrowser/css/filebrowser.css
new file mode 100644 (file)
index 0000000..c68126e
--- /dev/null
@@ -0,0 +1,29 @@
+.filebrowser table td { font-size: 10px; }
+.filebrowser table a { font-size: 11px; }
+.filebrowser thead th.sorted a { padding-right: 13px; }
+.filebrowser td { padding: 9px 10px 7px 10px !important; }
+.filebrowser td.fb_icon { padding: 6px 5px 5px 5px !important; }
+
+table a.fb_deletelink, table a.fb_renamelink, table a.fb_selectlink, table a.fb_showversionslink {
+    cursor: pointer;
+    display: block; padding: 0; margin: 0;
+    width: 23px; height: 17px;
+    background-color: transparent;
+    background-position: 0 center;
+    background-repeat: no-repeat;
+}
+
+table .fb_deletelink:link, table .fb_deletelink:visited {
+    width: 15px;
+    background-image: url('../img/filebrowser_icon_delete.gif');
+}
+table .fb_deletelink:hover, table .fb_deletelink:active { background-image: url('../img/filebrowser_icon_delete_hover.gif'); }
+table .fb_renamelink:link, table .fb_renamelink:visited {
+    width: 14px;
+    background-image: url('../img/filebrowser_icon_rename.gif');
+}
+table .fb_renamelink:hover, table .fb_renamelink:active { background-image: url('../img/filebrowser_icon_rename_hover.gif'); }
+table .fb_selectlink:link, table .fb_selectlink:visited { background-image: url('../img/filebrowser_icon_select.gif'); }
+table .fb_selectlink:hover, table .fb_selectlink:active { background-image: url('../img/filebrowser_icon_select_hover.gif'); }
+table .fb_showversionslink:link, table .fb_showversionslink:visited { background-image: url('../img/filebrowser_icon_showversions.gif'); }
+table .fb_showversionslink:hover, table .fb_showversionslink:active { background-image: url('../img/filebrowser_icon_showversions_hover.gif'); }
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_delete.gif b/redakcja/static/filebrowser/img/filebrowser_icon_delete.gif
new file mode 100644 (file)
index 0000000..221a6e1
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_delete.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_delete_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_delete_hover.gif
new file mode 100644 (file)
index 0000000..2a2142c
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_delete_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator.gif b/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator.gif
new file mode 100644 (file)
index 0000000..9b19a42
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif
new file mode 100644 (file)
index 0000000..aaa256f
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_imagegenerator_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_makethumb.gif b/redakcja/static/filebrowser/img/filebrowser_icon_makethumb.gif
new file mode 100644 (file)
index 0000000..837f6cc
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_makethumb.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif
new file mode 100644 (file)
index 0000000..d1d4d4a
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_makethumb_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_rename.gif b/redakcja/static/filebrowser/img/filebrowser_icon_rename.gif
new file mode 100644 (file)
index 0000000..bc45fe4
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_rename.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_rename_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_rename_hover.gif
new file mode 100644 (file)
index 0000000..be8ea08
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_rename_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_select.gif b/redakcja/static/filebrowser/img/filebrowser_icon_select.gif
new file mode 100644 (file)
index 0000000..a838427
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_select.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_select_disabled.gif b/redakcja/static/filebrowser/img/filebrowser_icon_select_disabled.gif
new file mode 100644 (file)
index 0000000..60ad2d5
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_select_disabled.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_select_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_select_hover.gif
new file mode 100644 (file)
index 0000000..319558e
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_select_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_show.gif b/redakcja/static/filebrowser/img/filebrowser_icon_show.gif
new file mode 100644 (file)
index 0000000..dded982
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_show.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_show_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_show_hover.gif
new file mode 100644 (file)
index 0000000..fbd1f33
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_show_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_showversions.gif b/redakcja/static/filebrowser/img/filebrowser_icon_showversions.gif
new file mode 100644 (file)
index 0000000..71525d7
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_showversions.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_icon_showversions_hover.gif b/redakcja/static/filebrowser/img/filebrowser_icon_showversions_hover.gif
new file mode 100644 (file)
index 0000000..1fbe2e4
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_icon_showversions_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif
new file mode 100644 (file)
index 0000000..9b19a42
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif
new file mode 100644 (file)
index 0000000..aaa256f
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_imagegenerator_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif
new file mode 100644 (file)
index 0000000..bcd98d9
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif
new file mode 100644 (file)
index 0000000..f9938c7
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makedirectory_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif
new file mode 100644 (file)
index 0000000..a6863cb
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif
new file mode 100644 (file)
index 0000000..b9aba7c
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_makethumb_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif
new file mode 100644 (file)
index 0000000..6de016b
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif
new file mode 100644 (file)
index 0000000..eaaf254
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_object-tools_icon_multipleupload_hover.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_.gif b/redakcja/static/filebrowser/img/filebrowser_type_.gif
new file mode 100644 (file)
index 0000000..6a908e2
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_code.gif b/redakcja/static/filebrowser/img/filebrowser_type_code.gif
new file mode 100644 (file)
index 0000000..9650839
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_code.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_document.gif b/redakcja/static/filebrowser/img/filebrowser_type_document.gif
new file mode 100644 (file)
index 0000000..65ebd99
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_document.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_folder.gif b/redakcja/static/filebrowser/img/filebrowser_type_folder.gif
new file mode 100644 (file)
index 0000000..115e3fb
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_folder.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_image.gif b/redakcja/static/filebrowser/img/filebrowser_type_image.gif
new file mode 100644 (file)
index 0000000..000b31c
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_image.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_sound.gif b/redakcja/static/filebrowser/img/filebrowser_type_sound.gif
new file mode 100644 (file)
index 0000000..8a8970a
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_sound.gif differ
diff --git a/redakcja/static/filebrowser/img/filebrowser_type_video.gif b/redakcja/static/filebrowser/img/filebrowser_type_video.gif
new file mode 100644 (file)
index 0000000..f456d59
Binary files /dev/null and b/redakcja/static/filebrowser/img/filebrowser_type_video.gif differ
diff --git a/redakcja/static/filebrowser/img/tableheader_arrow_down.gif b/redakcja/static/filebrowser/img/tableheader_arrow_down.gif
new file mode 100644 (file)
index 0000000..5ae95a6
Binary files /dev/null and b/redakcja/static/filebrowser/img/tableheader_arrow_down.gif differ
diff --git a/redakcja/static/filebrowser/img/tableheader_arrow_up.gif b/redakcja/static/filebrowser/img/tableheader_arrow_up.gif
new file mode 100644 (file)
index 0000000..85f1e12
Binary files /dev/null and b/redakcja/static/filebrowser/img/tableheader_arrow_up.gif differ
diff --git a/redakcja/static/filebrowser/img/tableheader_arrows.gif b/redakcja/static/filebrowser/img/tableheader_arrows.gif
new file mode 100644 (file)
index 0000000..39b8780
Binary files /dev/null and b/redakcja/static/filebrowser/img/tableheader_arrows.gif differ
diff --git a/redakcja/static/filebrowser/js/AddFileBrowser.js b/redakcja/static/filebrowser/js/AddFileBrowser.js
new file mode 100644 (file)
index 0000000..888885f
--- /dev/null
@@ -0,0 +1,30 @@
+var FileBrowser = {
+    // this is set automatically
+    admin_media_prefix: '',
+    // change this
+    thumb_prefix: 'thumb_',
+    no_thumb: 'filebrowser/img/no_thumb.gif',
+
+    init: function() {
+        // Deduce admin_media_prefix by looking at the <script>s in the
+        // current document and finding the URL of *this* module.
+        var scripts = document.getElementsByTagName('script');
+        for (var i=0; i<scripts.length; i++) {
+            if (scripts[i].src.match(/AddFileBrowser/)) {
+                var idx = scripts[i].src.indexOf('filebrowser/js/AddFileBrowser');
+                FileBrowser.admin_media_prefix = scripts[i].src.substring(0, idx);
+                break;
+            }
+        }
+    },
+    // show FileBrowser
+    show: function(id, href) {
+        // var id2=String(id).split(".").join("___");
+        var id2=String(id).replace(/\-/g,"____").split(".").join("___");
+        FBWindow = window.open(href, String(id2), 'height=600,width=960,resizable=yes,scrollbars=yes');
+        FBWindow.focus();
+    }
+}
+
+addEvent(window, 'load', FileBrowser.init);
+
diff --git a/redakcja/static/filebrowser/js/FB_CKEditor.js b/redakcja/static/filebrowser/js/FB_CKEditor.js
new file mode 100644 (file)
index 0000000..74d8d64
--- /dev/null
@@ -0,0 +1,24 @@
+function ProtectPath(path) {
+    path = path.replace( /\\/g,'\\\\');
+    path = path.replace( /'/g,'\\\'');
+    return path ;
+}
+
+function gup( name ) {
+  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+  var regexS = "[\\?&]"+name+"=([^&#]*)";
+  var regex = new RegExp(regexS);
+  var results = regex.exec(window.location.href);
+  if(results == null)
+    return "";
+  else
+    return results[1];
+}
+
+function OpenFile(fileUrl) {
+    var CKEditorFuncNum = gup('CKEditorFuncNum');
+    window.top.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,encodeURI(fileUrl).replace('#','%23'));
+    window.top.close();
+    window.top.opener.focus();
+}
+
diff --git a/redakcja/static/filebrowser/js/FB_FileBrowseField.js b/redakcja/static/filebrowser/js/FB_FileBrowseField.js
new file mode 100644 (file)
index 0000000..5e3aa9f
--- /dev/null
@@ -0,0 +1,32 @@
+function FileSubmit(FileURL, ThumbURL, FileType) {
+
+    // var input_id=window.name.split("___").join(".");
+    var input_id=window.name.replace(/____/g,'-').split("___").join(".");
+    var preview_id = 'image_' + input_id;
+    var link_id = 'link_' + input_id;
+    var help_id = 'help_' + input_id;
+    input = opener.document.getElementById(input_id);
+    preview = opener.document.getElementById(preview_id);
+    link = opener.document.getElementById(link_id);
+    help = opener.document.getElementById(help_id);
+    // set new value for input field
+    input.value = FileURL;
+
+    if (ThumbURL && FileType != "") {
+        // selected file is an image and thumbnail is available:
+        // display the preview-image (thumbnail)
+        // link the preview-image to the original image
+        link.setAttribute("href", FileURL);
+        link.setAttribute("target", "_blank");
+        preview.setAttribute("src", ThumbURL);
+        help.setAttribute("style", "display:block");
+    } else {
+        // hide preview elements
+        link.setAttribute("href", "");
+        link.setAttribute("target", "");
+        preview.setAttribute("src", "");
+        help.setAttribute("style", "display:none");
+    }
+    this.close();
+}
+
diff --git a/redakcja/static/filebrowser/js/FB_TinyMCE.js b/redakcja/static/filebrowser/js/FB_TinyMCE.js
new file mode 100644 (file)
index 0000000..b2d4d60
--- /dev/null
@@ -0,0 +1,28 @@
+var FileBrowserDialogue = {
+    init : function () {
+        // remove tinymce stylesheet.
+        var allLinks = document.getElementsByTagName("link");
+        allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
+    },
+    fileSubmit : function (FileURL) {
+        var URL = FileURL;
+        var win = tinyMCEPopup.getWindowArg("window");
+
+        // insert information now
+        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
+
+        // change width/height & show preview
+        if (win.ImageDialog){
+            if (win.ImageDialog.getImageData)
+                win.ImageDialog.getImageData();
+            if (win.ImageDialog.showPreviewImage)
+                win.ImageDialog.showPreviewImage(URL);
+        }
+
+        // close popup window
+        tinyMCEPopup.close();
+    }
+}
+
+tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
+
diff --git a/redakcja/static/filebrowser/js/TinyMCEAdmin.js b/redakcja/static/filebrowser/js/TinyMCEAdmin.js
new file mode 100644 (file)
index 0000000..902fc9f
--- /dev/null
@@ -0,0 +1,75 @@
+function CustomFileBrowser(field_name, url, type, win) {
+
+    var cmsURL = "/admin/filebrowser/browse/?pop=2";
+    cmsURL = cmsURL + "&type=" + type;
+
+    tinyMCE.activeEditor.windowManager.open({
+        file: cmsURL,
+        width: 820,  // Your dimensions may differ - toy around with them!
+        height: 500,
+        resizable: "yes",
+        scrollbars: "yes",
+        inline: "no",  // This parameter only has an effect if you use the inlinepopups plugin!
+        close_previous: "no"
+    }, {
+        window: win,
+        input: field_name,
+        editor_id: tinyMCE.selectedInstance.editorId
+    });
+    return false;
+}
+
+
+tinyMCE.init({
+    mode: "textareas",
+    theme: "advanced",
+    language: "en",
+    skin: "o2k7",
+    browsers: "gecko",
+    dialog_type: "modal",
+    object_resizing: true,
+    cleanup_on_startup: true,
+    forced_root_block: "p",
+    remove_trailing_nbsp: true,
+    theme_advanced_toolbar_location: "top",
+    theme_advanced_toolbar_align: "left",
+    theme_advanced_statusbar_location: "none",
+    theme_advanced_buttons1: "formatselect,bold,italic,underline,bullist,numlist,undo,redo,link,unlink,image,code,fullscreen,pasteword,media,charmap",
+    theme_advanced_buttons2: "",
+    theme_advanced_buttons3: "",
+    theme_advanced_path: false,
+    theme_advanced_blockformats: "p,h2,h3,h4,h5,h6",
+    width: '700',
+    height: '200',
+    plugins: "advimage,advlink,fullscreen,visualchars,paste,media,template,searchreplace",
+    advimage_styles: "Linksbündig neben Text=img_left;Rechtsbündig neben Text=img_right;Eigener Block=img_block",
+    advlink_styles: "internal (sehmaschine.net)=internal;external (link to an external site)=external",
+    advimage_update_dimensions_onchange: true,
+    file_browser_callback: "CustomFileBrowser",
+    relative_urls: false,
+    valid_elements : "" +
+    "-p," +
+    "a[href|target=_blank|class]," +
+    "-strong/-b," +
+    "-em/-i," +
+    "-u," +
+    "-ol," +
+    "-ul," +
+    "-li," +
+    "br," +
+    "img[class|src|alt=|width|height]," +
+    "-h2,-h3,-h4," +
+    "-pre," +
+    "-code," +
+    "-div",
+    extended_valid_elements: "" +
+    "a[name|class|href|target|title|onclick]," +
+    "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]," +
+    "br[clearfix]," +
+    "-p[class<clearfix?summary?code]," +
+    "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," +
+    "ul[class<clearfix],ol[class<clearfix]," +
+    "div[class],"
+});
+
+
diff --git a/redakcja/static/filebrowser/js/jquery-1.3.2.min.js b/redakcja/static/filebrowser/js/jquery-1.3.2.min.js
new file mode 100644 (file)
index 0000000..b1ae21d
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf b/redakcja/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf
new file mode 100644 (file)
index 0000000..c8b2565
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/Uploadify v2.1.0 Manual.pdf differ
diff --git a/redakcja/static/filebrowser/uploadify/cancel.png b/redakcja/static/filebrowser/uploadify/cancel.png
new file mode 100644 (file)
index 0000000..1c062ae
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/cancel.png differ
diff --git a/redakcja/static/filebrowser/uploadify/check.php b/redakcja/static/filebrowser/uploadify/check.php
new file mode 100644 (file)
index 0000000..d7dc571
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+$fileArray = array();\r
+foreach ($_POST as $key => $value) {\r
+       if ($key != 'folder') {\r
+               if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) {\r
+                       $fileArray[$key] = $value;\r
+               }\r
+       }\r
+}\r
+echo json_encode($fileArray);\r
+?>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as b/redakcja/static/filebrowser/uploadify/com/adobe/air/logging/FileTarget.as
new file mode 100644 (file)
index 0000000..0dda3eb
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.air.logging
+{
+       import mx.logging.AbstractTarget;
+       import flash.filesystem.File;
+       import flash.filesystem.FileStream;
+       import flash.filesystem.FileMode;
+       import mx.logging.LogEvent;
+       import flash.system.System;
+       import flash.system.Capabilities;
+       import mx.logging.targets.LineFormattedTarget;
+       import mx.core.mx_internal;
+       
+       use namespace mx_internal;
+
+       /**
+        * An Adobe AIR only class that provides a log target for the Flex logging
+        * framework, that logs files to a file on the user's system.
+        * 
+        * This class will only work when running within Adobe AIR>
+        */
+       public class FileTarget extends LineFormattedTarget
+       {
+               private const DEFAULT_LOG_PATH:String = "app-storage:/application.log";
+               
+               private var log:File;
+               
+               public function FileTarget(logFile:File = null)
+               {
+                       if(logFile != null)
+                       {
+                               log = logFile;
+                       }
+                       else
+                       {
+                               log = new File(DEFAULT_LOG_PATH);
+                       }
+               }
+               
+               public function get logURI():String
+               {
+                       return log.url;
+               }
+               
+               mx_internal override function internalLog(message:String):void
+           {
+                       write(message);
+           }           
+               
+               private function write(msg:String):void
+               {               
+                       var fs:FileStream = new FileStream();
+                               fs.open(log, FileMode.APPEND);
+                               fs.writeUTFBytes(msg + "\n");
+                               fs.close();
+               }       
+               
+               public function clear():void
+               {
+                       var fs:FileStream = new FileStream();
+                               fs.open(log, FileMode.WRITE);
+                               fs.writeUTFBytes("");
+                               fs.close();                     
+               }
+               
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/HMAC.as
new file mode 100644 (file)
index 0000000..72f9bff
--- /dev/null
@@ -0,0 +1,127 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.crypto {\r
+       import flash.utils.ByteArray;\r
+       import flash.utils.Endian;\r
+       import flash.utils.describeType;\r
+       /**\r
+        * Keyed-Hashing for Message Authentication\r
+        * Implementation based on algorithm description at \r
+        * http://www.faqs.org/rfcs/rfc2104.html\r
+        */\r
+       public class HMAC \r
+       {\r
+               /**\r
+                * Performs the HMAC hash algorithm using byte arrays.\r
+                *\r
+                * @param secret The secret key\r
+                * @param message The message to hash\r
+                * @param algorithm Hash object to use\r
+                * @return A string containing the hash value of message\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 8.5\r
+                * @tiptext\r
+                */\r
+               public static function hash( secret:String, message:String, algorithm:Object = null ):String\r
+               {\r
+                       var text:ByteArray = new ByteArray();\r
+                       var k_secret:ByteArray = new ByteArray();\r
+                       \r
+                       text.writeUTFBytes(message);\r
+                       k_secret.writeUTFBytes(secret);\r
+                       \r
+                       return hashBytes(k_secret, text, algorithm);\r
+               }\r
+               \r
+               /**\r
+                * Performs the HMAC hash algorithm using string.\r
+                *\r
+                * @param secret The secret key\r
+                * @param message The message to hash\r
+                * @param algorithm Hash object to use\r
+                * @return A string containing the hash value of message\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 8.5\r
+                * @tiptext\r
+                */\r
+               public static function hashBytes( secret:ByteArray, message:ByteArray, algorithm:Object = null ):String\r
+               {\r
+                       var ipad:ByteArray = new ByteArray();\r
+                       var opad:ByteArray = new ByteArray();\r
+                       var endian:String = Endian.BIG_ENDIAN;\r
+                       \r
+                       if(algorithm == null){\r
+                               algorithm = MD5;\r
+                       }\r
+                       \r
+                       if ( describeType(algorithm).@name.toString() == "com.adobe.crypto::MD5" ) {\r
+                               endian = Endian.LITTLE_ENDIAN;\r
+                       }\r
+                       \r
+                       if ( secret.length > 64 ) {\r
+                               algorithm.hashBytes(secret);\r
+                               secret = new ByteArray();\r
+                               secret.endian = endian;\r
+                               \r
+                               while ( algorithm.digest.bytesAvailable != 0 ) {\r
+                                       secret.writeInt(algorithm.digest.readInt());\r
+                               }\r
+                       }\r
+\r
+                       secret.length = 64\r
+                       secret.position = 0;\r
+                       for ( var x:int = 0; x < 64; x++ ) {\r
+                               var byte:int = secret.readByte();\r
+                               ipad.writeByte(0x36 ^ byte);\r
+                               opad.writeByte(0x5c ^ byte);\r
+                       }\r
+                       \r
+                       ipad.writeBytes(message);\r
+                       algorithm.hashBytes(ipad);\r
+                       var tmp:ByteArray = new ByteArray();\r
+                       tmp.endian = endian;    \r
+                       \r
+                       while ( algorithm.digest.bytesAvailable != 0 ) {\r
+                               tmp.writeInt(algorithm.digest.readInt());\r
+                       }\r
+                       tmp.position = 0;\r
+                       \r
+                       while ( tmp.bytesAvailable != 0 ) {\r
+                               opad.writeByte(tmp.readUnsignedByte());\r
+                       }\r
+                       return algorithm.hashBytes( opad );\r
+               }\r
+               \r
+       }\r
+       \r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5.as
new file mode 100644 (file)
index 0000000..da533cc
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.crypto {
+       
+       import com.adobe.utils.IntUtil;
+       import flash.utils.ByteArray;   
+       /**
+        * The MD5 Message-Digest Algorithm
+        *
+        * Implementation based on algorithm description at 
+        * http://www.faqs.org/rfcs/rfc1321.html
+        */
+       public class MD5 {
+               
+               public static var digest:ByteArray;
+               /**
+                * Performs the MD5 hash algorithm on a string.
+                *
+                * @param s The string to hash
+                * @return A string containing the hash value of s
+                * @langversion ActionScript 3.0
+                * @playerversion Flash 8.5
+                * @tiptext
+                */
+                
+               public static function hash(s:String) :String{
+                       //Convert to byteArray and send through hashBinary function
+                       // so as to only have complex code in one location
+                       var ba:ByteArray = new ByteArray();
+                       ba.writeUTFBytes(s);    
+                       return hashBinary(ba);
+               }
+               
+               public static function hashBytes(s:ByteArray) :String{  
+                       return hashBinary(s);
+               }
+               
+               /**
+                * Performs the MD5 hash algorithm on a ByteArray.
+                *
+                * @param s The string to hash
+                * @return A string containing the hash value of s
+                * @langversion ActionScript 3.0
+                * @playerversion Flash 8.5
+                * @tiptext
+                */      
+               public static function hashBinary( s:ByteArray ):String {
+                       // initialize the md buffers
+                       var a:int = 1732584193;
+                       var b:int = -271733879;
+                       var c:int = -1732584194;
+                       var d:int = 271733878;
+                       
+                       // variables to store previous values
+                       var aa:int;
+                       var bb:int;
+                       var cc:int;
+                       var dd:int;
+                       
+                       // create the blocks from the string and
+                       // save the length as a local var to reduce
+                       // lookup in the loop below
+                       var x:Array = createBlocks( s );
+                       var len:int = x.length;
+                       
+                       // loop over all of the blocks
+                       for ( var i:int = 0; i < len; i += 16) {
+                               // save previous values
+                               aa = a;
+                               bb = b;
+                               cc = c;
+                               dd = d;                         
+                               
+                               // Round 1
+                               a = ff( a, b, c, d, x[int(i+ 0)],  7, -680876936 );     // 1
+                               d = ff( d, a, b, c, x[int(i+ 1)], 12, -389564586 );     // 2
+                               c = ff( c, d, a, b, x[int(i+ 2)], 17, 606105819 );      // 3
+                               b = ff( b, c, d, a, x[int(i+ 3)], 22, -1044525330 );    // 4
+                               a = ff( a, b, c, d, x[int(i+ 4)],  7, -176418897 );     // 5
+                               d = ff( d, a, b, c, x[int(i+ 5)], 12, 1200080426 );     // 6
+                               c = ff( c, d, a, b, x[int(i+ 6)], 17, -1473231341 );    // 7
+                               b = ff( b, c, d, a, x[int(i+ 7)], 22, -45705983 );      // 8
+                               a = ff( a, b, c, d, x[int(i+ 8)],  7, 1770035416 );     // 9
+                               d = ff( d, a, b, c, x[int(i+ 9)], 12, -1958414417 );    // 10
+                               c = ff( c, d, a, b, x[int(i+10)], 17, -42063 );                 // 11
+                               b = ff( b, c, d, a, x[int(i+11)], 22, -1990404162 );    // 12
+                               a = ff( a, b, c, d, x[int(i+12)],  7, 1804603682 );     // 13
+                               d = ff( d, a, b, c, x[int(i+13)], 12, -40341101 );      // 14
+                               c = ff( c, d, a, b, x[int(i+14)], 17, -1502002290 );    // 15
+                               b = ff( b, c, d, a, x[int(i+15)], 22, 1236535329 );     // 16
+                               
+                               // Round 2
+                               a = gg( a, b, c, d, x[int(i+ 1)],  5, -165796510 );     // 17
+                               d = gg( d, a, b, c, x[int(i+ 6)],  9, -1069501632 );    // 18
+                               c = gg( c, d, a, b, x[int(i+11)], 14, 643717713 );      // 19
+                               b = gg( b, c, d, a, x[int(i+ 0)], 20, -373897302 );     // 20
+                               a = gg( a, b, c, d, x[int(i+ 5)],  5, -701558691 );     // 21
+                               d = gg( d, a, b, c, x[int(i+10)],  9, 38016083 );       // 22
+                               c = gg( c, d, a, b, x[int(i+15)], 14, -660478335 );     // 23
+                               b = gg( b, c, d, a, x[int(i+ 4)], 20, -405537848 );     // 24
+                               a = gg( a, b, c, d, x[int(i+ 9)],  5, 568446438 );      // 25
+                               d = gg( d, a, b, c, x[int(i+14)],  9, -1019803690 );    // 26
+                               c = gg( c, d, a, b, x[int(i+ 3)], 14, -187363961 );     // 27
+                               b = gg( b, c, d, a, x[int(i+ 8)], 20, 1163531501 );     // 28
+                               a = gg( a, b, c, d, x[int(i+13)],  5, -1444681467 );    // 29
+                               d = gg( d, a, b, c, x[int(i+ 2)],  9, -51403784 );      // 30
+                               c = gg( c, d, a, b, x[int(i+ 7)], 14, 1735328473 );     // 31
+                               b = gg( b, c, d, a, x[int(i+12)], 20, -1926607734 );    // 32
+                               
+                               // Round 3
+                               a = hh( a, b, c, d, x[int(i+ 5)],  4, -378558 );        // 33
+                               d = hh( d, a, b, c, x[int(i+ 8)], 11, -2022574463 );    // 34
+                               c = hh( c, d, a, b, x[int(i+11)], 16, 1839030562 );     // 35
+                               b = hh( b, c, d, a, x[int(i+14)], 23, -35309556 );      // 36
+                               a = hh( a, b, c, d, x[int(i+ 1)],  4, -1530992060 );    // 37
+                               d = hh( d, a, b, c, x[int(i+ 4)], 11, 1272893353 );     // 38
+                               c = hh( c, d, a, b, x[int(i+ 7)], 16, -155497632 );     // 39
+                               b = hh( b, c, d, a, x[int(i+10)], 23, -1094730640 );    // 40
+                               a = hh( a, b, c, d, x[int(i+13)],  4, 681279174 );      // 41
+                               d = hh( d, a, b, c, x[int(i+ 0)], 11, -358537222 );     // 42
+                               c = hh( c, d, a, b, x[int(i+ 3)], 16, -722521979 );     // 43
+                               b = hh( b, c, d, a, x[int(i+ 6)], 23, 76029189 );       // 44
+                               a = hh( a, b, c, d, x[int(i+ 9)],  4, -640364487 );     // 45
+                               d = hh( d, a, b, c, x[int(i+12)], 11, -421815835 );     // 46
+                               c = hh( c, d, a, b, x[int(i+15)], 16, 530742520 );      // 47
+                               b = hh( b, c, d, a, x[int(i+ 2)], 23, -995338651 );     // 48
+                               
+                               // Round 4
+                               a = ii( a, b, c, d, x[int(i+ 0)],  6, -198630844 );     // 49
+                               d = ii( d, a, b, c, x[int(i+ 7)], 10, 1126891415 );     // 50
+                               c = ii( c, d, a, b, x[int(i+14)], 15, -1416354905 );    // 51
+                               b = ii( b, c, d, a, x[int(i+ 5)], 21, -57434055 );      // 52
+                               a = ii( a, b, c, d, x[int(i+12)],  6, 1700485571 );     // 53
+                               d = ii( d, a, b, c, x[int(i+ 3)], 10, -1894986606 );    // 54
+                               c = ii( c, d, a, b, x[int(i+10)], 15, -1051523 );       // 55
+                               b = ii( b, c, d, a, x[int(i+ 1)], 21, -2054922799 );    // 56
+                               a = ii( a, b, c, d, x[int(i+ 8)],  6, 1873313359 );     // 57
+                               d = ii( d, a, b, c, x[int(i+15)], 10, -30611744 );      // 58
+                               c = ii( c, d, a, b, x[int(i+ 6)], 15, -1560198380 );    // 59
+                               b = ii( b, c, d, a, x[int(i+13)], 21, 1309151649 );     // 60
+                               a = ii( a, b, c, d, x[int(i+ 4)],  6, -145523070 );     // 61
+                               d = ii( d, a, b, c, x[int(i+11)], 10, -1120210379 );    // 62
+                               c = ii( c, d, a, b, x[int(i+ 2)], 15, 718787259 );      // 63
+                               b = ii( b, c, d, a, x[int(i+ 9)], 21, -343485551 );     // 64
+
+                               a += aa;
+                               b += bb;
+                               c += cc;
+                               d += dd;
+                       }
+                       digest = new ByteArray()
+                       digest.writeInt(a);
+                       digest.writeInt(b);
+                       digest.writeInt(c);
+                       digest.writeInt(d);
+                       digest.position = 0;
+                       // Finish up by concatening the buffers with their hex output
+                       return IntUtil.toHex( a ) + IntUtil.toHex( b ) + IntUtil.toHex( c ) + IntUtil.toHex( d );
+               }
+               
+               /**
+                * Auxiliary function f as defined in RFC
+                */
+               private static function f( x:int, y:int, z:int ):int {
+                       return ( x & y ) | ( (~x) & z );
+               }
+               
+               /**
+                * Auxiliary function g as defined in RFC
+                */
+               private static function g( x:int, y:int, z:int ):int {
+                       return ( x & z ) | ( y & (~z) );
+               }
+               
+               /**
+                * Auxiliary function h as defined in RFC
+                */
+               private static function h( x:int, y:int, z:int ):int {
+                       return x ^ y ^ z;
+               }
+               
+               /**
+                * Auxiliary function i as defined in RFC
+                */
+               private static function i( x:int, y:int, z:int ):int {
+                       return y ^ ( x | (~z) );
+               }
+               
+               /**
+                * A generic transformation function.  The logic of ff, gg, hh, and
+                * ii are all the same, minus the function used, so pull that logic
+                * out and simplify the method bodies for the transoformation functions.
+                */
+               private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {
+                       var tmp:int = a + int( func( b, c, d ) ) + x + t;
+                       return IntUtil.rol( tmp, s ) +  b;
+               }
+               
+               /**
+                * ff transformation function
+                */
+               private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+                       return transform( f, a, b, c, d, x, s, t );
+               }
+               
+               /**
+                * gg transformation function
+                */
+               private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+                       return transform( g, a, b, c, d, x, s, t );
+               }
+               
+               /**
+                * hh transformation function
+                */
+               private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+                       return transform( h, a, b, c, d, x, s, t );
+               }
+               
+               /**
+                * ii transformation function
+                */
+               private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
+                       return transform( i, a, b, c, d, x, s, t );
+               }
+               
+               /**
+                * Converts a string to a sequence of 16-word blocks
+                * that we'll do the processing on.  Appends padding
+                * and length in the process.
+                *
+                * @param s The string to split into blocks
+                * @return An array containing the blocks that s was
+                *                      split into.
+                */
+               private static function createBlocks( s:ByteArray ):Array {
+                       var blocks:Array = new Array();
+                       var len:int = s.length * 8;
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+                       for( var i:int = 0; i < len; i += 8 ) {
+                               blocks[ int(i >> 5) ] |= ( s[ i / 8 ] & mask ) << ( i % 32 );
+                       }
+                       
+                       // append padding and length
+                       blocks[ int(len >> 5) ] |= 0x80 << ( len % 32 );
+                       blocks[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;
+                       return blocks;
+               }
+               
+       }
+}
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/MD5Stream.as
new file mode 100644 (file)
index 0000000..6e5eed0
--- /dev/null
@@ -0,0 +1,402 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.crypto\r
+{\r
+    import com.adobe.utils.IntUtil;   \r
+    import flash.utils.ByteArray;\r
+\r
+    /**\r
+     * Perform MD5 hash of an input stream in chunks. This class is\r
+     * based on com.adobe.crypto.MD5 and can process data in\r
+     * chunks. Both block creation and hash computation are done\r
+     * together for whatever input is available so that the memory\r
+     * overhead at a time is always fixed. Memory usage is governed by\r
+     * two parameters: one is the amount of data passed in to update()\r
+     * and the other is memoryBlockSize. The latter comes into play\r
+     * only when the memory window exceeds the pre allocated memory\r
+     * window of flash player. Usage: create an instance, call\r
+     * update(data) repeatedly for all chunks and finally complete()\r
+     * which will return the md5 hash.\r
+     */      \r
+    public class MD5Stream\r
+    {\r
+        private static var mask:int = 0xFF;\r
+\r
+        private var arr:Array = [];\r
+\r
+        /* running count of length */\r
+        private var arrLen:int;\r
+        \r
+        // initialize the md buffers\r
+        private var a:int = 1732584193;\r
+        private var b:int = -271733879;\r
+        private var c:int = -1732584194;\r
+        private var d:int = 271733878;\r
+        \r
+        // variables to store previous values\r
+        private var aa:int;\r
+        private var bb:int;\r
+        private var cc:int;\r
+        private var dd:int;\r
+\r
+        /* index for data read */\r
+        private var arrIndexLen:int = 0;\r
+        /* index for hash computation */\r
+        private var arrProcessIndex:int = 0;\r
+        /* index for removing stale arr values */\r
+        private var cleanIndex:int = 0;\r
+        \r
+        /** \r
+         * Change this value from the default (16384) in the range of\r
+         * MBs to actually affect GC as GC allocates in pools of\r
+         * memory */\r
+        public var memoryBlockSize:int = 16384;\r
+        \r
+        \r
+        public function MD5Stream()\r
+        {\r
+            \r
+        }\r
+               \r
+        \r
+        /**\r
+         * Pass in chunks of the input data with update(), call\r
+         * complete() with an optional chunk which will return the\r
+         * final hash. Equivalent to the way\r
+         * java.security.MessageDigest works.\r
+         *\r
+         * @param input The optional bytearray chunk which is the final part of the input\r
+         * @return A string containing the hash value\r
+         * @langversion ActionScript 3.0\r
+         * @playerversion Flash 8.5\r
+         * @tiptext\r
+         */\r
+        public function complete(input:ByteArray=null):String\r
+        {\r
+            if ( arr.length == 0 )\r
+            {\r
+                if ( input == null )\r
+                {\r
+                    throw new Error("null input to complete without prior call to update. At least an empty bytearray must be passed.");\r
+                }                              \r
+            }\r
+            \r
+            if ( input != null )\r
+            {\r
+                readIntoArray(input);\r
+            }\r
+\r
+            //pad, append length\r
+            padArray(arrLen);\r
+\r
+            hashRemainingChunks(false);\r
+            \r
+            var res:String = IntUtil.toHex( a ) + IntUtil.toHex( b ) + \r
+                                        IntUtil.toHex( c ) + IntUtil.toHex( d );\r
+            resetFields();\r
+            \r
+            return res;\r
+        }\r
+\r
+        /**\r
+         * Pass in chunks of the input data with update(), call\r
+         * complete() with an optional chunk which will return the\r
+         * final hash. Equivalent to the way\r
+         * java.security.MessageDigest works.\r
+         *\r
+         * @param input The bytearray chunk to perform the hash on\r
+         * @langversion ActionScript 3.0\r
+         * @playerversion Flash 8.5\r
+         * @tiptext\r
+         */        \r
+        public function update(input:ByteArray):void\r
+        {\r
+            readIntoArray(input);\r
+            hashRemainingChunks();\r
+        }\r
+\r
+        /**\r
+         * Re-initialize this instance for use to perform hashing on\r
+         * another input stream. This is called automatically by\r
+         * complete().\r
+         *\r
+         * @langversion ActionScript 3.0\r
+         * @playerversion Flash 8.5\r
+         * @tiptext\r
+         */               \r
+        public function resetFields():void\r
+        {\r
+            //truncate array\r
+            arr.length = 0;\r
+            arrLen = 0;\r
+            \r
+            // initialize the md buffers\r
+            a = 1732584193;\r
+            b = -271733879;\r
+            c = -1732584194;\r
+            d = 271733878;\r
+            \r
+            // variables to store previous values\r
+            aa = 0;\r
+            bb = 0;\r
+            cc = 0;\r
+            dd = 0;\r
+            \r
+            arrIndexLen = 0;            \r
+            arrProcessIndex = 0;\r
+            cleanIndex = 0;\r
+        }\r
+        \r
+        /** read into arr and free up used blocks of arr */\r
+        private function readIntoArray(input:ByteArray):void\r
+        {\r
+            var closestChunkLen:int = input.length * 8;\r
+            arrLen += closestChunkLen;\r
+            \r
+            /* clean up memory. if there are entries in the array that\r
+             * are already processed and the amount is greater than\r
+             * memoryBlockSize, create a new array, copy the last\r
+             * block into it and let the old one get picked up by\r
+             * GC. */\r
+            if ( arrProcessIndex - cleanIndex > memoryBlockSize )\r
+            {\r
+                var newarr:Array= new Array();\r
+                \r
+                /* AS Arrays in sparse arrays. arr[2002] can exist \r
+                 * without values for arr[0] - arr[2001] */\r
+                for ( var j:int = arrProcessIndex; j < arr.length; j++ )\r
+                {                                              \r
+                    newarr[j] = arr[j];\r
+                }\r
+                \r
+                cleanIndex = arrProcessIndex;\r
+                arr = null;\r
+                arr = newarr;\r
+            }\r
+            \r
+            for ( var k:int = 0; k < closestChunkLen; k+=8 )\r
+            {\r
+                //discard high bytes (convert to uint)\r
+                arr[ int(arrIndexLen >> 5) ] |= ( input[ k / 8 ] & mask ) << ( arrIndexLen % 32 );\r
+                arrIndexLen += 8;\r
+            }\r
+            \r
+            \r
+        }\r
+        \r
+        private function hashRemainingChunks(bUpdate:Boolean=true):void\r
+        {\r
+            var len:int = arr.length;\r
+\r
+            /* leave a 16 word block untouched if we are called from\r
+             * update. This is because, padArray() can modify the last\r
+             * block and this modification has to happen before we\r
+             * compute the hash.  */\r
+            if ( bUpdate )\r
+            {\r
+                len -= 16;\r
+            }\r
+\r
+            /* don't do anything if don't have a 16 word block. */\r
+            if ( arrProcessIndex >= len || len - arrProcessIndex < 15 )\r
+            {\r
+                return;\r
+            }\r
+\r
+            \r
+            for ( var i:int = arrProcessIndex; i < len ; i += 16, arrProcessIndex += 16) \r
+            {                  \r
+                // save previous values\r
+                aa = a;\r
+                bb = b;\r
+                cc = c;\r
+                dd = d;                         \r
+                \r
+                // Round 1\r
+                a = ff( a, b, c, d, arr[int(i+ 0)],  7, -680876936 );     // 1\r
+                d = ff( d, a, b, c, arr[int(i+ 1)], 12, -389564586 );     // 2\r
+                c = ff( c, d, a, b, arr[int(i+ 2)], 17, 606105819 );      // 3\r
+                b = ff( b, c, d, a, arr[int(i+ 3)], 22, -1044525330 );    // 4\r
+                a = ff( a, b, c, d, arr[int(i+ 4)],  7, -176418897 );     // 5\r
+                d = ff( d, a, b, c, arr[int(i+ 5)], 12, 1200080426 );     // 6\r
+                c = ff( c, d, a, b, arr[int(i+ 6)], 17, -1473231341 );    // 7\r
+                b = ff( b, c, d, a, arr[int(i+ 7)], 22, -45705983 );      // 8\r
+                a = ff( a, b, c, d, arr[int(i+ 8)],  7, 1770035416 );     // 9\r
+                d = ff( d, a, b, c, arr[int(i+ 9)], 12, -1958414417 );    // 10\r
+                c = ff( c, d, a, b, arr[int(i+10)], 17, -42063 );                 // 11\r
+                b = ff( b, c, d, a, arr[int(i+11)], 22, -1990404162 );    // 12\r
+                a = ff( a, b, c, d, arr[int(i+12)],  7, 1804603682 );     // 13\r
+                d = ff( d, a, b, c, arr[int(i+13)], 12, -40341101 );      // 14\r
+                c = ff( c, d, a, b, arr[int(i+14)], 17, -1502002290 );    // 15\r
+                b = ff( b, c, d, a, arr[int(i+15)], 22, 1236535329 );     // 16\r
+                \r
+                // Round 2\r
+                a = gg( a, b, c, d, arr[int(i+ 1)],  5, -165796510 );     // 17\r
+                d = gg( d, a, b, c, arr[int(i+ 6)],  9, -1069501632 );    // 18\r
+                c = gg( c, d, a, b, arr[int(i+11)], 14, 643717713 );      // 19\r
+                b = gg( b, c, d, a, arr[int(i+ 0)], 20, -373897302 );     // 20\r
+                a = gg( a, b, c, d, arr[int(i+ 5)],  5, -701558691 );     // 21\r
+                d = gg( d, a, b, c, arr[int(i+10)],  9, 38016083 );       // 22\r
+                c = gg( c, d, a, b, arr[int(i+15)], 14, -660478335 );     // 23\r
+                b = gg( b, c, d, a, arr[int(i+ 4)], 20, -405537848 );     // 24\r
+                a = gg( a, b, c, d, arr[int(i+ 9)],  5, 568446438 );      // 25\r
+                d = gg( d, a, b, c, arr[int(i+14)],  9, -1019803690 );    // 26\r
+                c = gg( c, d, a, b, arr[int(i+ 3)], 14, -187363961 );     // 27\r
+                b = gg( b, c, d, a, arr[int(i+ 8)], 20, 1163531501 );     // 28\r
+                a = gg( a, b, c, d, arr[int(i+13)],  5, -1444681467 );    // 29\r
+                d = gg( d, a, b, c, arr[int(i+ 2)],  9, -51403784 );      // 30\r
+                c = gg( c, d, a, b, arr[int(i+ 7)], 14, 1735328473 );     // 31\r
+                b = gg( b, c, d, a, arr[int(i+12)], 20, -1926607734 );    // 32\r
+                \r
+                // Round 3\r
+                a = hh( a, b, c, d, arr[int(i+ 5)],  4, -378558 );        // 33\r
+                d = hh( d, a, b, c, arr[int(i+ 8)], 11, -2022574463 );    // 34\r
+                c = hh( c, d, a, b, arr[int(i+11)], 16, 1839030562 );     // 35\r
+                b = hh( b, c, d, a, arr[int(i+14)], 23, -35309556 );      // 36\r
+                a = hh( a, b, c, d, arr[int(i+ 1)],  4, -1530992060 );    // 37\r
+                d = hh( d, a, b, c, arr[int(i+ 4)], 11, 1272893353 );     // 38\r
+                c = hh( c, d, a, b, arr[int(i+ 7)], 16, -155497632 );     // 39\r
+                b = hh( b, c, d, a, arr[int(i+10)], 23, -1094730640 );    // 40\r
+                a = hh( a, b, c, d, arr[int(i+13)],  4, 681279174 );      // 41\r
+                d = hh( d, a, b, c, arr[int(i+ 0)], 11, -358537222 );     // 42\r
+                c = hh( c, d, a, b, arr[int(i+ 3)], 16, -722521979 );     // 43\r
+                b = hh( b, c, d, a, arr[int(i+ 6)], 23, 76029189 );       // 44\r
+                a = hh( a, b, c, d, arr[int(i+ 9)],  4, -640364487 );     // 45\r
+                d = hh( d, a, b, c, arr[int(i+12)], 11, -421815835 );     // 46\r
+                c = hh( c, d, a, b, arr[int(i+15)], 16, 530742520 );      // 47\r
+                b = hh( b, c, d, a, arr[int(i+ 2)], 23, -995338651 );     // 48\r
+                \r
+                // Round 4\r
+                a = ii( a, b, c, d, arr[int(i+ 0)],  6, -198630844 );     // 49\r
+                d = ii( d, a, b, c, arr[int(i+ 7)], 10, 1126891415 );     // 50\r
+                c = ii( c, d, a, b, arr[int(i+14)], 15, -1416354905 );    // 51\r
+                b = ii( b, c, d, a, arr[int(i+ 5)], 21, -57434055 );      // 52\r
+                a = ii( a, b, c, d, arr[int(i+12)],  6, 1700485571 );     // 53\r
+                d = ii( d, a, b, c, arr[int(i+ 3)], 10, -1894986606 );    // 54\r
+                c = ii( c, d, a, b, arr[int(i+10)], 15, -1051523 );       // 55\r
+                b = ii( b, c, d, a, arr[int(i+ 1)], 21, -2054922799 );    // 56\r
+                a = ii( a, b, c, d, arr[int(i+ 8)],  6, 1873313359 );     // 57\r
+                d = ii( d, a, b, c, arr[int(i+15)], 10, -30611744 );      // 58\r
+                c = ii( c, d, a, b, arr[int(i+ 6)], 15, -1560198380 );    // 59\r
+                b = ii( b, c, d, a, arr[int(i+13)], 21, 1309151649 );     // 60\r
+                a = ii( a, b, c, d, arr[int(i+ 4)],  6, -145523070 );     // 61\r
+                d = ii( d, a, b, c, arr[int(i+11)], 10, -1120210379 );    // 62\r
+                c = ii( c, d, a, b, arr[int(i+ 2)], 15, 718787259 );      // 63\r
+                b = ii( b, c, d, a, arr[int(i+ 9)], 21, -343485551 );     // 64\r
+                \r
+                a += aa;\r
+                b += bb;\r
+                c += cc;\r
+                d += dd;\r
+                \r
+            }\r
+            \r
+        }\r
+        \r
+        private function padArray(len:int):void\r
+        {                      \r
+            arr[ int(len >> 5) ] |= 0x80 << ( len % 32 );\r
+            arr[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;\r
+            arrLen = arr.length;\r
+        }  \r
+        \r
+        /* Code below same as com.adobe.crypto.MD5 */ \r
+        \r
+        /**\r
+         * Auxiliary function f as defined in RFC\r
+         */\r
+        private static function f( x:int, y:int, z:int ):int {\r
+            return ( x & y ) | ( (~x) & z );\r
+        }\r
+        \r
+        /**\r
+         * Auxiliary function g as defined in RFC\r
+         */\r
+        private static function g( x:int, y:int, z:int ):int {\r
+            return ( x & z ) | ( y & (~z) );\r
+        }\r
+        \r
+        /**\r
+         * Auxiliary function h as defined in RFC\r
+         */\r
+        private static function h( x:int, y:int, z:int ):int {\r
+            return x ^ y ^ z;\r
+        }\r
+        \r
+        /**\r
+         * Auxiliary function i as defined in RFC\r
+         */\r
+        private static function i( x:int, y:int, z:int ):int {\r
+            return y ^ ( x | (~z) );\r
+        }\r
+        \r
+        /**\r
+         * A generic transformation function.  The logic of ff, gg, hh, and\r
+         * ii are all the same, minus the function used, so pull that logic\r
+         * out and simplify the method bodies for the transoformation functions.\r
+         */\r
+        private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {\r
+            var tmp:int = a + int( func( b, c, d ) ) + x + t;\r
+            return IntUtil.rol( tmp, s ) +  b;\r
+        }\r
+        \r
+        /**\r
+         * ff transformation function\r
+         */\r
+        private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
+            return transform( f, a, b, c, d, x, s, t );\r
+        }\r
+        \r
+        /**\r
+         * gg transformation function\r
+         */\r
+        private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
+            return transform( g, a, b, c, d, x, s, t );\r
+        }\r
+        \r
+        /**\r
+         * hh transformation function\r
+         */\r
+        private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
+            return transform( h, a, b, c, d, x, s, t );\r
+        }\r
+        \r
+        /**\r
+         * ii transformation function\r
+         */\r
+        private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
+            return transform( i, a, b, c, d, x, s, t );\r
+        }\r
+        \r
+    }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA1.as
new file mode 100644 (file)
index 0000000..952f3c7
--- /dev/null
@@ -0,0 +1,271 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.crypto\r
+{\r
+       import com.adobe.utils.IntUtil;\r
+       import flash.utils.ByteArray;\r
+       import mx.utils.Base64Encoder;\r
+       \r
+       /**\r
+        *  US Secure Hash Algorithm 1 (SHA1)\r
+        *\r
+        *  Implementation based on algorithm description at \r
+        *  http://www.faqs.org/rfcs/rfc3174.html\r
+        */\r
+       public class SHA1\r
+       {\r
+               public static var digest:ByteArray;\r
+               \r
+               /**\r
+                *  Performs the SHA1 hash algorithm on a string.\r
+                *\r
+                *  @param s            The string to hash\r
+                *  @return                     A string containing the hash value of s\r
+                *  @langversion        ActionScript 3.0\r
+                *  @playerversion      9.0\r
+                *  @tiptext\r
+                */\r
+               public static function hash( s:String ):String\r
+               {\r
+                       var blocks:Array = createBlocksFromString( s );\r
+                       var byteArray:ByteArray = hashBlocks( blocks );\r
+                       \r
+                       return IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true );\r
+               }\r
+               \r
+               /**\r
+                *  Performs the SHA1 hash algorithm on a ByteArray.\r
+                *\r
+                *  @param data         The ByteArray data to hash\r
+                *  @return                     A string containing the hash value of data\r
+                *  @langversion        ActionScript 3.0\r
+                *  @playerversion      9.0\r
+                */\r
+               public static function hashBytes( data:ByteArray ):String\r
+               {\r
+                       var blocks:Array = SHA1.createBlocksFromByteArray( data );\r
+                       var byteArray:ByteArray = hashBlocks(blocks);\r
+                       \r
+                       return IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true )\r
+                                       + IntUtil.toHex( byteArray.readInt(), true );\r
+               }\r
+               \r
+               /**\r
+                *  Performs the SHA1 hash algorithm on a string, then does\r
+                *  Base64 encoding on the result.\r
+                *\r
+                *  @param s            The string to hash\r
+                *  @return                     The base64 encoded hash value of s\r
+                *  @langversion        ActionScript 3.0\r
+                *  @playerversion      9.0\r
+                *  @tiptext\r
+                */\r
+               public static function hashToBase64( s:String ):String\r
+               {\r
+                       var blocks:Array = SHA1.createBlocksFromString( s );\r
+                       var byteArray:ByteArray = hashBlocks(blocks);\r
+\r
+                       // ByteArray.toString() returns the contents as a UTF-8 string,\r
+                       // which we can't use because certain byte sequences might trigger\r
+                       // a UTF-8 conversion.  Instead, we convert the bytes to characters\r
+                       // one by one.\r
+                       var charsInByteArray:String = "";\r
+                       byteArray.position = 0;\r
+                       for (var j:int = 0; j < byteArray.length; j++)\r
+                       {\r
+                               var byte:uint = byteArray.readUnsignedByte();\r
+                               charsInByteArray += String.fromCharCode(byte);\r
+                       }\r
+\r
+                       var encoder:Base64Encoder = new Base64Encoder();\r
+                       encoder.encode(charsInByteArray);\r
+                       return encoder.flush();\r
+               }\r
+               \r
+               private static function hashBlocks( blocks:Array ):ByteArray\r
+               {\r
+                       // initialize the h's\r
+                       var h0:int = 0x67452301;\r
+                       var h1:int = 0xefcdab89;\r
+                       var h2:int = 0x98badcfe;\r
+                       var h3:int = 0x10325476;\r
+                       var h4:int = 0xc3d2e1f0;\r
+                       \r
+                       var len:int = blocks.length;\r
+                       var w:Array = new Array( 80 );\r
+                       \r
+                       // loop over all of the blocks\r
+                       for ( var i:int = 0; i < len; i += 16 ) {\r
+                       \r
+                               // 6.1.c\r
+                               var a:int = h0;\r
+                               var b:int = h1;\r
+                               var c:int = h2;\r
+                               var d:int = h3;\r
+                               var e:int = h4;\r
+                               \r
+                               // 80 steps to process each block\r
+                               // TODO: unroll for faster execution, or 4 loops of\r
+                               // 20 each to avoid the k and f function calls\r
+                               for ( var t:int = 0; t < 80; t++ ) {\r
+                                       \r
+                                       if ( t < 16 ) {\r
+                                               // 6.1.a\r
+                                               w[ t ] = blocks[ i + t ];\r
+                                       } else {\r
+                                               // 6.1.b\r
+                                               w[ t ] = IntUtil.rol( w[ t - 3 ] ^ w[ t - 8 ] ^ w[ t - 14 ] ^ w[ t - 16 ], 1 );\r
+                                       }\r
+                                       \r
+                                       // 6.1.d\r
+                                       var temp:int = IntUtil.rol( a, 5 ) + f( t, b, c, d ) + e + int( w[ t ] ) + k( t );\r
+                                       \r
+                                       e = d;\r
+                                       d = c;\r
+                                       c = IntUtil.rol( b, 30 );\r
+                                       b = a;\r
+                                       a = temp;\r
+                               }\r
+                               \r
+                               // 6.1.e\r
+                               h0 += a;\r
+                               h1 += b;\r
+                               h2 += c;\r
+                               h3 += d;\r
+                               h4 += e;                \r
+                       }\r
+                       \r
+                       var byteArray:ByteArray = new ByteArray();\r
+                       byteArray.writeInt(h0);\r
+                       byteArray.writeInt(h1);\r
+                       byteArray.writeInt(h2);\r
+                       byteArray.writeInt(h3);\r
+                       byteArray.writeInt(h4);\r
+                       byteArray.position = 0;\r
+                       \r
+                       digest = new ByteArray();\r
+                       digest.writeBytes(byteArray);\r
+                       digest.position = 0;\r
+                       return byteArray;\r
+               }\r
+\r
+               /**\r
+                *  Performs the logical function based on t\r
+                */\r
+               private static function f( t:int, b:int, c:int, d:int ):int {\r
+                       if ( t < 20 ) {\r
+                               return ( b & c ) | ( ~b & d );\r
+                       } else if ( t < 40 ) {\r
+                               return b ^ c ^ d;\r
+                       } else if ( t < 60 ) {\r
+                               return ( b & c ) | ( b & d ) | ( c & d );\r
+                       }\r
+                       return b ^ c ^ d;\r
+               }\r
+               \r
+               /**\r
+                *  Determines the constant value based on t\r
+                */\r
+               private static function k( t:int ):int {\r
+                       if ( t < 20 ) {\r
+                               return 0x5a827999;\r
+                       } else if ( t < 40 ) {\r
+                               return 0x6ed9eba1;\r
+                       } else if ( t < 60 ) {\r
+                               return 0x8f1bbcdc;\r
+                       }\r
+                       return 0xca62c1d6;\r
+               }\r
+                                       \r
+               /**\r
+                *  Converts a ByteArray to a sequence of 16-word blocks\r
+                *  that we'll do the processing on.  Appends padding\r
+                *  and length in the process.\r
+                *\r
+                *  @param data         The data to split into blocks\r
+                *  @return                     An array containing the blocks into which data was split\r
+                */\r
+               private static function createBlocksFromByteArray( data:ByteArray ):Array\r
+               {\r
+                       var oldPosition:int = data.position;\r
+                       data.position = 0;\r
+                       \r
+                       var blocks:Array = new Array();\r
+                       var len:int = data.length * 8;\r
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
+                       for( var i:int = 0; i < len; i += 8 )\r
+                       {\r
+                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );\r
+                       }\r
+                       \r
+                       // append padding and length\r
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
+                       \r
+                       data.position = oldPosition;\r
+                       \r
+                       return blocks;\r
+               }\r
+                                       \r
+               /**\r
+                *  Converts a string to a sequence of 16-word blocks\r
+                *  that we'll do the processing on.  Appends padding\r
+                *  and length in the process.\r
+                *\r
+                *  @param s    The string to split into blocks\r
+                *  @return             An array containing the blocks that s was split into.\r
+                */\r
+               private static function createBlocksFromString( s:String ):Array\r
+               {\r
+                       var blocks:Array = new Array();\r
+                       var len:int = s.length * 8;\r
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
+                       for( var i:int = 0; i < len; i += 8 ) {\r
+                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );\r
+                       }\r
+                       \r
+                       // append padding and length\r
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
+                       return blocks;\r
+               }\r
+               \r
+       }\r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA224.as
new file mode 100644 (file)
index 0000000..ee15453
--- /dev/null
@@ -0,0 +1,257 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.crypto
+{
+       import com.adobe.utils.IntUtil;
+       import flash.utils.ByteArray;
+       import mx.utils.Base64Encoder;
+       
+       /**
+        * The SHA-224 algorithm
+        * 
+        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
+        */
+       public class SHA224
+       {
+               public static var digest:ByteArray;
+               
+               /**
+                *  Performs the SHA224 hash algorithm on a string.
+                *
+                *  @param s            The string to hash
+                *  @return                     A string containing the hash value of s
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                *  @tiptext
+                */
+               public static function hash( s:String ):String {
+                       var blocks:Array = createBlocksFromString( s );
+                       var byteArray:ByteArray = hashBlocks( blocks );
+                       return IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true );
+               }
+               
+               /**
+                *  Performs the SHA224 hash algorithm on a ByteArray.
+                *
+                *  @param data         The ByteArray data to hash
+                *  @return                     A string containing the hash value of data
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                */
+               public static function hashBytes( data:ByteArray ):String
+               {
+                       var blocks:Array = createBlocksFromByteArray( data );
+                       var byteArray:ByteArray = hashBlocks(blocks);
+                       return IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true );
+               }
+               
+               /**
+                *  Performs the SHA224 hash algorithm on a string, then does
+                *  Base64 encoding on the result.
+                *
+                *  @param s            The string to hash
+                *  @return                     The base64 encoded hash value of s
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                *  @tiptext
+                */
+               public static function hashToBase64( s:String ):String
+               {
+                       var blocks:Array = createBlocksFromString( s );
+                       var byteArray:ByteArray = hashBlocks(blocks);
+
+                       // ByteArray.toString() returns the contents as a UTF-8 string,
+                       // which we can't use because certain byte sequences might trigger
+                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
+                       // one by one.
+                       var charsInByteArray:String = "";
+                       byteArray.position = 0;
+                       for (var j:int = 0; j < byteArray.length; j++)
+                       {
+                               var byte:uint = byteArray.readUnsignedByte();
+                               charsInByteArray += String.fromCharCode(byte);
+                       }
+
+                       var encoder:Base64Encoder = new Base64Encoder();
+                       encoder.encode(charsInByteArray);
+                       return encoder.flush();
+               }
+               
+               private static function hashBlocks( blocks:Array ):ByteArray {
+                       var h0:int = 0xc1059ed8;
+                       var h1:int = 0x367cd507;
+                       var h2:int = 0x3070dd17;
+                       var h3:int = 0xf70e5939;
+                       var h4:int = 0xffc00b31;
+                       var h5:int = 0x68581511;
+                       var h6:int = 0x64f98fa7;
+                       var h7:int = 0xbefa4fa4;
+                       
+                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
+                       
+                       var len:int = blocks.length;
+                       var w:Array = new Array();
+                       
+                       // loop over all of the blocks
+                       for ( var i:int = 0; i < len; i += 16 ) {
+                               
+                               var a:int = h0;
+                               var b:int = h1;
+                               var c:int = h2;
+                               var d:int = h3;
+                               var e:int = h4;
+                               var f:int = h5;
+                               var g:int = h6;
+                               var h:int = h7;
+                               
+                               for(var t:int = 0; t < 64; t++) {
+                                       
+                                       if ( t < 16 ) {
+                                               w[t] = blocks[ i + t ];
+                                               if(isNaN(w[t])) { w[t] = 0; }
+                                       } else {
+                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
+                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
+                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
+                                       }
+                                       
+                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
+                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
+                                       var t2:int = s0 + maj;
+                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
+                                       var ch:int = (e & f) ^ ((~e) & g);
+                                       var t1:int = h + s1 + ch + k[t] + w[t];
+                                       
+                                       h = g;
+                                       g = f;
+                                       f = e;
+                                       e = d + t1;
+                                       d = c;
+                                       c = b;
+                                       b = a;
+                                       a = t1 + t2;
+                               }
+                                       
+                               //Add this chunk's hash to result so far:
+                               h0 += a;
+                               h1 += b;
+                               h2 += c;
+                               h3 += d;
+                               h4 += e;
+                               h5 += f;
+                               h6 += g;
+                               h7 += h;
+                       }
+                       
+                       var byteArray:ByteArray = new ByteArray();
+                       byteArray.writeInt(h0);
+                       byteArray.writeInt(h1);
+                       byteArray.writeInt(h2);
+                       byteArray.writeInt(h3);
+                       byteArray.writeInt(h4);
+                       byteArray.writeInt(h5);
+                       byteArray.writeInt(h6);
+                       byteArray.position = 0;
+                       
+                       digest = new ByteArray();
+                       digest.writeBytes(byteArray);
+                       digest.position = 0;
+                       return byteArray;
+               }
+               
+               /**
+                *  Converts a ByteArray to a sequence of 16-word blocks
+                *  that we'll do the processing on.  Appends padding
+                *  and length in the process.
+                *
+                *  @param data         The data to split into blocks
+                *  @return                     An array containing the blocks into which data was split
+                */
+               private static function createBlocksFromByteArray( data:ByteArray ):Array
+               {
+                       var oldPosition:int = data.position;
+                       data.position = 0;
+                       
+                       var blocks:Array = new Array();
+                       var len:int = data.length * 8;
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+                       for( var i:int = 0; i < len; i += 8 )
+                       {
+                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
+                       }
+                       
+                       // append padding and length
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
+                       
+                       data.position = oldPosition;
+                       
+                       return blocks;
+               }
+                                       
+               /**
+                *  Converts a string to a sequence of 16-word blocks
+                *  that we'll do the processing on.  Appends padding
+                *  and length in the process.
+                *
+                *  @param s    The string to split into blocks
+                *  @return             An array containing the blocks that s was split into.
+                */
+               private static function createBlocksFromString( s:String ):Array
+               {
+                       var blocks:Array = new Array();
+                       var len:int = s.length * 8;
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+                       for( var i:int = 0; i < len; i += 8 ) {
+                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
+                       }
+                       
+                       // append padding and length
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
+                       return blocks;
+               }
+       }
+}
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/SHA256.as
new file mode 100644 (file)
index 0000000..09a2ba2
--- /dev/null
@@ -0,0 +1,261 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.crypto
+{
+       import com.adobe.utils.IntUtil;
+       import flash.utils.ByteArray;
+       import mx.utils.Base64Encoder;
+       
+       /**
+        * The SHA-256 algorithm
+        * 
+        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
+        */
+       public class SHA256
+       {
+               public static var digest:ByteArray;
+               /**
+                *  Performs the SHA256 hash algorithm on a string.
+                *
+                *  @param s            The string to hash
+                *  @return                     A string containing the hash value of s
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                *  @tiptext
+                */
+               public static function hash( s:String ):String {
+                       var blocks:Array = createBlocksFromString( s );
+                       var byteArray:ByteArray = hashBlocks( blocks );
+                       
+                       return IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true );
+               }
+               
+               /**
+                *  Performs the SHA256 hash algorithm on a ByteArray.
+                *
+                *  @param data         The ByteArray data to hash
+                *  @return                     A string containing the hash value of data
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                */
+               public static function hashBytes( data:ByteArray ):String
+               {
+                       var blocks:Array = createBlocksFromByteArray( data );
+                       var byteArray:ByteArray = hashBlocks(blocks);
+                       
+                       return IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true )
+                                       + IntUtil.toHex( byteArray.readInt(), true );
+               }
+               
+               /**
+                *  Performs the SHA256 hash algorithm on a string, then does
+                *  Base64 encoding on the result.
+                *
+                *  @param s            The string to hash
+                *  @return                     The base64 encoded hash value of s
+                *  @langversion        ActionScript 3.0
+                *  @playerversion      9.0
+                *  @tiptext
+                */
+               public static function hashToBase64( s:String ):String
+               {
+                       var blocks:Array = createBlocksFromString( s );
+                       var byteArray:ByteArray = hashBlocks(blocks);
+
+                       // ByteArray.toString() returns the contents as a UTF-8 string,
+                       // which we can't use because certain byte sequences might trigger
+                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
+                       // one by one.
+                       var charsInByteArray:String = "";
+                       byteArray.position = 0;
+                       for (var j:int = 0; j < byteArray.length; j++)
+                       {
+                               var byte:uint = byteArray.readUnsignedByte();
+                               charsInByteArray += String.fromCharCode(byte);
+                       }
+
+                       var encoder:Base64Encoder = new Base64Encoder();
+                       encoder.encode(charsInByteArray);
+                       return encoder.flush();
+               }
+               
+               private static function hashBlocks( blocks:Array ):ByteArray {
+                       var h0:int = 0x6a09e667;
+                       var h1:int = 0xbb67ae85;
+                       var h2:int = 0x3c6ef372;
+                       var h3:int = 0xa54ff53a;
+                       var h4:int = 0x510e527f;
+                       var h5:int = 0x9b05688c;
+                       var h6:int = 0x1f83d9ab;
+                       var h7:int = 0x5be0cd19;
+                       
+                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
+                       
+                       var len:int = blocks.length;
+                       var w:Array = new Array( 64 );
+                       
+                       // loop over all of the blocks
+                       for ( var i:int = 0; i < len; i += 16 ) {
+                               
+                               var a:int = h0;
+                               var b:int = h1;
+                               var c:int = h2;
+                               var d:int = h3;
+                               var e:int = h4;
+                               var f:int = h5;
+                               var g:int = h6;
+                               var h:int = h7;
+                               
+                               for(var t:int = 0; t < 64; t++) {
+                                       
+                                       if ( t < 16 ) {
+                                               w[t] = blocks[ i + t ];
+                                               if(isNaN(w[t])) { w[t] = 0; }
+                                       } else {
+                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
+                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
+                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
+                                       }
+                                       
+                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
+                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
+                                       var t2:int = s0 + maj;
+                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
+                                       var ch:int = (e & f) ^ ((~e) & g);
+                                       var t1:int = h + s1 + ch + k[t] + w[t];
+                                       
+                                       h = g;
+                                       g = f;
+                                       f = e;
+                                       e = d + t1;
+                                       d = c;
+                                       c = b;
+                                       b = a;
+                                       a = t1 + t2;
+                               }
+                                       
+                               //Add this chunk's hash to result so far:
+                               h0 += a;
+                               h1 += b;
+                               h2 += c;
+                               h3 += d;
+                               h4 += e;
+                               h5 += f;
+                               h6 += g;
+                               h7 += h;
+                       }
+                       
+                       var byteArray:ByteArray = new ByteArray();
+                       byteArray.writeInt(h0);
+                       byteArray.writeInt(h1);
+                       byteArray.writeInt(h2);
+                       byteArray.writeInt(h3);
+                       byteArray.writeInt(h4);
+                       byteArray.writeInt(h5);
+                       byteArray.writeInt(h6);
+                       byteArray.writeInt(h7);
+                       byteArray.position = 0;
+                       
+                       digest = new ByteArray();
+                       digest.writeBytes(byteArray);
+                       digest.position = 0;
+                       return byteArray;
+               }
+               
+               /**
+                *  Converts a ByteArray to a sequence of 16-word blocks
+                *  that we'll do the processing on.  Appends padding
+                *  and length in the process.
+                *
+                *  @param data         The data to split into blocks
+                *  @return                     An array containing the blocks into which data was split
+                */
+               private static function createBlocksFromByteArray( data:ByteArray ):Array
+               {
+                       var oldPosition:int = data.position;
+                       data.position = 0;
+                       
+                       var blocks:Array = new Array();
+                       var len:int = data.length * 8;
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+                       for( var i:int = 0; i < len; i += 8 )
+                       {
+                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
+                       }
+                       
+                       // append padding and length
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
+                       
+                       data.position = oldPosition;
+                       
+                       return blocks;
+               }
+                                       
+               /**
+                *  Converts a string to a sequence of 16-word blocks
+                *  that we'll do the processing on.  Appends padding
+                *  and length in the process.
+                *
+                *  @param s    The string to split into blocks
+                *  @return             An array containing the blocks that s was split into.
+                */
+               private static function createBlocksFromString( s:String ):Array
+               {
+                       var blocks:Array = new Array();
+                       var len:int = s.length * 8;
+                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
+                       for( var i:int = 0; i < len; i += 8 ) {
+                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
+                       }
+                       
+                       // append padding and length
+                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
+                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
+                       return blocks;
+               }
+       }
+}
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as b/redakcja/static/filebrowser/uploadify/com/adobe/crypto/WSSEUsernameToken.as
new file mode 100644 (file)
index 0000000..92bbba6
--- /dev/null
@@ -0,0 +1,114 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.crypto\r
+{\r
+       import mx.formatters.DateFormatter;\r
+       import mx.utils.Base64Encoder;\r
+       \r
+       /**\r
+        * Web Services Security Username Token\r
+        *\r
+        * Implementation based on algorithm description at \r
+        * http://www.oasis-open.org/committees/wss/documents/WSS-Username-02-0223-merged.pdf\r
+        */\r
+       public class WSSEUsernameToken\r
+       {\r
+               /**\r
+                * Generates a WSSE Username Token.\r
+                *\r
+                * @param username The username\r
+                * @param password The password\r
+                * @param nonce A cryptographically random nonce (if null, the nonce\r
+                * will be generated)\r
+                * @param timestamp The time at which the token is generated (if null,\r
+                * the time will be set to the moment of execution)\r
+                * @return The generated token\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function getUsernameToken(username:String, password:String, nonce:String=null, timestamp:Date=null):String\r
+               {\r
+                       if (nonce == null)\r
+                       {\r
+                               nonce = generateNonce();\r
+                       }\r
+                       nonce = base64Encode(nonce);\r
+               \r
+                       var created:String = generateTimestamp(timestamp);\r
+               \r
+                       var password64:String = getBase64Digest(nonce,\r
+                               created,\r
+                               password);\r
+               \r
+                       var token:String = new String("UsernameToken Username=\"");\r
+                       token += username + "\", " +\r
+                                        "PasswordDigest=\"" + password64 + "\", " +\r
+                                        "Nonce=\"" + nonce + "\", " +\r
+                                        "Created=\"" + created + "\"";\r
+                       return token;\r
+               }\r
+               \r
+               private static function generateNonce():String\r
+               {\r
+                       // Math.random returns a Number between 0 and 1.  We don't want our\r
+                       // nonce to contain invalid characters (e.g. the period) so we\r
+                       // strip them out before returning the result.\r
+                       var s:String =  Math.random().toString();\r
+                       return s.replace(".", "");\r
+               }\r
+               \r
+               internal static function base64Encode(s:String):String\r
+               {\r
+                       var encoder:Base64Encoder = new Base64Encoder();\r
+                       encoder.encode(s);\r
+                       return encoder.flush();\r
+               }\r
+               \r
+               internal static function generateTimestamp(timestamp:Date):String\r
+               {\r
+                       if (timestamp == null)\r
+                       {\r
+                               timestamp = new Date();\r
+                       }\r
+                       var dateFormatter:DateFormatter = new DateFormatter();\r
+                       dateFormatter.formatString = "YYYY-MM-DDTJJ:NN:SS"\r
+                       return dateFormatter.format(timestamp) + "Z";\r
+               }\r
+               \r
+               internal static function getBase64Digest(nonce:String, created:String, password:String):String\r
+               {\r
+                       return SHA1.hashToBase64(nonce + created + password);\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as b/redakcja/static/filebrowser/uploadify/com/adobe/errors/IllegalStateError.as
new file mode 100644 (file)
index 0000000..fa16191
--- /dev/null
@@ -0,0 +1,63 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.errors\r
+{\r
+       /**\r
+       * This class represents an Error that is thrown when a method is called when\r
+       * the receiving instance is in an invalid state.\r
+       *\r
+       * For example, this may occur if a method has been called, and other properties\r
+       * in the instance have not been initialized properly.\r
+       *\r
+       * @langversion ActionScript 3.0\r
+       * @playerversion Flash 9.0\r
+       * @tiptext\r
+       *\r
+       */\r
+       public class IllegalStateError extends Error\r
+       {\r
+               /**\r
+               *       Constructor\r
+               *\r
+               *       @param message A message describing the error in detail.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */\r
+               public function IllegalStateError(message:String)\r
+               {\r
+                       super(message);\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as b/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Address.as
new file mode 100644 (file)
index 0000000..a368ffb
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.fileformats.vcard
+{
+       public class Address
+       {
+               public var type:String;
+               public var street:String;
+               public var city:String;
+               public var state:String;
+               public var postalCode:String;
+               
+               public function toString():String
+               {
+                       return (street + " " + city + ", " + state + " " + postalCode);
+               }
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as b/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Email.as
new file mode 100644 (file)
index 0000000..071c39e
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.fileformats.vcard
+{
+       public class Email
+       {
+               public var type:String;
+               public var address:String;
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as b/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/Phone.as
new file mode 100644 (file)
index 0000000..27f98e4
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.fileformats.vcard
+{
+       public class Phone
+       {
+               public var type:String;
+               public var number:String;
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as b/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCard.as
new file mode 100644 (file)
index 0000000..d6bc283
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.fileformats.vcard
+{
+       import flash.utils.ByteArray;
+
+       public class VCard
+       {
+               public var fullName:String;
+               public var orgs:Array;
+               public var title:String;
+               public var image:ByteArray;
+               public var phones:Array;
+               public var emails:Array;
+               public var addresses:Array;
+               
+               public function VCard()
+               {
+                       orgs = new Array();
+                       phones = new Array();
+                       emails = new Array();
+                       addresses = new Array();
+               }
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as b/redakcja/static/filebrowser/uploadify/com/adobe/fileformats/vcard/VCardParser.as
new file mode 100644 (file)
index 0000000..45c954a
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.fileformats.vcard
+{
+       import mx.utils.Base64Decoder;
+       import mx.utils.StringUtil;
+       
+       public class VCardParser
+       {
+               public static function parse(vcardStr:String):Array
+               {
+                       var vcards:Array = new Array();
+                       var lines:Array = vcardStr.split(/\r\n/);
+                       var vcard:VCard;
+                       var type:String;
+                       var typeTmp:String;
+                       var line:String;
+
+                       for (var i:uint = 0; i < lines.length; ++i)
+                       {
+                               line = lines[i];
+                               if (line == "BEGIN:VCARD")
+                               {
+                                       vcard = new VCard();
+                               }
+                               else if (line == "END:VCARD")
+                               {
+                                       if (vcard != null)
+                                       {
+                                               vcards.push(vcard);
+                                       }
+                               }
+                               else if(line.search(/^ORG/i) != -1)
+                               {
+                                       var org:String = line.substring(4, line.length);
+                                       var orgArray:Array = org.split(";");
+                                       for each (var orgToken:String in orgArray)
+                                       {
+                                               if (StringUtil.trim(orgToken).length > 0)
+                                               {
+                                                       vcard.orgs.push(orgToken);
+                                               }
+                                       }
+                               }
+                               else if(line.search(/^TITLE/i) != -1)
+                               {
+                                       var title:String = line.substring(6, line.length);
+                                       vcard.title = title;
+                               }
+                               else if (line.search(/^FN:/i) != -1)
+                               {
+                                       var fullName:String = line.substring(3, line.length);
+                                       vcard.fullName = fullName;
+                               }
+                               else if (line.search(/^TEL/i) != -1)
+                               {
+                                       type = new String();
+                                       typeTmp = new String();
+                                       var phone:Phone = new Phone();
+                                       var number:String;
+                                       var phoneTokens:Array = line.split(";");
+                                       for each (var phoneToken:String in phoneTokens)
+                                       {
+                                               if (phoneToken.search(/^TYPE=/i) != -1)
+                                               {
+                                                       if (phoneToken.indexOf(":") != -1)
+                                                       {
+                                                               typeTmp = phoneToken.substring(5, phoneToken.indexOf(":"));
+                                                               number = phoneToken.substring(phoneToken.indexOf(":")+1, phoneToken.length);
+                                                       }
+                                                       else
+                                                       {                                                                       
+                                                               typeTmp = phoneToken.substring(5, phoneToken.length);
+                                                       }
+
+                                                       typeTmp = typeTmp.toLocaleLowerCase();
+
+                                                       if (typeTmp == "pref")
+                                                       {
+                                                               continue;
+                                                       }
+                                                       if (type.length != 0)
+                                                       {
+                                                               type += (" ");
+                                                       }
+                                                       type += typeTmp;
+                                               }
+                                       }
+                                       if (type.length > 0 && number != null)
+                                       {
+                                               phone.type = type;
+                                               phone.number = number;
+                                       }
+                                       vcard.phones.push(phone);
+                               }
+                               else if (line.search(/^EMAIL/i) != -1)
+                               {
+                                       type = new String();
+                                       typeTmp = new String();
+                                       var email:Email = new Email();
+                                       var emailAddress:String;
+                                       var emailTokens:Array = line.split(";");
+                                       for each (var emailToken:String in emailTokens)
+                                       {
+                                               if (emailToken.search(/^TYPE=/i) != -1)
+                                               {
+                                                       if (emailToken.indexOf(":") != -1)
+                                                       {
+                                                               typeTmp = emailToken.substring(5, emailToken.indexOf(":"));
+                                                               emailAddress = emailToken.substring(emailToken.indexOf(":")+1, emailToken.length);
+                                                       }
+                                                       else
+                                                       {                                                                       
+                                                               typeTmp = emailToken.substring(5, emailToken.length);
+                                                       }
+
+                                                       typeTmp = typeTmp.toLocaleLowerCase();
+
+                                                       if (typeTmp == "pref" || typeTmp == "internet")
+                                                       {
+                                                               continue;
+                                                       }
+                                                       if (type.length != 0)
+                                                       {
+                                                               type += (" ");
+                                                       }
+                                                       type += typeTmp;
+                                               }
+                                       }
+                                       if (type.length > 0 && emailAddress != null)
+                                       {
+                                               email.type = type;
+                                               email.address = emailAddress;
+                                       }
+                                       vcard.emails.push(email);
+                               }
+                               else if (line.indexOf("ADR;") != -1)
+                               {
+                                       var addressTokens:Array = line.split(";");
+                                       var address:Address = new Address();
+                                       for (var j:uint = 0; j < addressTokens.length; ++j)
+                                       {
+                                               var addressToken:String = addressTokens[j];
+                                               if (addressToken.search(/^home:+$/i) != -1) // For Outlook, which uses non-standard vCards.
+                                               {
+                                                       address.type = "home";
+                                               }
+                                               else if (addressToken.search(/^work:+$/i) != -1) // For Outlook, which uses non-standard vCards.
+                                               {
+                                                       address.type = "work";
+                                               }
+                                               if (addressToken.search(/^type=/i) != -1)  // The "type" parameter is the standard way (which Address Book uses)
+                                               {
+                                                       // First, remove the optional ":" character.
+                                                       addressToken = addressToken.replace(/:/,"");
+                                                       var addressType:String = addressToken.substring(5, addressToken.length).toLowerCase();
+                                                       if (addressType == "pref") // Not interested in which one is preferred.
+                                                       {
+                                                               continue;
+                                                       }
+                                                       else if (addressType.indexOf("home") != -1) // home
+                                                       {
+                                                               addressType = "home";
+                                                       }
+                                                       else if (addressType.indexOf("work") != -1) // work
+                                                       {
+                                                               addressType = "work";
+                                                       }
+                                                       else if (addressType.indexOf(",") != -1) // if the comma technique is used, just use the first one
+                                                       {
+                                                               var typeTokens:Array = addressType.split(",");
+                                                               for each (var typeToken:String in typeTokens)
+                                                               {
+                                                                       if (typeToken != "pref")
+                                                                       {
+                                                                               addressType = typeToken;
+                                                                               break;
+                                                                       }
+                                                               }
+                                                       }
+                                                       address.type = addressType;
+                                               }
+                                               else if (addressToken.search(/^\d/) != -1 && address.street == null)
+                                               {
+                                                       address.street = addressToken.replace(/\\n/, "");
+                                                       address.city = addressTokens[j+1];
+                                                       address.state = addressTokens[j+2];
+                                                       address.postalCode = addressTokens[j+3];
+                                               }
+                                       }
+                                       if (address.type != null && address.street != null)
+                                       {
+                                               vcard.addresses.push(address);
+                                       }
+
+                               }
+                               else if (line.search(/^PHOTO;BASE64/i) != -1)
+                               {
+                                       var imageStr:String = new String();
+                                       for (var k:uint = i+1; k < lines.length; ++k)
+                                       {
+                                               imageStr += lines[k];
+                                               //if (lines[k].search(/.+\=$/) != -1) // Very slow in Mac due to RegEx bug
+                                               if (lines[k].indexOf('=') != -1)
+                                               {
+                                                       var decoder:Base64Decoder = new Base64Decoder();
+                                                       decoder.decode(imageStr);
+                                                       vcard.image = decoder.flush();
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+                       return vcards;
+               }
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/images/BitString.as b/redakcja/static/filebrowser/uploadify/com/adobe/images/BitString.as
new file mode 100644 (file)
index 0000000..b5c2b84
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+package com.adobe.images\r
+{\r
+       public class BitString\r
+       {\r
+               public var len:int = 0;\r
+               public var val:int = 0;\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as b/redakcja/static/filebrowser/uploadify/com/adobe/images/JPGEncoder.as
new file mode 100644 (file)
index 0000000..100d7e9
--- /dev/null
@@ -0,0 +1,648 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+package com.adobe.images\r
+{\r
+       import flash.geom.*;\r
+       import flash.display.*;\r
+       import flash.utils.*;\r
+       \r
+       /**\r
+        * Class that converts BitmapData into a valid JPEG\r
+        */             \r
+       public class JPGEncoder\r
+       {\r
+\r
+               // Static table initialization\r
+       \r
+               private var ZigZag:Array = [\r
+                        0, 1, 5, 6,14,15,27,28,\r
+                        2, 4, 7,13,16,26,29,42,\r
+                        3, 8,12,17,25,30,41,43,\r
+                        9,11,18,24,31,40,44,53,\r
+                       10,19,23,32,39,45,52,54,\r
+                       20,22,33,38,46,51,55,60,\r
+                       21,34,37,47,50,56,59,61,\r
+                       35,36,48,49,57,58,62,63\r
+               ];\r
+       \r
+               private var YTable:Array = new Array(64);\r
+               private var UVTable:Array = new Array(64);\r
+               private var fdtbl_Y:Array = new Array(64);\r
+               private var fdtbl_UV:Array = new Array(64);\r
+       \r
+               private function initQuantTables(sf:int):void\r
+               {\r
+                       var i:int;\r
+                       var t:Number;\r
+                       var YQT:Array = [\r
+                               16, 11, 10, 16, 24, 40, 51, 61,\r
+                               12, 12, 14, 19, 26, 58, 60, 55,\r
+                               14, 13, 16, 24, 40, 57, 69, 56,\r
+                               14, 17, 22, 29, 51, 87, 80, 62,\r
+                               18, 22, 37, 56, 68,109,103, 77,\r
+                               24, 35, 55, 64, 81,104,113, 92,\r
+                               49, 64, 78, 87,103,121,120,101,\r
+                               72, 92, 95, 98,112,100,103, 99\r
+                       ];\r
+                       for (i = 0; i < 64; i++) {\r
+                               t = Math.floor((YQT[i]*sf+50)/100);\r
+                               if (t < 1) {\r
+                                       t = 1;\r
+                               } else if (t > 255) {\r
+                                       t = 255;\r
+                               }\r
+                               YTable[ZigZag[i]] = t;\r
+                       }\r
+                       var UVQT:Array = [\r
+                               17, 18, 24, 47, 99, 99, 99, 99,\r
+                               18, 21, 26, 66, 99, 99, 99, 99,\r
+                               24, 26, 56, 99, 99, 99, 99, 99,\r
+                               47, 66, 99, 99, 99, 99, 99, 99,\r
+                               99, 99, 99, 99, 99, 99, 99, 99,\r
+                               99, 99, 99, 99, 99, 99, 99, 99,\r
+                               99, 99, 99, 99, 99, 99, 99, 99,\r
+                               99, 99, 99, 99, 99, 99, 99, 99\r
+                       ];\r
+                       for (i = 0; i < 64; i++) {\r
+                               t = Math.floor((UVQT[i]*sf+50)/100);\r
+                               if (t < 1) {\r
+                                       t = 1;\r
+                               } else if (t > 255) {\r
+                                       t = 255;\r
+                               }\r
+                               UVTable[ZigZag[i]] = t;\r
+                       }\r
+                       var aasf:Array = [\r
+                               1.0, 1.387039845, 1.306562965, 1.175875602,\r
+                               1.0, 0.785694958, 0.541196100, 0.275899379\r
+                       ];\r
+                       i = 0;\r
+                       for (var row:int = 0; row < 8; row++)\r
+                       {\r
+                               for (var col:int = 0; col < 8; col++)\r
+                               {\r
+                                       fdtbl_Y[i]  = (1.0 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
+                                       fdtbl_UV[i] = (1.0 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
+                                       i++;\r
+                               }\r
+                       }\r
+               }\r
+       \r
+               private var YDC_HT:Array;\r
+               private var UVDC_HT:Array;\r
+               private var YAC_HT:Array;\r
+               private var UVAC_HT:Array;\r
+       \r
+               private function computeHuffmanTbl(nrcodes:Array, std_table:Array):Array\r
+               {\r
+                       var codevalue:int = 0;\r
+                       var pos_in_table:int = 0;\r
+                       var HT:Array = new Array();\r
+                       for (var k:int=1; k<=16; k++) {\r
+                               for (var j:int=1; j<=nrcodes[k]; j++) {\r
+                                       HT[std_table[pos_in_table]] = new BitString();\r
+                                       HT[std_table[pos_in_table]].val = codevalue;\r
+                                       HT[std_table[pos_in_table]].len = k;\r
+                                       pos_in_table++;\r
+                                       codevalue++;\r
+                               }\r
+                               codevalue*=2;\r
+                       }\r
+                       return HT;\r
+               }\r
+       \r
+               private var std_dc_luminance_nrcodes:Array = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\r
+               private var std_dc_luminance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
+               private var std_ac_luminance_nrcodes:Array = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\r
+               private var std_ac_luminance_values:Array = [\r
+                       0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\r
+                       0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\r
+                       0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\r
+                       0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\r
+                       0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\r
+                       0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\r
+                       0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\r
+                       0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\r
+                       0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\r
+                       0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\r
+                       0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\r
+                       0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\r
+                       0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\r
+                       0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\r
+                       0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\r
+                       0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\r
+                       0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\r
+                       0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\r
+                       0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\r
+                       0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
+                       0xf9,0xfa\r
+               ];\r
+       \r
+               private var std_dc_chrominance_nrcodes:Array = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\r
+               private var std_dc_chrominance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
+               private var std_ac_chrominance_nrcodes:Array = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\r
+               private var std_ac_chrominance_values:Array = [\r
+                       0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\r
+                       0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\r
+                       0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\r
+                       0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\r
+                       0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\r
+                       0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\r
+                       0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\r
+                       0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\r
+                       0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\r
+                       0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\r
+                       0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\r
+                       0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\r
+                       0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\r
+                       0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\r
+                       0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\r
+                       0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\r
+                       0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\r
+                       0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\r
+                       0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\r
+                       0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
+                       0xf9,0xfa\r
+               ];\r
+       \r
+               private function initHuffmanTbl():void\r
+               {\r
+                       YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\r
+                       UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\r
+                       YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\r
+                       UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\r
+               }\r
+       \r
+               private var bitcode:Array = new Array(65535);\r
+               private var category:Array = new Array(65535);\r
+       \r
+               private function initCategoryNumber():void\r
+               {\r
+                       var nrlower:int = 1;\r
+                       var nrupper:int = 2;\r
+                       var nr:int;\r
+                       for (var cat:int=1; cat<=15; cat++) {\r
+                               //Positive numbers\r
+                               for (nr=nrlower; nr<nrupper; nr++) {\r
+                                       category[32767+nr] = cat;\r
+                                       bitcode[32767+nr] = new BitString();\r
+                                       bitcode[32767+nr].len = cat;\r
+                                       bitcode[32767+nr].val = nr;\r
+                               }\r
+                               //Negative numbers\r
+                               for (nr=-(nrupper-1); nr<=-nrlower; nr++) {\r
+                                       category[32767+nr] = cat;\r
+                                       bitcode[32767+nr] = new BitString();\r
+                                       bitcode[32767+nr].len = cat;\r
+                                       bitcode[32767+nr].val = nrupper-1+nr;\r
+                               }\r
+                               nrlower <<= 1;\r
+                               nrupper <<= 1;\r
+                       }\r
+               }\r
+       \r
+               // IO functions\r
+       \r
+               private var byteout:ByteArray;\r
+               private var bytenew:int = 0;\r
+               private var bytepos:int = 7;\r
+       \r
+               private function writeBits(bs:BitString):void\r
+               {\r
+                       var value:int = bs.val;\r
+                       var posval:int = bs.len-1;\r
+                       while ( posval >= 0 ) {\r
+                               if (value & uint(1 << posval) ) {\r
+                                       bytenew |= uint(1 << bytepos);\r
+                               }\r
+                               posval--;\r
+                               bytepos--;\r
+                               if (bytepos < 0) {\r
+                                       if (bytenew == 0xFF) {\r
+                                               writeByte(0xFF);\r
+                                               writeByte(0);\r
+                                       }\r
+                                       else {\r
+                                               writeByte(bytenew);\r
+                                       }\r
+                                       bytepos=7;\r
+                                       bytenew=0;\r
+                               }\r
+                       }\r
+               }\r
+       \r
+               private function writeByte(value:int):void\r
+               {\r
+                       byteout.writeByte(value);\r
+               }\r
+       \r
+               private function writeWord(value:int):void\r
+               {\r
+                       writeByte((value>>8)&0xFF);\r
+                       writeByte((value   )&0xFF);\r
+               }\r
+       \r
+               // DCT & quantization core\r
+       \r
+               private function fDCTQuant(data:Array, fdtbl:Array):Array\r
+               {\r
+                       var tmp0:Number, tmp1:Number, tmp2:Number, tmp3:Number, tmp4:Number, tmp5:Number, tmp6:Number, tmp7:Number;\r
+                       var tmp10:Number, tmp11:Number, tmp12:Number, tmp13:Number;\r
+                       var z1:Number, z2:Number, z3:Number, z4:Number, z5:Number, z11:Number, z13:Number;\r
+                       var i:int;\r
+                       /* Pass 1: process rows. */\r
+                       var dataOff:int=0;\r
+                       for (i=0; i<8; i++) {\r
+                               tmp0 = data[dataOff+0] + data[dataOff+7];\r
+                               tmp7 = data[dataOff+0] - data[dataOff+7];\r
+                               tmp1 = data[dataOff+1] + data[dataOff+6];\r
+                               tmp6 = data[dataOff+1] - data[dataOff+6];\r
+                               tmp2 = data[dataOff+2] + data[dataOff+5];\r
+                               tmp5 = data[dataOff+2] - data[dataOff+5];\r
+                               tmp3 = data[dataOff+3] + data[dataOff+4];\r
+                               tmp4 = data[dataOff+3] - data[dataOff+4];\r
+       \r
+                               /* Even part */\r
+                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
+                               tmp13 = tmp0 - tmp3;\r
+                               tmp11 = tmp1 + tmp2;\r
+                               tmp12 = tmp1 - tmp2;\r
+       \r
+                               data[dataOff+0] = tmp10 + tmp11; /* phase 3 */\r
+                               data[dataOff+4] = tmp10 - tmp11;\r
+       \r
+                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
+                               data[dataOff+2] = tmp13 + z1; /* phase 5 */\r
+                               data[dataOff+6] = tmp13 - z1;\r
+       \r
+                               /* Odd part */\r
+                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
+                               tmp11 = tmp5 + tmp6;\r
+                               tmp12 = tmp6 + tmp7;\r
+       \r
+                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
+                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
+                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
+                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
+                               z3 = tmp11 * 0.707106781; /* c4 */\r
+       \r
+                               z11 = tmp7 + z3;        /* phase 5 */\r
+                               z13 = tmp7 - z3;\r
+       \r
+                               data[dataOff+5] = z13 + z2;     /* phase 6 */\r
+                               data[dataOff+3] = z13 - z2;\r
+                               data[dataOff+1] = z11 + z4;\r
+                               data[dataOff+7] = z11 - z4;\r
+       \r
+                               dataOff += 8; /* advance pointer to next row */\r
+                       }\r
+       \r
+                       /* Pass 2: process columns. */\r
+                       dataOff = 0;\r
+                       for (i=0; i<8; i++) {\r
+                               tmp0 = data[dataOff+ 0] + data[dataOff+56];\r
+                               tmp7 = data[dataOff+ 0] - data[dataOff+56];\r
+                               tmp1 = data[dataOff+ 8] + data[dataOff+48];\r
+                               tmp6 = data[dataOff+ 8] - data[dataOff+48];\r
+                               tmp2 = data[dataOff+16] + data[dataOff+40];\r
+                               tmp5 = data[dataOff+16] - data[dataOff+40];\r
+                               tmp3 = data[dataOff+24] + data[dataOff+32];\r
+                               tmp4 = data[dataOff+24] - data[dataOff+32];\r
+       \r
+                               /* Even part */\r
+                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
+                               tmp13 = tmp0 - tmp3;\r
+                               tmp11 = tmp1 + tmp2;\r
+                               tmp12 = tmp1 - tmp2;\r
+       \r
+                               data[dataOff+ 0] = tmp10 + tmp11; /* phase 3 */\r
+                               data[dataOff+32] = tmp10 - tmp11;\r
+       \r
+                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
+                               data[dataOff+16] = tmp13 + z1; /* phase 5 */\r
+                               data[dataOff+48] = tmp13 - z1;\r
+       \r
+                               /* Odd part */\r
+                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
+                               tmp11 = tmp5 + tmp6;\r
+                               tmp12 = tmp6 + tmp7;\r
+       \r
+                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
+                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
+                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
+                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
+                               z3 = tmp11 * 0.707106781; /* c4 */\r
+       \r
+                               z11 = tmp7 + z3;        /* phase 5 */\r
+                               z13 = tmp7 - z3;\r
+       \r
+                               data[dataOff+40] = z13 + z2; /* phase 6 */\r
+                               data[dataOff+24] = z13 - z2;\r
+                               data[dataOff+ 8] = z11 + z4;\r
+                               data[dataOff+56] = z11 - z4;\r
+       \r
+                               dataOff++; /* advance pointer to next column */\r
+                       }\r
+       \r
+                       // Quantize/descale the coefficients\r
+                       for (i=0; i<64; i++) {\r
+                               // Apply the quantization and scaling factor & Round to nearest integer\r
+                               data[i] = Math.round((data[i]*fdtbl[i]));\r
+                       }\r
+                       return data;\r
+               }\r
+       \r
+               // Chunk writing\r
+       \r
+               private function writeAPP0():void\r
+               {\r
+                       writeWord(0xFFE0); // marker\r
+                       writeWord(16); // length\r
+                       writeByte(0x4A); // J\r
+                       writeByte(0x46); // F\r
+                       writeByte(0x49); // I\r
+                       writeByte(0x46); // F\r
+                       writeByte(0); // = "JFIF",'\0'\r
+                       writeByte(1); // versionhi\r
+                       writeByte(1); // versionlo\r
+                       writeByte(0); // xyunits\r
+                       writeWord(1); // xdensity\r
+                       writeWord(1); // ydensity\r
+                       writeByte(0); // thumbnwidth\r
+                       writeByte(0); // thumbnheight\r
+               }\r
+       \r
+               private function writeSOF0(width:int, height:int):void\r
+               {\r
+                       writeWord(0xFFC0); // marker\r
+                       writeWord(17);   // length, truecolor YUV JPG\r
+                       writeByte(8);    // precision\r
+                       writeWord(height);\r
+                       writeWord(width);\r
+                       writeByte(3);    // nrofcomponents\r
+                       writeByte(1);    // IdY\r
+                       writeByte(0x11); // HVY\r
+                       writeByte(0);    // QTY\r
+                       writeByte(2);    // IdU\r
+                       writeByte(0x11); // HVU\r
+                       writeByte(1);    // QTU\r
+                       writeByte(3);    // IdV\r
+                       writeByte(0x11); // HVV\r
+                       writeByte(1);    // QTV\r
+               }\r
+       \r
+               private function writeDQT():void\r
+               {\r
+                       writeWord(0xFFDB); // marker\r
+                       writeWord(132);    // length\r
+                       writeByte(0);\r
+                       var i:int;\r
+                       for (i=0; i<64; i++) {\r
+                               writeByte(YTable[i]);\r
+                       }\r
+                       writeByte(1);\r
+                       for (i=0; i<64; i++) {\r
+                               writeByte(UVTable[i]);\r
+                       }\r
+               }\r
+       \r
+               private function writeDHT():void\r
+               {\r
+                       writeWord(0xFFC4); // marker\r
+                       writeWord(0x01A2); // length\r
+                       var i:int;\r
+       \r
+                       writeByte(0); // HTYDCinfo\r
+                       for (i=0; i<16; i++) {\r
+                               writeByte(std_dc_luminance_nrcodes[i+1]);\r
+                       }\r
+                       for (i=0; i<=11; i++) {\r
+                               writeByte(std_dc_luminance_values[i]);\r
+                       }\r
+       \r
+                       writeByte(0x10); // HTYACinfo\r
+                       for (i=0; i<16; i++) {\r
+                               writeByte(std_ac_luminance_nrcodes[i+1]);\r
+                       }\r
+                       for (i=0; i<=161; i++) {\r
+                               writeByte(std_ac_luminance_values[i]);\r
+                       }\r
+       \r
+                       writeByte(1); // HTUDCinfo\r
+                       for (i=0; i<16; i++) {\r
+                               writeByte(std_dc_chrominance_nrcodes[i+1]);\r
+                       }\r
+                       for (i=0; i<=11; i++) {\r
+                               writeByte(std_dc_chrominance_values[i]);\r
+                       }\r
+       \r
+                       writeByte(0x11); // HTUACinfo\r
+                       for (i=0; i<16; i++) {\r
+                               writeByte(std_ac_chrominance_nrcodes[i+1]);\r
+                       }\r
+                       for (i=0; i<=161; i++) {\r
+                               writeByte(std_ac_chrominance_values[i]);\r
+                       }\r
+               }\r
+       \r
+               private function writeSOS():void\r
+               {\r
+                       writeWord(0xFFDA); // marker\r
+                       writeWord(12); // length\r
+                       writeByte(3); // nrofcomponents\r
+                       writeByte(1); // IdY\r
+                       writeByte(0); // HTY\r
+                       writeByte(2); // IdU\r
+                       writeByte(0x11); // HTU\r
+                       writeByte(3); // IdV\r
+                       writeByte(0x11); // HTV\r
+                       writeByte(0); // Ss\r
+                       writeByte(0x3f); // Se\r
+                       writeByte(0); // Bf\r
+               }\r
+       \r
+               // Core processing\r
+               private var DU:Array = new Array(64);\r
+       \r
+               private function processDU(CDU:Array, fdtbl:Array, DC:Number, HTDC:Array, HTAC:Array):Number\r
+               {\r
+                       var EOB:BitString = HTAC[0x00];\r
+                       var M16zeroes:BitString = HTAC[0xF0];\r
+                       var i:int;\r
+       \r
+                       var DU_DCT:Array = fDCTQuant(CDU, fdtbl);\r
+                       //ZigZag reorder\r
+                       for (i=0;i<64;i++) {\r
+                               DU[ZigZag[i]]=DU_DCT[i];\r
+                       }\r
+                       var Diff:int = DU[0] - DC; DC = DU[0];\r
+                       //Encode DC\r
+                       if (Diff==0) {\r
+                               writeBits(HTDC[0]); // Diff might be 0\r
+                       } else {\r
+                               writeBits(HTDC[category[32767+Diff]]);\r
+                               writeBits(bitcode[32767+Diff]);\r
+                       }\r
+                       //Encode ACs\r
+                       var end0pos:int = 63;\r
+                       for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {\r
+                       };\r
+                       //end0pos = first element in reverse order !=0\r
+                       if ( end0pos == 0) {\r
+                               writeBits(EOB);\r
+                               return DC;\r
+                       }\r
+                       i = 1;\r
+                       while ( i <= end0pos ) {\r
+                               var startpos:int = i;\r
+                               for (; (DU[i]==0) && (i<=end0pos); i++) {\r
+                               }\r
+                               var nrzeroes:int = i-startpos;\r
+                               if ( nrzeroes >= 16 ) {\r
+                                       for (var nrmarker:int=1; nrmarker <= nrzeroes/16; nrmarker++) {\r
+                                               writeBits(M16zeroes);\r
+                                       }\r
+                                       nrzeroes = int(nrzeroes&0xF);\r
+                               }\r
+                               writeBits(HTAC[nrzeroes*16+category[32767+DU[i]]]);\r
+                               writeBits(bitcode[32767+DU[i]]);\r
+                               i++;\r
+                       }\r
+                       if ( end0pos != 63 ) {\r
+                               writeBits(EOB);\r
+                       }\r
+                       return DC;\r
+               }\r
+       \r
+               private var YDU:Array = new Array(64);\r
+               private var UDU:Array = new Array(64);\r
+               private var VDU:Array = new Array(64);\r
+       \r
+               private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void\r
+               {\r
+                       var pos:int=0;\r
+                       for (var y:int=0; y<8; y++) {\r
+                               for (var x:int=0; x<8; x++) {\r
+                                       var P:uint = img.getPixel32(xpos+x,ypos+y);\r
+                                       var R:Number = Number((P>>16)&0xFF);\r
+                                       var G:Number = Number((P>> 8)&0xFF);\r
+                                       var B:Number = Number((P    )&0xFF);\r
+                                       YDU[pos]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-128;\r
+                                       UDU[pos]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));\r
+                                       VDU[pos]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));\r
+                                       pos++;\r
+                               }\r
+                       }\r
+               }\r
+       \r
+               /**\r
+                * Constructor for JPEGEncoder class\r
+                *\r
+                * @param quality The quality level between 1 and 100 that detrmines the\r
+                * level of compression used in the generated JPEG\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */             \r
+               public function JPGEncoder(quality:Number = 50)\r
+               {\r
+                       if (quality <= 0) {\r
+                               quality = 1;\r
+                       }\r
+                       if (quality > 100) {\r
+                               quality = 100;\r
+                       }\r
+                       var sf:int = 0;\r
+                       if (quality < 50) {\r
+                               sf = int(5000 / quality);\r
+                       } else {\r
+                               sf = int(200 - quality*2);\r
+                       }\r
+                       // Create tables\r
+                       initHuffmanTbl();\r
+                       initCategoryNumber();\r
+                       initQuantTables(sf);\r
+               }\r
+       \r
+               /**\r
+                * Created a JPEG image from the specified BitmapData\r
+                *\r
+                * @param image The BitmapData that will be converted into the JPEG format.\r
+                * @return a ByteArray representing the JPEG encoded image data.\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */     \r
+               public function encode(image:BitmapData):ByteArray\r
+               {\r
+                       // Initialize bit writer\r
+                       byteout = new ByteArray();\r
+                       bytenew=0;\r
+                       bytepos=7;\r
+       \r
+                       // Add JPEG headers\r
+                       writeWord(0xFFD8); // SOI\r
+                       writeAPP0();\r
+                       writeDQT();\r
+                       writeSOF0(image.width,image.height);\r
+                       writeDHT();\r
+                       writeSOS();\r
+\r
+       \r
+                       // Encode 8x8 macroblocks\r
+                       var DCY:Number=0;\r
+                       var DCU:Number=0;\r
+                       var DCV:Number=0;\r
+                       bytenew=0;\r
+                       bytepos=7;\r
+                       for (var ypos:int=0; ypos<image.height; ypos+=8) {\r
+                               for (var xpos:int=0; xpos<image.width; xpos+=8) {\r
+                                       RGB2YUV(image, xpos, ypos);\r
+                                       DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\r
+                                       DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\r
+                                       DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\r
+                               }\r
+                       }\r
+       \r
+                       // Do the bit alignment of the EOI marker\r
+                       if ( bytepos >= 0 ) {\r
+                               var fillbits:BitString = new BitString();\r
+                               fillbits.len = bytepos+1;\r
+                               fillbits.val = (1<<(bytepos+1))-1;\r
+                               writeBits(fillbits);\r
+                       }\r
+       \r
+                       writeWord(0xFFD9); //EOI\r
+                       return byteout;\r
+               }\r
+       }\r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as b/redakcja/static/filebrowser/uploadify/com/adobe/images/PNGEncoder.as
new file mode 100644 (file)
index 0000000..83c95f6
--- /dev/null
@@ -0,0 +1,141 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+package com.adobe.images\r
+{\r
+       import flash.geom.*;\r
+       import flash.display.Bitmap;\r
+       import flash.display.BitmapData;\r
+       import flash.utils.ByteArray;\r
+\r
+       /**\r
+        * Class that converts BitmapData into a valid PNG\r
+        */     \r
+       public class PNGEncoder\r
+       {\r
+               /**\r
+                * Created a PNG image from the specified BitmapData\r
+                *\r
+                * @param image The BitmapData that will be converted into the PNG format.\r
+                * @return a ByteArray representing the PNG encoded image data.\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */                     \r
+           public static function encode(img:BitmapData):ByteArray {\r
+               // Create output byte array\r
+               var png:ByteArray = new ByteArray();\r
+               // Write PNG signature\r
+               png.writeUnsignedInt(0x89504e47);\r
+               png.writeUnsignedInt(0x0D0A1A0A);\r
+               // Build IHDR chunk\r
+               var IHDR:ByteArray = new ByteArray();\r
+               IHDR.writeInt(img.width);\r
+               IHDR.writeInt(img.height);\r
+               IHDR.writeUnsignedInt(0x08060000); // 32bit RGBA\r
+               IHDR.writeByte(0);\r
+               writeChunk(png,0x49484452,IHDR);\r
+               // Build IDAT chunk\r
+               var IDAT:ByteArray= new ByteArray();\r
+               for(var i:int=0;i < img.height;i++) {\r
+                   // no filter\r
+                   IDAT.writeByte(0);\r
+                   var p:uint;\r
+                   var j:int;\r
+                   if ( !img.transparent ) {\r
+                       for(j=0;j < img.width;j++) {\r
+                           p = img.getPixel(j,i);\r
+                           IDAT.writeUnsignedInt(\r
+                               uint(((p&0xFFFFFF) << 8)|0xFF));\r
+                       }\r
+                   } else {\r
+                       for(j=0;j < img.width;j++) {\r
+                           p = img.getPixel32(j,i);\r
+                           IDAT.writeUnsignedInt(\r
+                               uint(((p&0xFFFFFF) << 8)|\r
+                               (p>>>24)));\r
+                       }\r
+                   }\r
+               }\r
+               IDAT.compress();\r
+               writeChunk(png,0x49444154,IDAT);\r
+               // Build IEND chunk\r
+               writeChunk(png,0x49454E44,null);\r
+               // return PNG\r
+               return png;\r
+           }\r
+       \r
+           private static var crcTable:Array;\r
+           private static var crcTableComputed:Boolean = false;\r
+       \r
+           private static function writeChunk(png:ByteArray, \r
+                   type:uint, data:ByteArray):void {\r
+               if (!crcTableComputed) {\r
+                   crcTableComputed = true;\r
+                   crcTable = [];\r
+                   var c:uint;\r
+                   for (var n:uint = 0; n < 256; n++) {\r
+                       c = n;\r
+                       for (var k:uint = 0; k < 8; k++) {\r
+                           if (c & 1) {\r
+                               c = uint(uint(0xedb88320) ^ \r
+                                   uint(c >>> 1));\r
+                           } else {\r
+                               c = uint(c >>> 1);\r
+                           }\r
+                       }\r
+                       crcTable[n] = c;\r
+                   }\r
+               }\r
+               var len:uint = 0;\r
+               if (data != null) {\r
+                   len = data.length;\r
+               }\r
+               png.writeUnsignedInt(len);\r
+               var p:uint = png.position;\r
+               png.writeUnsignedInt(type);\r
+               if ( data != null ) {\r
+                   png.writeBytes(data);\r
+               }\r
+               var e:uint = png.position;\r
+               png.position = p;\r
+               c = 0xffffffff;\r
+               for (var i:int = 0; i < (e-p); i++) {\r
+                   c = uint(crcTable[\r
+                       (c ^ png.readUnsignedByte()) & \r
+                       uint(0xff)] ^ uint(c >>> 8));\r
+               }\r
+               c = uint(c^uint(0xffffffff));\r
+               png.position = e;\r
+               png.writeUnsignedInt(c);\r
+           }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/DynamicURLLoader.as
new file mode 100644 (file)
index 0000000..2a9eea1
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.net\r
+{\r
+       import flash.net.URLLoader;\r
+\r
+       /**\r
+       *       Class that provides a dynamic implimentation of the URLLoader class.\r
+       * \r
+       *       This class provides no API implimentations. However, since the class is\r
+       *       declared as dynamic, it can be used in place of URLLoader, and allow\r
+       *       you to dynamically attach properties to it (which URLLoader does not allow).\r
+       * \r
+       *       @langversion ActionScript 3.0\r
+       *       @playerversion Flash 9.0\r
+       *       @tiptext\r
+       */      \r
+       public dynamic class DynamicURLLoader extends URLLoader \r
+       {\r
+               public function DynamicURLLoader()\r
+               {\r
+                       super();\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/IURIResolver.as
new file mode 100644 (file)
index 0000000..3610cc2
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.net\r
+{\r
+       /**\r
+        * The URI class cannot know about DNS aliases, virtual hosts, or\r
+        * symbolic links that may be involved.  The application can provide\r
+        * an implementation of this interface to resolve the URI before the\r
+        * URI class makes any comparisons.  For example, a web host has\r
+        * two aliases:\r
+        * \r
+        * <p><code>\r
+        *    http://www.site.com/\r
+        *    http://www.site.net/\r
+        * </code></p>\r
+        * \r
+        * <p>The application can provide an implementation that automatically\r
+        * resolves site.net to site.com before URI compares two URI objects.\r
+        * Only the application can know and understand the context in which\r
+        * the URI's are being used.</p>\r
+        * \r
+        * <p>Use the URI.resolver accessor to assign a custom resolver to\r
+        * the URI class.  Any resolver specified is global to all instances\r
+        * of URI.</p>\r
+        * \r
+        * <p>URI will call this before performing URI comparisons in the\r
+        * URI.getRelation() and URI.getCommonParent() functions.\r
+        * \r
+        * @see URI.getRelation\r
+        * @see URI.getCommonParent\r
+        * \r
+        * @langversion ActionScript 3.0\r
+        * @playerversion Flash 9.0\r
+        */\r
+       public interface IURIResolver\r
+       {\r
+               /**\r
+                * Implement this method to provide custom URI resolution for\r
+                * your application.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */\r
+               function resolve(uri:URI) : URI;\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/MimeTypeMap.as
new file mode 100644 (file)
index 0000000..32e40a4
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+package com.adobe.net
+{
+       public class MimeTypeMap
+       {
+               private var types:Array = 
+                       [["application/andrew-inset","ez"],
+                       ["application/atom+xml","atom"],
+                       ["application/mac-binhex40","hqx"],
+                       ["application/mac-compactpro","cpt"],
+                       ["application/mathml+xml","mathml"],
+                       ["application/msword","doc"],
+                       ["application/octet-stream","bin","dms","lha","lzh","exe","class","so","dll","dmg"],
+                       ["application/oda","oda"],
+                       ["application/ogg","ogg"],
+                       ["application/pdf","pdf"],
+                       ["application/postscript","ai","eps","ps"],
+                       ["application/rdf+xml","rdf"],
+                       ["application/smil","smi","smil"],
+                       ["application/srgs","gram"],
+                       ["application/srgs+xml","grxml"],
+                       ["application/vnd.adobe.apollo-application-installer-package+zip","air"],
+                       ["application/vnd.mif","mif"],
+                       ["application/vnd.mozilla.xul+xml","xul"],
+                       ["application/vnd.ms-excel","xls"],
+                       ["application/vnd.ms-powerpoint","ppt"],
+                       ["application/vnd.rn-realmedia","rm"],
+                       ["application/vnd.wap.wbxml","wbxml"],
+                       ["application/vnd.wap.wmlc","wmlc"],
+                       ["application/vnd.wap.wmlscriptc","wmlsc"],
+                       ["application/voicexml+xml","vxml"],
+                       ["application/x-bcpio","bcpio"],
+                       ["application/x-cdlink","vcd"],
+                       ["application/x-chess-pgn","pgn"],
+                       ["application/x-cpio","cpio"],
+                       ["application/x-csh","csh"],
+                       ["application/x-director","dcr","dir","dxr"],
+                       ["application/x-dvi","dvi"],
+                       ["application/x-futuresplash","spl"],
+                       ["application/x-gtar","gtar"],
+                       ["application/x-hdf","hdf"],
+                       ["application/x-javascript","js"],
+                       ["application/x-koan","skp","skd","skt","skm"],
+                       ["application/x-latex","latex"],
+                       ["application/x-netcdf","nc","cdf"],
+                       ["application/x-sh","sh"],
+                       ["application/x-shar","shar"],
+                       ["application/x-shockwave-flash","swf"],
+                       ["application/x-stuffit","sit"],
+                       ["application/x-sv4cpio","sv4cpio"],
+                       ["application/x-sv4crc","sv4crc"],
+                       ["application/x-tar","tar"],
+                       ["application/x-tcl","tcl"],
+                       ["application/x-tex","tex"],
+                       ["application/x-texinfo","texinfo","texi"],
+                       ["application/x-troff","t","tr","roff"],
+                       ["application/x-troff-man","man"],
+                       ["application/x-troff-me","me"],
+                       ["application/x-troff-ms","ms"],
+                       ["application/x-ustar","ustar"],
+                       ["application/x-wais-source","src"],
+                       ["application/xhtml+xml","xhtml","xht"],
+                       ["application/xml","xml","xsl"],
+                       ["application/xml-dtd","dtd"],
+                       ["application/xslt+xml","xslt"],
+                       ["application/zip","zip"],
+                       ["audio/basic","au","snd"],
+                       ["audio/midi","mid","midi","kar"],
+                       ["audio/mpeg","mp3","mpga","mp2"],
+                       ["audio/x-aiff","aif","aiff","aifc"],
+                       ["audio/x-mpegurl","m3u"],
+                       ["audio/x-pn-realaudio","ram","ra"],
+                       ["audio/x-wav","wav"],
+                       ["chemical/x-pdb","pdb"],
+                       ["chemical/x-xyz","xyz"],
+                       ["image/bmp","bmp"],
+                       ["image/cgm","cgm"],
+                       ["image/gif","gif"],
+                       ["image/ief","ief"],
+                       ["image/jpeg","jpg","jpeg","jpe"],
+                       ["image/png","png"],
+                       ["image/svg+xml","svg"],
+                       ["image/tiff","tiff","tif"],
+                       ["image/vnd.djvu","djvu","djv"],
+                       ["image/vnd.wap.wbmp","wbmp"],
+                       ["image/x-cmu-raster","ras"],
+                       ["image/x-icon","ico"],
+                       ["image/x-portable-anymap","pnm"],
+                       ["image/x-portable-bitmap","pbm"],
+                       ["image/x-portable-graymap","pgm"],
+                       ["image/x-portable-pixmap","ppm"],
+                       ["image/x-rgb","rgb"],
+                       ["image/x-xbitmap","xbm"],
+                       ["image/x-xpixmap","xpm"],
+                       ["image/x-xwindowdump","xwd"],
+                       ["model/iges","igs","iges"],
+                       ["model/mesh","msh","mesh","silo"],
+                       ["model/vrml","wrl","vrml"],
+                       ["text/calendar","ics","ifb"],
+                       ["text/css","css"],
+                       ["text/html","html","htm"],
+                       ["text/plain","txt","asc"],
+                       ["text/richtext","rtx"],
+                       ["text/rtf","rtf"],
+                       ["text/sgml","sgml","sgm"],
+                       ["text/tab-separated-values","tsv"],
+                       ["text/vnd.wap.wml","wml"],
+                       ["text/vnd.wap.wmlscript","wmls"],
+                       ["text/x-setext","etx"],
+                       ["video/mpeg","mpg","mpeg","mpe"],
+                       ["video/quicktime","mov","qt"],
+                       ["video/vnd.mpegurl","m4u","mxu"],
+                       ["video/x-flv","flv"],
+                       ["video/x-msvideo","avi"],
+                       ["video/x-sgi-movie","movie"],
+                       ["x-conference/x-cooltalk","ice"]];
+               
+               /**
+                * Returns the mimetype for the given extension.
+                */
+               public function getMimeType(extension:String):String
+               {
+                       extension = extension.toLocaleLowerCase();
+                       for each (var a:Array in types)
+                       {
+                               for each (var b:String in a)
+                               {
+                                       if (b == extension)
+                                       {
+                                               return a[0];
+                                       }
+                               }
+                       }
+                       return null;
+               }
+
+               /**
+                * Returns the prefered extension for the given mimetype.
+                */
+               public function getExtension(mimetype:String):String
+               {
+                       mimetype = mimetype.toLocaleLowerCase();
+                       for each (var a:Array in types)
+                       {
+                               if (a[0] == mimetype)
+                               {
+                                       return a[1];
+                               }
+                       }
+                       return null;
+               }
+
+               /**
+                * Adds a mimetype to the map. The order of the extensions matters. The most preferred should come first.
+                */
+               public function addMimeType(mimetype:String, extensions:Array):void
+               {
+                       var newType:Array = [mimetype];
+                       for each (var a:String in extensions)
+                       {
+                               newType.push(a);
+                       }
+                       types.push(newType);
+               }
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/URI.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/URI.as
new file mode 100644 (file)
index 0000000..d43ce9f
--- /dev/null
@@ -0,0 +1,2466 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.net\r
+{\r
+       import flash.utils.ByteArray;\r
+       \r
+       /**\r
+        * This class implements functions and utilities for working with URI's\r
+        * (Universal Resource Identifiers).  For technical description of the\r
+        * URI syntax, please see RFC 3986 at http://www.ietf.org/rfc/rfc3986.txt\r
+        * or do a web search for "rfc 3986".\r
+        * \r
+        * <p>The most important aspect of URI's to understand is that URI's\r
+        * and URL's are not strings.  URI's are complex data structures that\r
+        * encapsulate many pieces of information.  The string version of a\r
+        * URI is the serialized representation of that data structure.  This\r
+        * string serialization is used to provide a human readable\r
+        * representation and a means to transport the data over the network\r
+        * where it can then be parsed back into its' component parts.</p>\r
+        * \r
+        * <p>URI's fall into one of three categories:\r
+        * <ul>\r
+        *  <li>&lt;scheme&gt;:&lt;scheme-specific-part&gt;#&lt;fragment&gt;            (non-hierarchical)</li>\r
+        *  <li>&lt;scheme&gt;:<authority&gt;&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;        (hierarchical)</li>\r
+        *  <li>&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;                                             (relative hierarchical)</li>\r
+        * </ul></p>\r
+        * \r
+        * <p>The query and fragment parts are optional.</p>\r
+        * \r
+        * <p>This class supports both non-hierarchical and hierarchical URI's</p>\r
+        * \r
+        * <p>This class is intended to be used "as-is" for the vast majority\r
+        * of common URI's.  However, if your application requires a custom\r
+        * URI syntax (e.g. custom query syntax or special handling of\r
+        * non-hierarchical URI's), this class can be fully subclassed.  If you\r
+        * intended to subclass URI, please see the source code for complete\r
+        * documation on protected members and protected fuctions.</p>\r
+        * \r
+        * @langversion ActionScript 3.0\r
+        * @playerversion Flash 9.0 \r
+        */\r
+       public class URI\r
+       {       \r
+               // Here we define which characters must be escaped for each\r
+               // URI part.  The characters that must be escaped for each\r
+               // part differ depending on what would cause ambiguous parsing.\r
+               // RFC 3986 sec. 2.4 states that characters should only be\r
+               // encoded when they would conflict with subcomponent delimiters.\r
+               // We don't want to over-do the escaping.  We only want to escape\r
+               // the minimum needed to prevent parsing problems.\r
+               \r
+               // space and % must be escaped in all cases.  '%' is the delimiter\r
+               // for escaped characters.\r
+               public static const URImustEscape:String =      " %";\r
+               \r
+               // Baseline of what characters must be escaped\r
+               public static const URIbaselineEscape:String = URImustEscape + ":?#/@";\r
+               \r
+               // Characters that must be escaped in the part part.\r
+               public static const URIpathEscape:String = URImustEscape + "?#";\r
+               \r
+               // Characters that must be escaped in the query part, if setting\r
+               // the query as a whole string.  If the query is set by\r
+               // name/value, URIqueryPartEscape is used instead.\r
+               public static const URIqueryEscape:String = URImustEscape + "#";\r
+               \r
+               // This is what each name/value pair must escape "&=" as well\r
+               // so they don't conflict with the "param=value&param2=value2"\r
+               // syntax.\r
+               public static const URIqueryPartEscape:String = URImustEscape + "#&=";\r
+               \r
+               // Non-hierarchical URI's can have query and fragment parts, but\r
+               // we also want to prevent '/' otherwise it might end up looking\r
+               // like a hierarchical URI to the parser.\r
+               public static const URInonHierEscape:String =   URImustEscape + "?#/";\r
+               \r
+               // Baseline uninitialized setting for the URI scheme.\r
+               public static const UNKNOWN_SCHEME:String = "unknown";\r
+               \r
+               // The following bitmaps are used for performance enhanced\r
+               // character escaping.\r
+               \r
+               // Baseline characters that need to be escaped.  Many parts use\r
+               // this.\r
+               protected static const URIbaselineExcludedBitmap:URIEncodingBitmap =\r
+                       new URIEncodingBitmap(URIbaselineEscape);\r
+               \r
+               // Scheme escaping bitmap\r
+               protected static const URIschemeExcludedBitmap:URIEncodingBitmap = \r
+                       URIbaselineExcludedBitmap;\r
+               \r
+               // User/pass escaping bitmap\r
+               protected static const URIuserpassExcludedBitmap:URIEncodingBitmap =\r
+                       URIbaselineExcludedBitmap;\r
+               \r
+               // Authority escaping bitmap\r
+               protected static const URIauthorityExcludedBitmap:URIEncodingBitmap =\r
+                       URIbaselineExcludedBitmap;\r
+                       \r
+               // Port escaping bitmap\r
+               protected static const URIportExludedBitmap:URIEncodingBitmap = \r
+                       URIbaselineExcludedBitmap;\r
+               \r
+               // Path escaping bitmap\r
+               protected static const URIpathExcludedBitmap:URIEncodingBitmap =\r
+                       new URIEncodingBitmap(URIpathEscape);\r
+                       \r
+               // Query (whole) escaping bitmap\r
+               protected static const URIqueryExcludedBitmap:URIEncodingBitmap =\r
+                       new URIEncodingBitmap(URIqueryEscape);\r
+                       \r
+               // Query (individual parts) escaping bitmap\r
+               protected static const URIqueryPartExcludedBitmap:URIEncodingBitmap =\r
+                       new URIEncodingBitmap(URIqueryPartEscape);\r
+                       \r
+               // Fragments are the last part in the URI.  They only need to\r
+               // escape space, '#', and '%'.  Turns out that is what query\r
+               // uses too.\r
+               protected static const URIfragmentExcludedBitmap:URIEncodingBitmap =\r
+                       URIqueryExcludedBitmap;\r
+                       \r
+               // Characters that need to be escaped in the non-hierarchical part\r
+               protected static const URInonHierexcludedBitmap:URIEncodingBitmap =\r
+                       new URIEncodingBitmap(URInonHierEscape);\r
+                       \r
+               // Values used by getRelation()\r
+               public static const NOT_RELATED:int = 0;\r
+               public static const CHILD:int = 1;\r
+               public static const EQUAL:int = 2;\r
+               public static const PARENT:int = 3;\r
+\r
+               //-------------------------------------------------------------------\r
+               // protected class members\r
+               //-------------------------------------------------------------------\r
+               protected var _valid:Boolean = false;\r
+               protected var _relative:Boolean = false;\r
+               protected var _scheme:String = "";\r
+               protected var _authority:String = "";\r
+               protected var _username:String = "";\r
+               protected var _password:String = "";\r
+               protected var _port:String = "";\r
+               protected var _path:String = "";\r
+               protected var _query:String = "";\r
+               protected var _fragment:String = "";\r
+               protected var _nonHierarchical:String = "";\r
+               protected static var _resolver:IURIResolver = null;\r
+\r
+\r
+               /**\r
+                *  URI Constructor.  If no string is given, this will initialize\r
+                *  this URI object to a blank URI.\r
+                */\r
+               public function URI(uri:String = null) : void   \r
+               {\r
+                       if (uri == null)\r
+                               initialize();\r
+                       else\r
+                               constructURI(uri);\r
+               }\r
+\r
+               \r
+               /**\r
+                * @private\r
+                * Method that loads the URI from the given string.\r
+                */\r
+               protected function constructURI(uri:String) : Boolean\r
+               {\r
+                       if (!parseURI(uri))\r
+                               _valid = false;\r
+                               \r
+                       return isValid();\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private Private initializiation.\r
+                */\r
+               protected function initialize() : void\r
+               {\r
+                       _valid = false;\r
+                       _relative = false;\r
+               \r
+                       _scheme = UNKNOWN_SCHEME;\r
+                       _authority = "";\r
+                       _username = "";\r
+                       _password = "";\r
+                       _port = "";\r
+                       _path = "";\r
+                       _query = "";\r
+                       _fragment = "";\r
+               \r
+                       _nonHierarchical = "";\r
+               }       \r
+               \r
+               /**\r
+                * @private Accessor to explicitly set/get the hierarchical\r
+                * state of the URI.\r
+                */\r
+               protected function set hierState(state:Boolean) : void\r
+               {\r
+                       if (state)\r
+                       {\r
+                               // Clear the non-hierarchical data\r
+                               _nonHierarchical = "";\r
+               \r
+                               // Also set the state vars while we are at it\r
+                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
+                                       _relative = true;\r
+                               else\r
+                                       _relative = false;\r
+               \r
+                               if (_authority.length == 0 && _path.length == 0)\r
+                                       _valid = false;\r
+                               else\r
+                                       _valid = true;\r
+                       }\r
+                       else\r
+                       {\r
+                               // Clear the hierarchical data\r
+                               _authority = "";\r
+                               _username = "";\r
+                               _password = "";\r
+                               _port = "";\r
+                               _path = "";\r
+               \r
+                               _relative = false;\r
+               \r
+                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
+                                       _valid = false;\r
+                               else\r
+                                       _valid = true;\r
+                       }\r
+               }\r
+               protected function get hierState() : Boolean\r
+               {\r
+                       return (_nonHierarchical.length == 0);\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private Functions that performs some basic consistency validation.\r
+                */\r
+               protected function validateURI() : Boolean\r
+               {\r
+                       // Check the scheme\r
+                       if (isAbsolute())\r
+                       {\r
+                               if (_scheme.length <= 1 || _scheme == UNKNOWN_SCHEME)\r
+                               {\r
+                                       // we probably parsed a C:\ type path or no scheme\r
+                                       return false;\r
+                               }\r
+                               else if (verifyAlpha(_scheme) == false)\r
+                                       return false;  // Scheme contains bad characters\r
+                       }\r
+                       \r
+                       if (hierState)\r
+                       {\r
+                               if (_path.search('\\') != -1)\r
+                                       return false;  // local path\r
+                               else if (isRelative() == false && _scheme == UNKNOWN_SCHEME)\r
+                                       return false;  // It's an absolute URI, but it has a bad scheme\r
+                       }\r
+                       else\r
+                       {\r
+                               if (_nonHierarchical.search('\\') != -1)\r
+                                       return false;  // some kind of local path\r
+                       }\r
+               \r
+                       // Looks like it's ok.\r
+                       return true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private\r
+                *\r
+                * Given a URI in string format, parse that sucker into its basic\r
+                * components and assign them to this object.  A URI is of the form:\r
+                *    <scheme>:<authority><path>?<query>#<fragment>\r
+                *\r
+                * For simplicity, we parse the URI in the following order:\r
+                *              \r
+                *              1. Fragment (anchors)\r
+                *              2. Query        (CGI stuff)\r
+                *              3. Scheme       ("http")\r
+                *              4. Authority (host name)\r
+                *              5. Username/Password (if any)\r
+                *              6. Port         (server port if any)\r
+                *              7. Path         (/homepages/mypage.html)\r
+                *\r
+                * The reason for this order is to minimize any parsing ambiguities.\r
+                * Fragments and queries can contain almost anything (they are parts\r
+                * that can contain custom data with their own syntax).  Parsing\r
+                * them out first removes a large chance of parsing errors.  This\r
+                * method expects well formed URI's, but performing the parse in\r
+                * this order makes us a little more tolerant of user error.\r
+                * \r
+                * REGEXP\r
+                * Why doesn't this use regular expressions to parse the URI?  We\r
+                * have found that in a real world scenario, URI's are not always\r
+                * well formed.  Sometimes characters that should have been escaped\r
+                * are not, and those situations would break a regexp pattern.  This\r
+                * function attempts to be smart about what it is parsing based on\r
+                * location of characters relative to eachother.  This function has\r
+                * been proven through real-world use to parse the vast majority\r
+                * of URI's correctly.\r
+                *\r
+                * NOTE\r
+                * It is assumed that the string in URI form is escaped.  This function\r
+                * does not escape anything.  If you constructed the URI string by\r
+                * hand, and used this to parse in the URI and still need it escaped,\r
+                * call forceEscape() on your URI object.\r
+                *\r
+                * Parsing Assumptions\r
+                * This routine assumes that the URI being passed is well formed.\r
+                * Passing things like local paths, malformed URI's, and the such\r
+                * will result in parsing errors.  This function can handle\r
+                *       - absolute hierarchical (e.g. "http://something.com/index.html),\r
+                *   - relative hierarchical (e.g. "../images/flower.gif"), or\r
+                *   - non-hierarchical URIs (e.g. "mailto:jsmith@fungoo.com").\r
+                * \r
+                * Anything else will probably result in a parsing error, or a bogus\r
+                * URI object.\r
+                * \r
+                * Note that non-hierarchical URIs *MUST* have a scheme, otherwise\r
+                * they will be mistaken for relative URI's.\r
+                * \r
+                * If you are not sure what is being passed to you (like manually\r
+                * entered text from UI), you can construct a blank URI object and\r
+                * call unknownToURI() passing in the unknown string.\r
+                * \r
+                * @return      true if successful, false if there was some kind of\r
+                * parsing error\r
+                */\r
+               protected function parseURI(uri:String) : Boolean\r
+               {\r
+                       var baseURI:String = uri;\r
+                       var index:int, index2:int;\r
+               \r
+                       // Make sure this object is clean before we start.  If it was used\r
+                       // before and we are now parsing a new URI, we don't want any stale\r
+                       // info lying around.\r
+                       initialize();\r
+               \r
+                       // Remove any fragments (anchors) from the URI\r
+                       index = baseURI.indexOf("#");\r
+                       if (index != -1)\r
+                       {\r
+                               // Store the fragment piece if any\r
+                               if (baseURI.length > (index + 1)) // +1 is to skip the '#'\r
+                                       _fragment = baseURI.substr(index + 1, baseURI.length - (index + 1)); \r
+               \r
+                               // Trim off the fragment\r
+                               baseURI = baseURI.substr(0, index);\r
+                       }\r
+               \r
+                       // We need to strip off any CGI parameters (eg '?param=bob')\r
+                       index = baseURI.indexOf("?");\r
+                       if (index != -1)\r
+                       {\r
+                               if (baseURI.length > (index + 1))\r
+                                       _query = baseURI.substr(index + 1, baseURI.length - (index + 1)); // +1 is to skip the '?'\r
+               \r
+                               // Trim off the query\r
+                               baseURI = baseURI.substr(0, index);\r
+                       }\r
+               \r
+                       // Now try to find the scheme part\r
+                       index = baseURI.search(':');\r
+                       index2 = baseURI.search('/');\r
+               \r
+                       var containsColon:Boolean = (index != -1);\r
+                       var containsSlash:Boolean = (index2 != -1);\r
+               \r
+                       // This value is indeterminate if "containsColon" is false.\r
+                       // (if there is no colon, does the slash come before or\r
+                       // after said non-existing colon?)\r
+                       var colonBeforeSlash:Boolean = (!containsSlash || index < index2);\r
+               \r
+                       // If it has a colon and it's before the first slash, we will treat\r
+                       // it as a scheme.  If a slash is before a colon, there must be a\r
+                       // stray colon in a path or something.  In which case, the colon is\r
+                       // not the separator for the scheme.  Technically, we could consider\r
+                       // this an error, but since this is not an ambiguous state (we know\r
+                       // 100% that this has no scheme), we will keep going.\r
+                       if (containsColon && colonBeforeSlash)\r
+                       {\r
+                               // We found a scheme\r
+                               _scheme = baseURI.substr(0, index);\r
+                               \r
+                               // Normalize the scheme\r
+                               _scheme = _scheme.toLowerCase();\r
+               \r
+                               baseURI = baseURI.substr(index + 1);\r
+               \r
+                               if (baseURI.substr(0, 2) == "//")\r
+                               {\r
+                                       // This is a hierarchical URI\r
+                                       _nonHierarchical = "";\r
+               \r
+                                       // Trim off the "//"\r
+                                       baseURI = baseURI.substr(2, baseURI.length - 2);\r
+                               }\r
+                               else\r
+                               {\r
+                                       // This is a non-hierarchical URI like "mailto:bob@mail.com"\r
+                                       _nonHierarchical = baseURI;\r
+               \r
+                                       if ((_valid = validateURI()) == false)\r
+                                               initialize();  // Bad URI.  Clear it.\r
+               \r
+                                       // No more parsing to do for this case\r
+                                       return isValid();\r
+                               }\r
+                       }\r
+                       else\r
+                       {\r
+                               // No scheme.  We will consider this a relative URI\r
+                               _scheme = "";\r
+                               _relative = true;\r
+                               _nonHierarchical = "";\r
+                       }\r
+               \r
+                       // Ok, what we have left is everything after the <scheme>://\r
+               \r
+                       // Now that we have stripped off any query and fragment parts, we\r
+                       // need to split the authority from the path\r
+               \r
+                       if (isRelative())\r
+                       {\r
+                               // Don't bother looking for the authority.  It's a relative URI\r
+                               _authority = "";\r
+                               _port = "";\r
+                               _path = baseURI;\r
+                       }\r
+                       else\r
+                       {\r
+                               // Check for malformed UNC style file://///server/type/path/\r
+                               // By the time we get here, we have already trimmed the "file://"\r
+                               // so baseURI will be ///server/type/path.  If baseURI only\r
+                               // has one slash, we leave it alone because that is valid (that\r
+                               // is the case of "file:///path/to/file.txt" where there is no\r
+                               // server - implicit "localhost").\r
+                               if (baseURI.substr(0, 2) == "//")\r
+                               {\r
+                                       // Trim all leading slashes\r
+                                       while(baseURI.charAt(0) == "/")\r
+                                               baseURI = baseURI.substr(1, baseURI.length - 1);\r
+                               }\r
+               \r
+                               index = baseURI.search('/');\r
+                               if (index == -1)\r
+                               {\r
+                                       // No path.  We must have passed something like "http://something.com"\r
+                                       _authority = baseURI;\r
+                                       _path = "";\r
+                               }\r
+                               else\r
+                               {\r
+                                       _authority = baseURI.substr(0, index);\r
+                                       _path = baseURI.substr(index, baseURI.length - index);\r
+                               }\r
+               \r
+                               // Check to see if the URI has any username or password information.\r
+                               // For example:  ftp://username:password@server.com\r
+                               index = _authority.search('@');\r
+                               if (index != -1)\r
+                               {\r
+                                       // We have a username and possibly a password\r
+                                       _username = _authority.substr(0, index);\r
+               \r
+                                       // Remove the username/password from the authority\r
+                                       _authority = _authority.substr(index + 1);  // Skip the '@'\r
+               \r
+                                       // Now check to see if the username also has a password\r
+                                       index = _username.search(':');\r
+                                       if (index != -1)\r
+                                       {\r
+                                               _password = _username.substring(index + 1, _username.length);\r
+                                               _username = _username.substr(0, index);\r
+                                       }\r
+                                       else\r
+                                               _password = "";\r
+                               }\r
+                               else\r
+                               {\r
+                                       _username = "";\r
+                                       _password = "";\r
+                               }\r
+               \r
+                               // Lastly, check to see if the authorty has a port number.\r
+                               // This is parsed after the username/password to avoid conflicting\r
+                               // with the ':' in the 'username:password' if one exists.\r
+                               index = _authority.search(':');\r
+                               if (index != -1)\r
+                               {\r
+                                       _port = _authority.substring(index + 1, _authority.length);  // skip the ':'\r
+                                       _authority = _authority.substr(0, index);\r
+                               }\r
+                               else\r
+                               {\r
+                                       _port = "";\r
+                               }\r
+                               \r
+                               // Lastly, normalize the authority.  Domain names\r
+                               // are case insensitive.\r
+                               _authority = _authority.toLowerCase();\r
+                       }\r
+               \r
+                       if ((_valid = validateURI()) == false)\r
+                               initialize();  // Bad URI.  Clear it\r
+               \r
+                       return isValid();\r
+               }\r
+               \r
+               \r
+               /********************************************************************\r
+                * Copy function.\r
+                */\r
+               public function copyURI(uri:URI) : void\r
+               {\r
+                       this._scheme = uri._scheme;\r
+                       this._authority = uri._authority;\r
+                       this._username = uri._username;\r
+                       this._password = uri._password;\r
+                       this._port = uri._port;\r
+                       this._path = uri._path;\r
+                       this._query = uri._query;\r
+                       this._fragment = uri._fragment;\r
+                       this._nonHierarchical = uri._nonHierarchical;\r
+               \r
+                       this._valid = uri._valid;\r
+                       this._relative = uri._relative;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private\r
+                * Checks if the given string only contains a-z or A-Z.\r
+                */\r
+               protected function verifyAlpha(str:String) : Boolean\r
+               {\r
+                       var pattern:RegExp = /[^a-z]/;\r
+                       var index:int;\r
+                       \r
+                       str = str.toLowerCase();\r
+                       index = str.search(pattern);\r
+                       \r
+                       if (index == -1)\r
+                               return true;\r
+                       else\r
+                               return false;\r
+               }\r
+               \r
+               /**\r
+                * Is this a valid URI?\r
+                * \r
+                * @return true if this object represents a valid URI, false\r
+                * otherwise.\r
+                */\r
+               public function isValid() : Boolean\r
+               { \r
+                       return this._valid;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Is this URI an absolute URI?  An absolute URI is a complete, fully\r
+                * qualified reference to a resource.  e.g. http://site.com/index.htm\r
+                * Non-hierarchical URI's are always absolute.\r
+                */\r
+               public function isAbsolute() : Boolean\r
+               { \r
+                       return !this._relative;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Is this URI a relative URI?  Relative URI's do not have a scheme\r
+                * and only contain a relative path with optional anchor and query\r
+                * parts.  e.g. "../reports/index.htm".  Non-hierarchical URI's\r
+                * will never be relative.\r
+                */\r
+               public function isRelative() : Boolean\r
+               { \r
+                       return this._relative;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Does this URI point to a resource that is a directory/folder?\r
+                * The URI specification dictates that any path that ends in a slash\r
+                * is a directory.  This is needed to be able to perform correct path\r
+                * logic when combining relative URI's with absolute URI's to\r
+                * obtain the correct absolute URI to a resource.\r
+                * \r
+                * @see URI.chdir\r
+                * \r
+                * @return true if this URI represents a directory resource, false\r
+                * if this URI represents a file resource.\r
+                */\r
+               public function isDirectory() : Boolean\r
+               {\r
+                       if (_path.length == 0)\r
+                               return false;\r
+               \r
+                       return (_path.charAt(path.length - 1) == '/');\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Is this URI a hierarchical URI? URI's can be  \r
+                */\r
+               public function isHierarchical() : Boolean\r
+               { \r
+                       return hierState;\r
+               }\r
+                               \r
+               \r
+               /**\r
+                * The scheme of the URI.\r
+                */\r
+               public function get scheme() : String\r
+               { \r
+                       return URI.unescapeChars(_scheme);\r
+               }\r
+               public function set scheme(schemeStr:String) : void\r
+               {\r
+                       // Normalize the scheme\r
+                       var normalized:String = schemeStr.toLowerCase();\r
+                       _scheme = URI.fastEscapeChars(normalized, URI.URIschemeExcludedBitmap);\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The authority (host) of the URI.  Only valid for\r
+                * hierarchical URI's.  If the URI is relative, this will\r
+                * be an empty string. When setting this value, the string\r
+                * given is assumed to be unescaped.  When retrieving this\r
+                * value, the resulting string is unescaped.\r
+                */\r
+               public function get authority() : String\r
+               { \r
+                       return URI.unescapeChars(_authority);\r
+               }\r
+               public function set authority(authorityStr:String) : void\r
+               {\r
+                       // Normalize the authority\r
+                       authorityStr = authorityStr.toLowerCase();\r
+                       \r
+                       _authority = URI.fastEscapeChars(authorityStr,\r
+                               URI.URIauthorityExcludedBitmap);\r
+                       \r
+                       // Only hierarchical URI's can have an authority, make\r
+                       // sure this URI is of the proper format.\r
+                       this.hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The username of the URI.  Only valid for hierarchical\r
+                * URI's.  If the URI is relative, this will be an empty\r
+                * string.\r
+                * \r
+                * <p>The URI specification allows for authentication\r
+                * credentials to be embedded in the URI as such:</p>\r
+                * \r
+                * <p>http://user:passwd&#64;host/path/to/file.htm</p>\r
+                * \r
+                * <p>When setting this value, the string\r
+                * given is assumed to be unescaped.  When retrieving this\r
+                * value, the resulting string is unescaped.</p>\r
+                */\r
+               public function get username() : String\r
+               {\r
+                       return URI.unescapeChars(_username);\r
+               }\r
+               public function set username(usernameStr:String) : void\r
+               {\r
+                       _username = URI.fastEscapeChars(usernameStr, URI.URIuserpassExcludedBitmap);\r
+                       \r
+                       // Only hierarchical URI's can have a username.\r
+                       this.hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The password of the URI.  Similar to username.\r
+                * @see URI.username\r
+                */\r
+               public function get password() : String\r
+               {\r
+                       return URI.unescapeChars(_password);\r
+               }\r
+               public function set password(passwordStr:String) : void\r
+               {\r
+                       _password = URI.fastEscapeChars(passwordStr,\r
+                               URI.URIuserpassExcludedBitmap);\r
+                       \r
+                       // Only hierarchical URI's can have a password.\r
+                       this.hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The host port number.  Only valid for hierarchical URI's.  If\r
+                * the URI is relative, this will be an empty string. URI's can\r
+                * contain the port number of the remote host:\r
+                * \r
+                * <p>http://site.com:8080/index.htm</p>\r
+                */\r
+               public function get port() : String\r
+               { \r
+                       return URI.unescapeChars(_port);\r
+               }\r
+               public function set port(portStr:String) : void\r
+               {\r
+                       _port = URI.escapeChars(portStr);\r
+                       \r
+                       // Only hierarchical URI's can have a port.\r
+                       this.hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The path portion of the URI.  Only valid for hierarchical\r
+                * URI's.  When setting this value, the string\r
+                * given is assumed to be unescaped.  When retrieving this\r
+                * value, the resulting string is unescaped.\r
+                * \r
+                * <p>The path portion can be in one of two formats. 1) an absolute\r
+                * path, or 2) a relative path.  An absolute path starts with a\r
+                * slash ('/'), a relative path does not.</p>\r
+                * \r
+                * <p>An absolute path may look like:</p>\r
+                * <listing>/full/path/to/my/file.htm</listing>\r
+                * \r
+                * <p>A relative path may look like:</p>\r
+                * <listing>\r
+                * path/to/my/file.htm\r
+                * ../images/logo.gif\r
+                * ../../reports/index.htm\r
+                * </listing>\r
+                * \r
+                * <p>Paths can be absolute or relative.  Note that this not the same as\r
+                * an absolute or relative URI.  An absolute URI can only have absolute\r
+                * paths.  For example:</p>\r
+                * \r
+                * <listing>http:/site.com/path/to/file.htm</listing>\r
+                * \r
+                * <p>This absolute URI has an absolute path of "/path/to/file.htm".</p>\r
+                * \r
+                * <p>Relative URI's can have either absolute paths or relative paths.\r
+                * All of the following relative URI's are valid:</p>\r
+                * \r
+                * <listing>\r
+                * /absolute/path/to/file.htm\r
+                * path/to/file.htm\r
+                * ../path/to/file.htm\r
+                * </listing>\r
+                */\r
+               public function get path() : String\r
+               { \r
+                       return URI.unescapeChars(_path);\r
+               }\r
+               public function set path(pathStr:String) : void\r
+               {       \r
+                       this._path = URI.fastEscapeChars(pathStr, URI.URIpathExcludedBitmap);\r
+               \r
+                       if (this._scheme == UNKNOWN_SCHEME)\r
+                       {\r
+                               // We set the path.  This is a valid URI now.\r
+                               this._scheme = "";\r
+                       }\r
+               \r
+                       // Only hierarchical URI's can have a path.\r
+                       hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The query (CGI) portion of the URI.  This part is valid for\r
+                * both hierarchical and non-hierarchical URI's.\r
+                * \r
+                * <p>This accessor should only be used if a custom query syntax\r
+                * is used.  This URI class supports the common "param=value"\r
+                * style query syntax via the get/setQueryValue() and\r
+                * get/setQueryByMap() functions.  Those functions should be used\r
+                * instead if the common syntax is being used.\r
+                * \r
+                * <p>The URI RFC does not specify any particular\r
+                * syntax for the query part of a URI.  It is intended to allow\r
+                * any format that can be agreed upon by the two communicating hosts.\r
+                * However, most systems have standardized on the typical CGI\r
+                * format:</p>\r
+                * \r
+                * <listing>http://site.com/script.php?param1=value1&param2=value2</listing>\r
+                * \r
+                * <p>This class has specific support for this query syntax</p>\r
+                * \r
+                * <p>This common query format is an array of name/value\r
+                * pairs with its own syntax that is different from the overall URI\r
+                * syntax.  The query has its own escaping logic.  For a query part\r
+                * to be properly escaped and unescaped, it must be split into its\r
+                * component parts.  This accessor escapes/unescapes the entire query\r
+                * part without regard for it's component parts.  This has the\r
+                * possibliity of leaving the query string in an ambiguious state in\r
+                * regards to its syntax.  If the contents of the query part are\r
+                * important, it is recommended that get/setQueryValue() or\r
+                * get/setQueryByMap() are used instead.</p>\r
+                * \r
+                * If a different query syntax is being used, a subclass of URI\r
+                * can be created to handle that specific syntax.\r
+                *  \r
+                * @see URI.getQueryValue, URI.getQueryByMap\r
+                */\r
+               public function get query() : String\r
+               { \r
+                       return URI.unescapeChars(_query);\r
+               }\r
+               public function set query(queryStr:String) : void\r
+               {\r
+                       _query = URI.fastEscapeChars(queryStr, URI.URIqueryExcludedBitmap);\r
+                       \r
+                       // both hierarchical and non-hierarchical URI's can\r
+                       // have a query.  Do not set the hierState.\r
+               }\r
+               \r
+               /**\r
+                * Accessor to the raw query data.  If you are using a custom query\r
+                * syntax, this accessor can be used to get and set the query part\r
+                * directly with no escaping/unescaping.  This should ONLY be used\r
+                * if your application logic is handling custom query logic and\r
+                * handling the proper escaping of the query part.\r
+                */\r
+               public function get queryRaw() : String\r
+               {\r
+                       return _query;\r
+               }\r
+               public function set queryRaw(queryStr:String) : void\r
+               {\r
+                       _query = queryStr;\r
+               }\r
+\r
+\r
+               /**\r
+                * The fragment (anchor) portion of the URI.  This is valid for\r
+                * both hierarchical and non-hierarchical URI's.\r
+                */\r
+               public function get fragment() : String\r
+               { \r
+                       return URI.unescapeChars(_fragment);\r
+               }\r
+               public function set fragment(fragmentStr:String) : void\r
+               {\r
+                       _fragment = URI.fastEscapeChars(fragmentStr, URIfragmentExcludedBitmap);\r
+\r
+                       // both hierarchical and non-hierarchical URI's can\r
+                       // have a fragment.  Do not set the hierState.\r
+               }\r
+               \r
+               \r
+               /**\r
+                * The non-hierarchical part of the URI.  For example, if\r
+                * this URI object represents "mailto:somebody@company.com",\r
+                * this will contain "somebody@company.com".  This is valid only\r
+                * for non-hierarchical URI's.  \r
+                */\r
+               public function get nonHierarchical() : String\r
+               { \r
+                       return URI.unescapeChars(_nonHierarchical);\r
+               }\r
+               public function set nonHierarchical(nonHier:String) : void\r
+               {\r
+                       _nonHierarchical = URI.fastEscapeChars(nonHier, URInonHierexcludedBitmap);\r
+                       \r
+                       // This is a non-hierarchical URI.\r
+                       this.hierState = false;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Quick shorthand accessor to set the parts of this URI.\r
+                * The given parts are assumed to be in unescaped form.  If\r
+                * the URI is non-hierarchical (e.g. mailto:) you will need\r
+                * to call SetScheme() and SetNonHierarchical().\r
+                */\r
+               public function setParts(schemeStr:String, authorityStr:String,\r
+                               portStr:String, pathStr:String, queryStr:String,\r
+                               fragmentStr:String) : void\r
+               {\r
+                       this.scheme = schemeStr;\r
+                       this.authority = authorityStr;\r
+                       this.port = portStr;\r
+                       this.path = pathStr;\r
+                       this.query = queryStr;\r
+                       this.fragment = fragmentStr;\r
+\r
+                       hierState = true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * URI escapes the given character string.  This is similar in function\r
+                * to the global encodeURIComponent() function in ActionScript, but is\r
+                * slightly different in regards to which characters get escaped.  This\r
+                * escapes the characters specified in the URIbaselineExluded set (see class\r
+                * static members).  This is needed for this class to work properly.\r
+                * \r
+                * <p>If a different set of characters need to be used for the escaping,\r
+                * you may use fastEscapeChars() and specify a custom URIEncodingBitmap\r
+                * that contains the characters your application needs escaped.</p>\r
+                * \r
+                * <p>Never pass a full URI to this function.  A URI can only be properly\r
+                * escaped/unescaped when split into its component parts (see RFC 3986\r
+                * section 2.4).  This is due to the fact that the URI component separators\r
+                * could be characters that would normally need to be escaped.</p>\r
+                * \r
+                * @param unescaped character string to be escaped.\r
+                * \r
+                * @return      escaped character string\r
+                * \r
+                * @see encodeURIComponent\r
+                * @see fastEscapeChars\r
+                */\r
+               static public function escapeChars(unescaped:String) : String\r
+               {\r
+                       // This uses the excluded set by default.\r
+                       return fastEscapeChars(unescaped, URI.URIbaselineExcludedBitmap);\r
+               }\r
+               \r
+\r
+               /**\r
+                * Unescape any URI escaped characters in the given character\r
+                * string.\r
+                * \r
+                * <p>Never pass a full URI to this function.  A URI can only be properly\r
+                * escaped/unescaped when split into its component parts (see RFC 3986\r
+                * section 2.4).  This is due to the fact that the URI component separators\r
+                * could be characters that would normally need to be escaped.</p>\r
+                * \r
+                * @param escaped the escaped string to be unescaped.\r
+                * \r
+                * @return      unescaped string.\r
+                */\r
+               static public function unescapeChars(escaped:String /*, onlyHighASCII:Boolean = false*/) : String\r
+               {\r
+                       // We can just use the default AS function.  It seems to\r
+                       // decode everything correctly\r
+                       var unescaped:String;\r
+                       unescaped = decodeURIComponent(escaped);\r
+                       return unescaped;\r
+               }\r
+               \r
+               /**\r
+                * Performance focused function that escapes the given character\r
+                * string using the given URIEncodingBitmap as the rule for what\r
+                * characters need to be escaped.  This function is used by this\r
+                * class and can be used externally to this class to perform\r
+                * escaping on custom character sets.\r
+                * \r
+                * <p>Never pass a full URI to this function.  A URI can only be properly\r
+                * escaped/unescaped when split into its component parts (see RFC 3986\r
+                * section 2.4).  This is due to the fact that the URI component separators\r
+                * could be characters that would normally need to be escaped.</p>\r
+                * \r
+                * @param unescaped             the unescaped string to be escaped\r
+                * @param bitmap                the set of characters that need to be escaped\r
+                * \r
+                * @return      the escaped string.\r
+                */\r
+               static public function fastEscapeChars(unescaped:String, bitmap:URIEncodingBitmap) : String\r
+               {\r
+                       var escaped:String = "";\r
+                       var c:String;\r
+                       var x:int, i:int;\r
+                       \r
+                       for (i = 0; i < unescaped.length; i++)\r
+                       {\r
+                               c = unescaped.charAt(i);\r
+                               \r
+                               x = bitmap.ShouldEscape(c);\r
+                               if (x)\r
+                               {\r
+                                       c = x.toString(16);\r
+                                       if (c.length == 1)\r
+                                               c = "0" + c;\r
+                                               \r
+                                       c = "%" + c;\r
+                                       c = c.toUpperCase();\r
+                               }\r
+                               \r
+                               escaped += c;\r
+                       }\r
+                       \r
+                       return escaped;\r
+               }\r
+\r
+               \r
+               /**\r
+                * Is this URI of a particular scheme type?  For example,\r
+                * passing "http" to a URI object that represents the URI\r
+                * "http://site.com/" would return true.\r
+                * \r
+                * @param scheme        scheme to check for\r
+                * \r
+                * @return true if this URI object is of the given type, false\r
+                * otherwise.\r
+                */\r
+               public function isOfType(scheme:String) : Boolean\r
+               {\r
+                       // Schemes are never case sensitive.  Ignore case.\r
+                       scheme = scheme.toLowerCase();\r
+                       return (this._scheme == scheme);\r
+               }\r
+\r
+\r
+               /**\r
+                * Get the value for the specified named in the query part.  This\r
+                * assumes the query part of the URI is in the common\r
+                * "name1=value1&name2=value2" syntax.  Do not call this function\r
+                * if you are using a custom query syntax.\r
+                * \r
+                * @param name  name of the query value to get.\r
+                * \r
+                * @return the value of the query name, empty string if the\r
+                * query name does not exist.\r
+                */\r
+               public function getQueryValue(name:String) : String\r
+               {\r
+                       var map:Object;\r
+                       var item:String;\r
+                       var value:String;\r
+               \r
+                       map = getQueryByMap();\r
+               \r
+                       for (item in map)\r
+                       {\r
+                               if (item == name)\r
+                               {\r
+                                       value = map[item];\r
+                                       return value;\r
+                               }\r
+                       }\r
+               \r
+                       // Didn't find the specified key\r
+                       return new String("");\r
+               }\r
+               \r
+\r
+               /**\r
+                * Set the given value on the given query name.  If the given name\r
+                * does not exist, it will automatically add this name/value pair\r
+                * to the query.  If null is passed as the value, it will remove\r
+                * the given item from the query.\r
+                * \r
+                * <p>This automatically escapes any characters that may conflict with\r
+                * the query syntax so that they are "safe" within the query.  The\r
+                * strings passed are assumed to be literal unescaped name and value.</p>\r
+                * \r
+                * @param name  name of the query value to set\r
+                * @param value value of the query item to set.  If null, this will\r
+                * force the removal of this item from the query.\r
+                */\r
+               public function setQueryValue(name:String, value:String) : void\r
+               {\r
+                       var map:Object;\r
+\r
+                       map = getQueryByMap();\r
+               \r
+                       // If the key doesn't exist yet, this will create a new pair in\r
+                       // the map.  If it does exist, this will overwrite the previous\r
+                       // value, which is what we want.\r
+                       map[name] = value;\r
+               \r
+                       setQueryByMap(map);\r
+               }\r
+\r
+               \r
+               /**\r
+                * Get the query of the URI in an Object class that allows for easy\r
+                * access to the query data via Object accessors.  For example:\r
+                * \r
+                * <listing>\r
+                * var query:Object = uri.getQueryByMap();\r
+                * var value:String = query["param"];    // get a value\r
+                * query["param2"] = "foo";   // set a new value\r
+                * </listing>\r
+                * \r
+                * @return Object that contains the name/value pairs of the query.\r
+                * \r
+                * @see #setQueryByMap\r
+                * @see #getQueryValue\r
+                * @see #setQueryValue\r
+                */\r
+               public function getQueryByMap() : Object\r
+               {\r
+                       var queryStr:String;\r
+                       var pair:String;\r
+                       var pairs:Array;\r
+                       var item:Array;\r
+                       var name:String, value:String;\r
+                       var index:int;\r
+                       var map:Object = new Object();\r
+               \r
+               \r
+                       // We need the raw query string, no unescaping.\r
+                       queryStr = this._query;\r
+                       \r
+                       pairs = queryStr.split('&');\r
+                       for each (pair in pairs)\r
+                       {\r
+                               if (pair.length == 0)\r
+                                 continue;\r
+                                 \r
+                               item = pair.split('=');\r
+                               \r
+                               if (item.length > 0)\r
+                                       name = item[0];\r
+                               else\r
+                                       continue;  // empty array\r
+                               \r
+                               if (item.length > 1)\r
+                                       value = item[1];\r
+                               else\r
+                                       value = "";\r
+                                       \r
+                               name = queryPartUnescape(name);\r
+                               value = queryPartUnescape(value);\r
+                               \r
+                               map[name] = value;\r
+                       }\r
+       \r
+                       return map;\r
+               }\r
+               \r
+\r
+               /**\r
+                * Set the query part of this URI using the given object as the\r
+                * content source.  Any member of the object that has a value of\r
+                * null will not be in the resulting query.\r
+                * \r
+                * @param map   object that contains the name/value pairs as\r
+                *    members of that object.\r
+                * \r
+                * @see #getQueryByMap\r
+                * @see #getQueryValue\r
+                * @see #setQueryValue\r
+                */\r
+               public function setQueryByMap(map:Object) : void\r
+               {\r
+                       var item:String;\r
+                       var name:String, value:String;\r
+                       var queryStr:String = "";\r
+                       var tmpPair:String;\r
+                       var foo:String;\r
+               \r
+                       for (item in map)\r
+                       {\r
+                               name = item;\r
+                               value = map[item];\r
+               \r
+                               if (value == null)\r
+                                       value = "";\r
+                               \r
+                               // Need to escape the name/value pair so that they\r
+                               // don't conflict with the query syntax (specifically\r
+                               // '=', '&', and <whitespace>).\r
+                               name = queryPartEscape(name);\r
+                               value = queryPartEscape(value);\r
+                               \r
+                               tmpPair = name;\r
+                               \r
+                               if (value.length > 0)\r
+                               {\r
+                                       tmpPair += "=";\r
+                                       tmpPair += value;\r
+                               }\r
+\r
+                               if (queryStr.length != 0)\r
+                                       queryStr += '&';  // Add the separator\r
+               \r
+                               queryStr += tmpPair;\r
+                       }\r
+               \r
+                       // We don't want to escape.  We already escaped the\r
+                       // individual name/value pairs.  If we escaped the\r
+                       // query string again by assigning it to "query",\r
+                       // we would have double escaping.\r
+                       _query = queryStr;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Similar to Escape(), except this also escapes characters that\r
+                * would conflict with the name/value pair query syntax.  This is\r
+                * intended to be called on each individual "name" and "value"\r
+                * in the query making sure that nothing in the name or value\r
+                * strings contain characters that would conflict with the query\r
+                * syntax (e.g. '=' and '&').\r
+                * \r
+                * @param unescaped             unescaped string that is to be escaped.\r
+                * \r
+                * @return escaped string.\r
+                * \r
+                * @see #queryUnescape\r
+                */\r
+               static public function queryPartEscape(unescaped:String) : String\r
+               {\r
+                       var escaped:String = unescaped;\r
+                       escaped = URI.fastEscapeChars(unescaped, URI.URIqueryPartExcludedBitmap);\r
+                       return escaped;\r
+               }\r
+               \r
+\r
+               /**\r
+                * Unescape the individual name/value string pairs.\r
+                * \r
+                * @param escaped       escaped string to be unescaped\r
+                * \r
+                * @return unescaped string\r
+                * \r
+                * @see #queryEscape\r
+                */\r
+               static public function queryPartUnescape(escaped:String) : String\r
+               {\r
+                       var unescaped:String = escaped;\r
+                       unescaped = unescapeChars(unescaped);\r
+                       return unescaped;\r
+               }\r
+               \r
+               /**\r
+                * Output this URI as a string.  The resulting string is properly\r
+                * escaped and well formed for machine processing.\r
+                */\r
+               public function toString() : String\r
+               {\r
+                       if (this == null)\r
+                               return "";\r
+                       else\r
+                               return toStringInternal(false);\r
+               }\r
+               \r
+               /**\r
+                * Output the URI as a string that is easily readable by a human.\r
+                * This outputs the URI with all escape sequences unescaped to\r
+                * their character representation.  This makes the URI easier for\r
+                * a human to read, but the URI could be completely invalid\r
+                * because some unescaped characters may now cause ambiguous parsing.\r
+                * This function should only be used if you want to display a URI to\r
+                * a user.  This function should never be used outside that specific\r
+                * case.\r
+                * \r
+                * @return the URI in string format with all escape sequences\r
+                * unescaped.\r
+                * \r
+                * @see #toString\r
+                */\r
+               public function toDisplayString() : String\r
+               {\r
+                       return toStringInternal(true);\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private\r
+                * \r
+                * The guts of toString()\r
+                */\r
+               protected function toStringInternal(forDisplay:Boolean) : String\r
+               {\r
+                       var uri:String = "";\r
+                       var part:String = "";\r
+               \r
+                       if (isHierarchical() == false)\r
+                       {\r
+                               // non-hierarchical URI\r
+               \r
+                               uri += (forDisplay ? this.scheme : _scheme);\r
+                               uri += ":";\r
+                               uri += (forDisplay ? this.nonHierarchical : _nonHierarchical);\r
+                       }\r
+                       else\r
+                       {\r
+                               // Hierarchical URI\r
+               \r
+                               if (isRelative() == false)\r
+                               {\r
+                                       // If it is not a relative URI, then we want the scheme and\r
+                                       // authority parts in the string.  If it is relative, we\r
+                                       // do NOT want this stuff.\r
+               \r
+                                       if (_scheme.length != 0)\r
+                                       {\r
+                                               part = (forDisplay ? this.scheme : _scheme);\r
+                                               uri += part + ":";\r
+                                       }\r
+               \r
+                                       if (_authority.length != 0 || isOfType("file"))\r
+                                       {\r
+                                               uri += "//";\r
+               \r
+                                               // Add on any username/password associated with this\r
+                                               // authority\r
+                                               if (_username.length != 0)\r
+                                               {\r
+                                                       part = (forDisplay ? this.username : _username);\r
+                                                       uri += part;\r
+               \r
+                                                       if (_password.length != 0)\r
+                                                       {\r
+                                                               part = (forDisplay ? this.password : _password);\r
+                                                               uri += ":" + part;\r
+                                                       }\r
+               \r
+                                                       uri += "@";\r
+                                               }\r
+               \r
+                                               // add the authority\r
+                                               part = (forDisplay ? this.authority : _authority);\r
+                                               uri += part;\r
+               \r
+                                               // Tack on the port number, if any\r
+                                               if (port.length != 0)\r
+                                                       uri += ":" + port;\r
+                                       }\r
+                               }\r
+               \r
+                               // Tack on the path\r
+                               part = (forDisplay ? this.path : _path);\r
+                               uri += part;\r
+               \r
+                       } // end hierarchical part\r
+               \r
+                       // Both non-hier and hierarchical have query and fragment parts\r
+               \r
+                       // Add on the query and fragment parts\r
+                       if (_query.length != 0)\r
+                       {\r
+                               part = (forDisplay ? this.query : _query);\r
+                               uri += "?" + part;\r
+                       }\r
+               \r
+                       if (fragment.length != 0)\r
+                       {\r
+                               part = (forDisplay ? this.fragment : _fragment);\r
+                               uri += "#" + part;\r
+                       }\r
+               \r
+                       return uri;\r
+               }\r
+       \r
+               /**\r
+                * Forcefully ensure that this URI is properly escaped.\r
+                * \r
+                * <p>Sometimes URI's are constructed by hand using strings outside\r
+                * this class.  In those cases, it is unlikely the URI has been\r
+                * properly escaped.  This function forcefully escapes this URI\r
+                * by unescaping each part and then re-escaping it.  If the URI\r
+                * did not have any escaping, the first unescape will do nothing\r
+                * and then the re-escape will properly escape everything.  If\r
+                * the URI was already escaped, the unescape and re-escape will\r
+                * essentally be a no-op.  This provides a safe way to make sure\r
+                * a URI is in the proper escaped form.</p>\r
+                */\r
+               public function forceEscape() : void\r
+               {\r
+                       // The accessors for each of the members will unescape\r
+                       // and then re-escape as we get and assign them.\r
+                       \r
+                       // Handle the parts that are common for both hierarchical\r
+                       // and non-hierarchical URI's\r
+                       this.scheme = this.scheme;\r
+                       this.setQueryByMap(this.getQueryByMap());\r
+                       this.fragment = this.fragment;\r
+                       \r
+                       if (isHierarchical())\r
+                       {\r
+                               this.authority = this.authority;\r
+                               this.path = this.path;\r
+                               this.port = this.port;\r
+                               this.username = this.username;\r
+                               this.password = this.password;\r
+                       }\r
+                       else\r
+                       {\r
+                               this.nonHierarchical = this.nonHierarchical;\r
+                       }\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Does this URI point to a resource of the given file type?\r
+                * Given a file extension (or just a file name, this will strip the\r
+                * extension), check to see if this URI points to a file of that\r
+                * type.\r
+                * \r
+                * @param extension     string that contains a file extension with or\r
+                * without a dot ("html" and ".html" are both valid), or a file\r
+                * name with an extension (e.g. "index.html").\r
+                * \r
+                * @return true if this URI points to a resource with the same file\r
+                * file extension as the extension provided, false otherwise.\r
+                */\r
+               public function isOfFileType(extension:String) : Boolean\r
+               {\r
+                       var thisExtension:String;\r
+                       var index:int;\r
+               \r
+                       index = extension.lastIndexOf(".");\r
+                       if (index != -1)\r
+                       {\r
+                               // Strip the extension\r
+                               extension = extension.substr(index + 1);\r
+                       }\r
+                       else\r
+                       {\r
+                               // The caller passed something without a dot in it.  We\r
+                               // will assume that it is just a plain extension (e.g. "html").\r
+                               // What they passed is exactly what we want\r
+                       }\r
+               \r
+                       thisExtension = getExtension(true);\r
+               \r
+                       if (thisExtension == "")\r
+                               return false;\r
+               \r
+                       // Compare the extensions ignoring case\r
+                       if (compareStr(thisExtension, extension, false) == 0)\r
+                               return true;\r
+                       else\r
+                               return false;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Get the ".xyz" file extension from the filename in the URI.\r
+                * For example, if we have the following URI:\r
+                * \r
+                * <listing>http://something.com/path/to/my/page.html?form=yes&name=bob#anchor</listing>\r
+                * \r
+                * <p>This will return ".html".</p>\r
+                * \r
+                * @param minusDot   If true, this will strip the dot from the extension.\r
+                * If true, the above example would have returned "html".\r
+                * \r
+                * @return  the file extension\r
+                */\r
+               public function getExtension(minusDot:Boolean = false) : String\r
+               {\r
+                       var filename:String = getFilename();\r
+                       var extension:String;\r
+                       var index:int;\r
+               \r
+                       if (filename == "")\r
+                               return String("");\r
+               \r
+                       index = filename.lastIndexOf(".");\r
+               \r
+                       // If it doesn't have an extension, or if it is a "hidden" file,\r
+                       // it doesn't have an extension.  Hidden files on unix start with\r
+                       // a dot (e.g. ".login").\r
+                       if (index == -1 || index == 0)\r
+                               return String("");\r
+               \r
+                       extension = filename.substr(index);\r
+               \r
+                       // If the caller does not want the dot, remove it.\r
+                       if (minusDot && extension.charAt(0) == ".")\r
+                               extension = extension.substr(1);\r
+               \r
+                       return extension;\r
+               }\r
+               \r
+               /**\r
+                * Quick function to retrieve the file name off the end of a URI.\r
+                * \r
+                * <p>For example, if the URI is:</p>\r
+                * <listing>http://something.com/some/path/to/my/file.html</listing>\r
+                * <p>this function will return "file.html".</p>\r
+                * \r
+                * @param minusExtension true if the file extension should be stripped\r
+                * \r
+                * @return the file name.  If this URI is a directory, the return\r
+                * value will be empty string.\r
+                */\r
+               public function getFilename(minusExtension:Boolean = false) : String\r
+               {\r
+                       if (isDirectory())\r
+                               return String("");\r
+               \r
+                       var pathStr:String = this.path;\r
+                       var filename:String;\r
+                       var index:int;\r
+               \r
+                       // Find the last path separator.\r
+                       index = pathStr.lastIndexOf("/");\r
+               \r
+                       if (index != -1)\r
+                               filename = pathStr.substr(index + 1);\r
+                       else\r
+                               filename = pathStr;\r
+               \r
+                       if (minusExtension)\r
+                       {\r
+                               // The caller has requested that the extension be removed\r
+                               index = filename.lastIndexOf(".");\r
+               \r
+                               if (index != -1)\r
+                                       filename = filename.substr(0, index);\r
+                       }\r
+               \r
+                       return filename;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * @private\r
+                * Helper function to compare strings.\r
+                * \r
+                * @return true if the two strings are identical, false otherwise.\r
+                */\r
+               static protected function compareStr(str1:String, str2:String,\r
+                       sensitive:Boolean = true) : Boolean\r
+               {\r
+                       if (sensitive == false)\r
+                       {\r
+                               str1 = str1.toLowerCase();\r
+                               str2 = str2.toLowerCase();\r
+                       }\r
+                       \r
+                       return (str1 == str2)\r
+               }\r
+               \r
+               /**\r
+                * Based on the type of this URI (http, ftp, etc.) get\r
+                * the default port used for that protocol.  This is\r
+                * just intended to be a helper function for the most\r
+                * common cases.\r
+                */\r
+               public function getDefaultPort() : String\r
+               {\r
+                       if (_scheme == "http")\r
+                               return String("80");\r
+                       else if (_scheme == "ftp")\r
+                               return String("21");\r
+                       else if (_scheme == "file")\r
+                               return String("");\r
+                       else if (_scheme == "sftp")\r
+                               return String("22"); // ssh standard port\r
+                       else\r
+                       {\r
+                               // Don't know the port for this URI type\r
+                               return String("");\r
+                       }\r
+               }\r
+               \r
+               /**\r
+                * @private\r
+                * \r
+                * This resolves the given URI if the application has a\r
+                * resolver interface defined.  This function does not\r
+                * modify the passed in URI and returns a new URI.\r
+                */\r
+               static protected function resolve(uri:URI) : URI\r
+               {\r
+                       var copy:URI = new URI();\r
+                       copy.copyURI(uri);\r
+                       \r
+                       if (_resolver != null)\r
+                       {\r
+                               // A resolver class has been registered.  Call it.\r
+                               return _resolver.resolve(copy);\r
+                       }\r
+                       else\r
+                       {\r
+                               // No resolver.  Nothing to do, but we don't\r
+                               // want to reuse the one passed in.\r
+                               return copy;\r
+                       }\r
+               }\r
+               \r
+               /**\r
+                * Accessor to set and get the resolver object used by all URI\r
+                * objects to dynamically resolve URI's before comparison.\r
+                */\r
+               static public function set resolver(resolver:IURIResolver) : void\r
+               {\r
+                       _resolver = resolver;\r
+               }\r
+               static public function get resolver() : IURIResolver\r
+               {\r
+                       return _resolver;\r
+               }\r
+               \r
+               /**\r
+                * Given another URI, return this URI object's relation to the one given.\r
+                * URI's can have 1 of 4 possible relationships.  They can be unrelated,\r
+                * equal, parent, or a child of the given URI.\r
+                * \r
+                * @param uri   URI to compare this URI object to.\r
+                * @param caseSensitive  true if the URI comparison should be done\r
+                * taking case into account, false if the comparison should be\r
+                * performed case insensitive.\r
+                * \r
+                * @return URI.NOT_RELATED, URI.CHILD, URI.PARENT, or URI.EQUAL\r
+                */\r
+               public function getRelation(uri:URI, caseSensitive:Boolean = true) : int\r
+               {\r
+                       // Give the app a chance to resolve these URI's before we compare them.\r
+                       var thisURI:URI = URI.resolve(this);\r
+                       var thatURI:URI = URI.resolve(uri);\r
+                       \r
+                       if (thisURI.isRelative() || thatURI.isRelative())\r
+                       {\r
+                               // You cannot compare relative URI's due to their lack of context.\r
+                               // You could have two relative URI's that look like:\r
+                               //              ../../images/\r
+                               //              ../../images/marketing/logo.gif\r
+                               // These may appear related, but you have no overall context\r
+                               // from which to make the comparison.  The first URI could be\r
+                               // from one site and the other URI could be from another site.\r
+                               return URI.NOT_RELATED;\r
+                       }\r
+                       else if (thisURI.isHierarchical() == false || thatURI.isHierarchical() == false)\r
+                       {\r
+                               // One or both of the URI's are non-hierarchical.\r
+                               if (((thisURI.isHierarchical() == false) && (thatURI.isHierarchical() == true)) ||\r
+                                       ((thisURI.isHierarchical() == true) && (thatURI.isHierarchical() == false)))\r
+                               {\r
+                                       // XOR.  One is hierarchical and the other is\r
+                                       // non-hierarchical.  They cannot be compared.\r
+                                       return URI.NOT_RELATED;\r
+                               }\r
+                               else\r
+                               {\r
+                                       // They are both non-hierarchical\r
+                                       if (thisURI.scheme != thatURI.scheme)\r
+                                               return URI.NOT_RELATED;\r
+               \r
+                                       if (thisURI.nonHierarchical != thatURI.nonHierarchical)\r
+                                               return URI.NOT_RELATED;\r
+                                               \r
+                                       // The two non-hierarcical URI's are equal.\r
+                                       return URI.EQUAL;\r
+                               }\r
+                       }\r
+                       \r
+                       // Ok, this URI and the one we are being compared to are both\r
+                       // absolute hierarchical URI's.\r
+               \r
+                       if (thisURI.scheme != thatURI.scheme)\r
+                               return URI.NOT_RELATED;\r
+               \r
+                       if (thisURI.authority != thatURI.authority)\r
+                               return URI.NOT_RELATED;\r
+               \r
+                       var thisPort:String = thisURI.port;\r
+                       var thatPort:String = thatURI.port;\r
+                       \r
+                       // Different ports are considered completely different servers.\r
+                       if (thisPort == "")\r
+                               thisPort = thisURI.getDefaultPort();\r
+                       if (thatPort == "")\r
+                               thatPort = thatURI.getDefaultPort();\r
+               \r
+                       // Check to see if the port is the default port.\r
+                       if (thisPort != thatPort)\r
+                               return URI.NOT_RELATED;\r
+               \r
+                       if (compareStr(thisURI.path, thatURI.path, caseSensitive))\r
+                               return URI.EQUAL;\r
+               \r
+                       // Special case check.  If we are here, the scheme, authority,\r
+                       // and port match, and it is not a relative path, but the\r
+                       // paths did not match.  There is a special case where we\r
+                       // could have:\r
+                       //              http://something.com/\r
+                       //              http://something.com\r
+                       // Technically, these are equal.  So lets, check for this case.\r
+                       var thisPath:String = thisURI.path;\r
+                       var thatPath:String = thatURI.path;\r
+               \r
+                       if ( (thisPath == "/" || thatPath == "/") &&\r
+                                (thisPath == "" || thatPath == "") )\r
+                       {\r
+                               // We hit the special case.  These two are equal.\r
+                               return URI.EQUAL;\r
+                       }\r
+               \r
+                       // Ok, the paths do not match, but one path may be a parent/child\r
+                       // of the other.  For example, we may have:\r
+                       //              http://something.com/path/to/homepage/\r
+                       //              http://something.com/path/to/homepage/images/logo.gif\r
+                       // In this case, the first is a parent of the second (or the second\r
+                       // is a child of the first, depending on which you compare to the\r
+                       // other).  To make this comparison, we must split the path into\r
+                       // its component parts (split the string on the '/' path delimiter).\r
+                       // We then compare the \r
+                       var thisParts:Array, thatParts:Array;\r
+                       var thisPart:String, thatPart:String;\r
+                       var i:int;\r
+               \r
+                       thisParts = thisPath.split("/");\r
+                       thatParts = thatPath.split("/");\r
+               \r
+                       if (thisParts.length > thatParts.length)\r
+                       {\r
+                               thatPart = thatParts[thatParts.length - 1];\r
+                               if (thatPart.length > 0)\r
+                               {\r
+                                       // if the last part is not empty, the passed URI is\r
+                                       // not a directory.  There is no way the passed URI\r
+                                       // can be a parent.\r
+                                       return URI.NOT_RELATED;\r
+                               }\r
+                               else\r
+                               {\r
+                                       // Remove the empty trailing part\r
+                                       thatParts.pop();\r
+                               }\r
+                               \r
+                               // This may be a child of the one passed in\r
+                               for (i = 0; i < thatParts.length; i++)\r
+                               {\r
+                                       thisPart = thisParts[i];\r
+                                       thatPart = thatParts[i];\r
+                                               \r
+                                       if (compareStr(thisPart, thatPart, caseSensitive) == false)\r
+                                               return URI.NOT_RELATED;\r
+                               }\r
+               \r
+                               return URI.CHILD;\r
+                       }\r
+                       else if (thisParts.length < thatParts.length)\r
+                       {\r
+                               thisPart = thisParts[thisParts.length - 1];\r
+                               if (thisPart.length > 0)\r
+                               {\r
+                                       // if the last part is not empty, this URI is not a\r
+                                       // directory.  There is no way this object can be\r
+                                       // a parent.\r
+                                       return URI.NOT_RELATED;\r
+                               }\r
+                               else\r
+                               {\r
+                                       // Remove the empty trailing part\r
+                                       thisParts.pop();\r
+                               }\r
+                               \r
+                               // This may be the parent of the one passed in\r
+                               for (i = 0; i < thisParts.length; i++)\r
+                               {\r
+                                       thisPart = thisParts[i];\r
+                                       thatPart = thatParts[i];\r
+               \r
+                                       if (compareStr(thisPart, thatPart, caseSensitive) == false)\r
+                                               return URI.NOT_RELATED;\r
+                               }\r
+                               \r
+                               return URI.PARENT;\r
+                       }\r
+                       else\r
+                       {\r
+                               // Both URI's have the same number of path components, but\r
+                               // it failed the equivelence check above.  This means that\r
+                               // the two URI's are not related.\r
+                               return URI.NOT_RELATED;\r
+                       }\r
+                       \r
+                       // If we got here, the scheme and authority are the same,\r
+                       // but the paths pointed to two different locations that\r
+                       // were in different parts of the file system tree\r
+                       return URI.NOT_RELATED;\r
+               }\r
+               \r
+               /**\r
+                * Given another URI, return the common parent between this one\r
+                * and the provided URI.\r
+                * \r
+                * @param uri the other URI from which to find a common parent\r
+                * @para caseSensitive true if this operation should be done\r
+                * with case sensitive comparisons.\r
+                * \r
+                * @return the parent URI if successful, null otherwise.\r
+                */\r
+               public function getCommonParent(uri:URI, caseSensitive:Boolean = true) : URI\r
+               {\r
+                       var thisURI:URI = URI.resolve(this);\r
+                       var thatURI:URI = URI.resolve(uri);\r
+               \r
+                       if(!thisURI.isAbsolute() || !thatURI.isAbsolute() ||\r
+                               thisURI.isHierarchical() == false ||\r
+                               thatURI.isHierarchical() == false)\r
+                       {\r
+                               // Both URI's must be absolute hierarchical for this to\r
+                               // make sense.\r
+                               return null;\r
+                       }\r
+                       \r
+                       var relation:int = thisURI.getRelation(thatURI);\r
+                       if (relation == URI.NOT_RELATED)\r
+                       {\r
+                               // The given URI is not related to this one.  No\r
+                               // common parent.\r
+                               return null;\r
+                       }\r
+               \r
+                       thisURI.chdir(".");\r
+                       thatURI.chdir(".");\r
+                       \r
+                       var strBefore:String, strAfter:String;\r
+                       do\r
+                       {\r
+                               relation = thisURI.getRelation(thatURI, caseSensitive);\r
+                               if(relation == URI.EQUAL || relation == URI.PARENT)\r
+                                       break;\r
+               \r
+                               // If strBefore and strAfter end up being the same,\r
+                               // we know we are at the root of the path because\r
+                               // chdir("..") is doing nothing.\r
+                               strBefore = thisURI.toString();\r
+                               thisURI.chdir("..");\r
+                               strAfter = thisURI.toString();\r
+                       }\r
+                       while(strBefore != strAfter);\r
+               \r
+                       return thisURI;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * This function is used to move around in a URI in a way similar\r
+                * to the 'cd' or 'chdir' commands on Unix.  These operations are\r
+                * completely string based, using the context of the URI to\r
+                * determine the position within the path.  The heuristics used\r
+                * to determine the action are based off Appendix C in RFC 2396.\r
+                * \r
+                * <p>URI paths that end in '/' are considered paths that point to\r
+                * directories, while paths that do not end in '/' are files.  For\r
+                * example, if you execute chdir("d") on the following URI's:<br/>\r
+                *    1.  http://something.com/a/b/c/  (directory)<br/>\r
+                *    2.  http://something.com/a/b/c  (not directory)<br/>\r
+                * you will get:<br/>\r
+                *    1.  http://something.com/a/b/c/d<br/>\r
+                *    2.  http://something.com/a/b/d<br/></p>\r
+                * \r
+                * <p>See RFC 2396, Appendix C for more info.</p>\r
+                * \r
+                * @param reference     the URI or path to "cd" to.\r
+                * @param escape true if the passed reference string should be URI\r
+                * escaped before using it.\r
+                * \r
+                * @return true if the chdir was successful, false otherwise.\r
+                */\r
+               public function chdir(reference:String, escape:Boolean = false) : Boolean\r
+               {\r
+                       var uriReference:URI;\r
+                       var ref:String = reference;\r
+               \r
+                       if (escape)\r
+                               ref = URI.escapeChars(reference);\r
+               \r
+                       if (ref == "")\r
+                       {\r
+                               // NOOP\r
+                               return true;\r
+                       }\r
+                       else if (ref.substr(0, 2) == "//")\r
+                       {\r
+                               // Special case.  This is an absolute URI but without the scheme.\r
+                               // Take the scheme from this URI and tack it on.  This is\r
+                               // intended to make working with chdir() a little more\r
+                               // tolerant.\r
+                               var final:String = this.scheme + ":" + ref;\r
+                               \r
+                               return constructURI(final);\r
+                       }\r
+                       else if (ref.charAt(0) == "?")\r
+                       {\r
+                               // A relative URI that is just a query part is essentially\r
+                               // a "./?query".  We tack on the "./" here to make the rest\r
+                               // of our logic work.\r
+                               ref = "./" + ref;\r
+                       }\r
+               \r
+                       // Parse the reference passed in as a URI.  This way we\r
+                       // get any query and fragments parsed out as well.\r
+                       uriReference = new URI(ref);\r
+               \r
+                       if (uriReference.isAbsolute() ||\r
+                               uriReference.isHierarchical() == false)\r
+                       {\r
+                               // If the URI given is a full URI, it replaces this one.\r
+                               copyURI(uriReference);\r
+                               return true;\r
+                       }\r
+               \r
+               \r
+                       var thisPath:String, thatPath:String;\r
+                       var thisParts:Array, thatParts:Array;\r
+                       var thisIsDir:Boolean = false, thatIsDir:Boolean = false;\r
+                       var thisIsAbs:Boolean = false, thatIsAbs:Boolean = false;\r
+                       var lastIsDotOperation:Boolean = false;\r
+                       var curDir:String;\r
+                       var i:int;\r
+               \r
+                       thisPath = this.path;\r
+                       thatPath = uriReference.path;\r
+               \r
+                       if (thisPath.length > 0)\r
+                               thisParts = thisPath.split("/");\r
+                       else\r
+                               thisParts = new Array();\r
+                               \r
+                       if (thatPath.length > 0)\r
+                               thatParts = thatPath.split("/");\r
+                       else\r
+                               thatParts = new Array();\r
+                       \r
+                       if (thisParts.length > 0 && thisParts[0] == "")\r
+                       {\r
+                               thisIsAbs = true;\r
+                               thisParts.shift(); // pop the first one off the array\r
+                       }\r
+                       if (thisParts.length > 0 && thisParts[thisParts.length - 1] == "")\r
+                       {\r
+                               thisIsDir = true;\r
+                               thisParts.pop();  // pop the last one off the array\r
+                       }\r
+                               \r
+                       if (thatParts.length > 0 && thatParts[0] == "")\r
+                       {\r
+                               thatIsAbs = true;\r
+                               thatParts.shift(); // pop the first one off the array\r
+                       }\r
+                       if (thatParts.length > 0 && thatParts[thatParts.length - 1] == "")\r
+                       {\r
+                               thatIsDir = true;\r
+                               thatParts.pop();  // pop the last one off the array\r
+                       }\r
+                               \r
+                       if (thatIsAbs)\r
+                       {\r
+                               // The reference is an absolute path (starts with a slash).\r
+                               // It replaces this path wholesale.\r
+                               this.path = uriReference.path;\r
+               \r
+                               // And it inherits the query and fragment\r
+                               this.queryRaw = uriReference.queryRaw;\r
+                               this.fragment = uriReference.fragment;\r
+               \r
+                               return true;\r
+                       }\r
+                       else if (thatParts.length == 0 && uriReference.query == "")\r
+                       {\r
+                               // The reference must have only been a fragment.  Fragments just\r
+                               // get appended to whatever the current path is.  We don't want\r
+                               // to overwrite any query that may already exist, so this case\r
+                               // only takes on the new fragment.\r
+                               this.fragment = uriReference.fragment;\r
+                               return true;\r
+                       }\r
+                       else if (thisIsDir == false && thisParts.length > 0)\r
+                       {\r
+                               // This path ends in a file.  It goes away no matter what.\r
+                               thisParts.pop();\r
+                       }\r
+               \r
+                       // By default, this assumes the query and fragment of the reference\r
+                       this.queryRaw = uriReference.queryRaw;\r
+                       this.fragment = uriReference.fragment;\r
+               \r
+                       // Append the parts of the path from the passed in reference\r
+                       // to this object's path.\r
+                       thisParts = thisParts.concat(thatParts);\r
+                                       \r
+                       for(i = 0; i < thisParts.length; i++)\r
+                       {\r
+                               curDir = thisParts[i];\r
+                               lastIsDotOperation = false;\r
+               \r
+                               if (curDir == ".")\r
+                               {\r
+                                       thisParts.splice(i, 1);\r
+                                       i = i - 1;  // account for removing this item\r
+                                       lastIsDotOperation = true;\r
+                               }\r
+                               else if (curDir == "..")\r
+                               {\r
+                                       if (i >= 1)\r
+                                       {\r
+                                               if (thisParts[i - 1] == "..")\r
+                                               {\r
+                                                       // If the previous is a "..", we must have skipped\r
+                                                       // it due to this URI being relative.  We can't\r
+                                                       // collapse leading ".."s in a relative URI, so\r
+                                                       // do nothing.\r
+                                               }\r
+                                               else\r
+                                               {\r
+                                                       thisParts.splice(i - 1, 2);\r
+                                                       i = i - 2;  // move back to account for the 2 we removed\r
+                                               }\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               // This is the first thing in the path.\r
+               \r
+                                               if (isRelative())\r
+                                               {\r
+                                                       // We can't collapse leading ".."s in a relative\r
+                                                       // path.  Do noting.\r
+                                               }\r
+                                               else\r
+                                               {\r
+                                                       // This is an abnormal case.  We have dot-dotted up\r
+                                                       // past the base of our "file system".  This is a\r
+                                                       // case where we had a /path/like/this.htm and were\r
+                                                       // given a path to chdir to like this:\r
+                                                       // ../../../../../../mydir\r
+                                                       // Obviously, it has too many ".." and will take us\r
+                                                       // up beyond the top of the URI.  However, according\r
+                                                       // RFC 2396 Appendix C.2, we should try to handle\r
+                                                       // these abnormal cases appropriately.  In this case,\r
+                                                       // we will do what UNIX command lines do if you are\r
+                                                       // at the root (/) of the filesystem and execute:\r
+                                                       // # cd ../../../../../bin\r
+                                                       // Which will put you in /bin.  Essentially, the extra\r
+                                                       // ".."'s will just get eaten.\r
+               \r
+                                                       thisParts.splice(i, 1);\r
+                                                       i = i - 1;  // account for the ".." we just removed\r
+                                               }\r
+                                       }\r
+               \r
+                                       lastIsDotOperation = true;\r
+                               }\r
+                       }\r
+                       \r
+                       var finalPath:String = "";\r
+               \r
+                       // If the last thing in the path was a "." or "..", then this thing is a\r
+                       // directory.  If the last thing isn't a dot-op, then we don't want to \r
+                       // blow away any information about the directory (hence the "|=" binary\r
+                       // assignment).\r
+                       thatIsDir = thatIsDir || lastIsDotOperation;\r
+               \r
+                       // Reconstruct the path with the abs/dir info we have\r
+                       finalPath = joinPath(thisParts, thisIsAbs, thatIsDir);\r
+               \r
+                       // Set the path (automatically escaping it)\r
+                       this.path = finalPath;\r
+               \r
+                       return true;\r
+               }\r
+               \r
+               /**\r
+                * @private\r
+                * Join an array of path parts back into a URI style path string.\r
+                * This is used by the various path logic functions to recombine\r
+                * a path.  This is different than the standard Array.join()\r
+                * function because we need to take into account the starting and\r
+                * ending path delimiters if this is an absolute path or a\r
+                * directory.\r
+                * \r
+                * @param parts the Array that contains strings of each path part.\r
+                * @param isAbs         true if the given path is absolute\r
+                * @param isDir         true if the given path is a directory\r
+                * \r
+                * @return the combined path string.\r
+                */\r
+               protected function joinPath(parts:Array, isAbs:Boolean, isDir:Boolean) : String\r
+               {\r
+                       var pathStr:String = "";\r
+                       var i:int;\r
+               \r
+                       for (i = 0; i < parts.length; i++)\r
+                       {\r
+                               if (pathStr.length > 0)\r
+                                       pathStr += "/";\r
+               \r
+                               pathStr += parts[i];\r
+                       }\r
+               \r
+                       // If this path is a directory, tack on the directory delimiter,\r
+                       // but only if the path contains something.  Adding this to an\r
+                       // empty path would make it "/", which is an absolute path that\r
+                       // starts at the root.\r
+                       if (isDir && pathStr.length > 0)\r
+                               pathStr += "/";\r
+               \r
+                       if (isAbs)\r
+                               pathStr = "/" + pathStr;\r
+               \r
+                       return pathStr;\r
+               }\r
+               \r
+               /**\r
+                * Given an absolute URI, make this relative URI absolute using\r
+                * the given URI as a base.  This URI instance must be relative\r
+                * and the base_uri must be absolute.\r
+                * \r
+                * @param base_uri      URI to use as the base from which to make\r
+                * this relative URI into an absolute URI.\r
+                * \r
+                * @return true if successful, false otherwise.\r
+                */\r
+               public function makeAbsoluteURI(base_uri:URI) : Boolean\r
+               {\r
+                       if (isAbsolute() || base_uri.isRelative())\r
+                       {\r
+                               // This URI needs to be relative, and the base needs to be\r
+                               // absolute otherwise we won't know what to do!\r
+                               return false;\r
+                       }\r
+               \r
+                       // Make a copy of the base URI.  We don't want to modify\r
+                       // the passed URI.\r
+                       var base:URI = new URI();\r
+                       base.copyURI(base_uri);\r
+               \r
+                       // ChDir on the base URI.  This will preserve any query\r
+                       // and fragment we have.\r
+                       if (base.chdir(toString()) == false)\r
+                               return false;\r
+               \r
+                       // It worked, so copy the base into this one\r
+                       copyURI(base);\r
+               \r
+                       return true;\r
+               }\r
+               \r
+               \r
+               /**\r
+                * Given a URI to use as a base from which this object should be\r
+                * relative to, convert this object into a relative URI.  For example,\r
+                * if you have:\r
+                * \r
+                * <listing>\r
+                * var uri1:URI = new URI("http://something.com/path/to/some/file.html");\r
+                * var uri2:URI = new URI("http://something.com/path/to/another/file.html");\r
+                * \r
+                * uri1.MakeRelativePath(uri2);</listing>\r
+                * \r
+                * <p>uri1 will have a final value of "../some/file.html"</p>\r
+                * \r
+                * <p>Note! This function is brute force.  If you have two URI's\r
+                * that are completely unrelated, this will still attempt to make\r
+                * the relative URI.  In that case, you will most likely get a\r
+                * relative path that looks something like:</p>\r
+                * \r
+                * <p>../../../../../../some/path/to/my/file.html</p>\r
+                * \r
+                * @param base_uri the URI from which to make this URI relative\r
+                * \r
+                * @return true if successful, false if the base_uri and this URI\r
+                * are not related, of if error.\r
+                */\r
+               public function makeRelativeURI(base_uri:URI, caseSensitive:Boolean = true) : Boolean\r
+               {\r
+                       var base:URI = new URI();\r
+                       base.copyURI(base_uri);\r
+                       \r
+                       var thisParts:Array, thatParts:Array;\r
+                       var finalParts:Array = new Array();\r
+                       var thisPart:String, thatPart:String, finalPath:String;\r
+                       var pathStr:String = this.path;\r
+                       var queryStr:String = this.queryRaw;\r
+                       var fragmentStr:String = this.fragment;\r
+                       var i:int;\r
+                       var diff:Boolean = false;\r
+                       var isDir:Boolean = false;\r
+               \r
+                       if (isRelative())\r
+                       {\r
+                               // We're already relative.\r
+                               return true;\r
+                       }\r
+               \r
+                       if (base.isRelative())\r
+                       {\r
+                               // The base is relative.  A relative base doesn't make sense.\r
+                               return false;\r
+                       }\r
+               \r
+               \r
+                       if ( (isOfType(base_uri.scheme) == false) ||\r
+                               (this.authority != base_uri.authority) )\r
+                       {\r
+                               // The schemes and/or authorities are different.  We can't\r
+                               // make a relative path to something that is completely\r
+                               // unrelated.\r
+                               return false;\r
+                       }\r
+               \r
+                       // Record the state of this URI\r
+                       isDir = isDirectory();\r
+               \r
+                       // We are based of the directory of the given URI.  We need to\r
+                       // make sure the URI is pointing to a directory.  Changing\r
+                       // directory to "." will remove any file name if the base is\r
+                       // not a directory.\r
+                       base.chdir(".");\r
+               \r
+                       thisParts = pathStr.split("/");\r
+                       thatParts = base.path.split("/");\r
+                       \r
+                       if (thisParts.length > 0 && thisParts[0] == "")\r
+                               thisParts.shift();\r
+                       \r
+                       if (thisParts.length > 0 && thisParts[thisParts.length - 1] == "")\r
+                       {\r
+                               isDir = true;\r
+                               thisParts.pop();\r
+                       }\r
+                       \r
+                       if (thatParts.length > 0 && thatParts[0] == "")\r
+                               thatParts.shift();\r
+                       if (thatParts.length > 0 && thatParts[thatParts.length - 1] == "")\r
+                               thatParts.pop();\r
+               \r
+               \r
+                       // Now that we have the paths split into an array of directories,\r
+                       // we can compare the two paths.  We start from the left of side\r
+                       // of the path and start comparing.  When we either run out of\r
+                       // directories (one path is longer than the other), or we find\r
+                       // a directory that is different, we stop.  The remaining parts\r
+                       // of each path is then used to determine the relative path.  For\r
+                       // example, lets say we have:\r
+                       //    path we want to make relative: /a/b/c/d/e.txt\r
+                       //    path to use as base for relative: /a/b/f/\r
+                       //\r
+                       // This loop will start at the left, and remove directories\r
+                       // until we get a mismatch or run off the end of one of them.\r
+                       // In this example, the result will be:\r
+                       //    c/d/e.txt\r
+                       //    f\r
+                       //\r
+                       // For every part left over in the base path, we prepend a ".."\r
+                       // to the relative to get the final path:\r
+                       //   ../c/d/e.txt\r
+                       while(thatParts.length > 0)\r
+                       {\r
+                               if (thisParts.length == 0)\r
+                               {\r
+                                       // we matched all there is to match, we are done.\r
+                                       // This is the case where "this" object is a parent\r
+                                       // path of the given URI.  eg:\r
+                                       //   this.path = /a/b/                          (thisParts)\r
+                                       //   base.path = /a/b/c/d/e/            (thatParts)\r
+                                       break;\r
+                               }\r
+               \r
+                               thisPart = thisParts[0];\r
+                               thatPart = thatParts[0];\r
+               \r
+                               if (compareStr(thisPart, thatPart, caseSensitive))\r
+                               {\r
+                                       thisParts.shift();\r
+                                       thatParts.shift();\r
+                               }\r
+                               else\r
+                                       break;\r
+                       }\r
+               \r
+                       // If there are any path info left from the base URI, that means\r
+                       // **this** object is above the given URI in the file tree.  For\r
+                       // each part left over in the given URI, we need to move up one\r
+                       // directory to get where we are.\r
+                       var dotdot:String = "..";\r
+                       for (i = 0; i < thatParts.length; i++)\r
+                       {\r
+                               finalParts.push(dotdot);\r
+                       }\r
+               \r
+                       // Append the parts of this URI to any dot-dot's we have\r
+                       finalParts = finalParts.concat(thisParts);\r
+               \r
+                       // Join the parts back into a path\r
+                       finalPath = joinPath(finalParts, false /* not absolute */, isDir);\r
+               \r
+                       if (finalPath.length == 0)\r
+                       {\r
+                               // The two URI's are exactly the same.  The proper relative\r
+                               // path is:\r
+                               finalPath = "./";\r
+                       }\r
+               \r
+                       // Set the parts of the URI, preserving the original query and\r
+                       // fragment parts.\r
+                       setParts("", "", "", finalPath, queryStr, fragmentStr);\r
+               \r
+                       return true;\r
+               }\r
+               \r
+               /**\r
+                * Given a string, convert it to a URI.  The string could be a\r
+                * full URI that is improperly escaped, a malformed URI (e.g.\r
+                * missing a protocol like "www.something.com"), a relative URI,\r
+                * or any variation there of.\r
+                * \r
+                * <p>The intention of this function is to take anything that a\r
+                * user might manually enter as a URI/URL and try to determine what\r
+                * they mean.  This function differs from the URI constructor in\r
+                * that it makes some assumptions to make it easy to import user\r
+                * entered URI data.</p>\r
+                * \r
+                * <p>This function is intended to be a helper function.\r
+                * It is not all-knowning and will probably make mistakes\r
+                * when attempting to parse a string of unknown origin.  If\r
+                * your applicaiton is receiving input from the user, your\r
+                * application should already have a good idea what the user\r
+                * should  be entering, and your application should be\r
+                * pre-processing the user's input to make sure it is well formed\r
+                * before passing it to this function.</p>\r
+                * \r
+                * <p>It is assumed that the string given to this function is\r
+                * something the user may have manually entered.  Given this,\r
+                * the URI string is probably unescaped or improperly escaped.\r
+                * This function will attempt to properly escape the URI by\r
+                * using forceEscape().  The result is that a toString() call\r
+                * on a URI that was created from unknownToURI() may not match\r
+                * the input string due to the difference in escaping.</p>\r
+                *\r
+                * @param unknown       a potental URI string that should be parsed\r
+                * and loaded into this object.\r
+                * @param defaultScheme if it is determined that the passed string\r
+                * looks like a URI, but it is missing the scheme part, this\r
+                * string will be used as the missing scheme.\r
+                * \r
+                * @return      true if the given string was successfully parsed into\r
+                * a valid URI object, false otherwise.\r
+                */\r
+               public function unknownToURI(unknown:String, defaultScheme:String = "http") : Boolean\r
+               {\r
+                       var temp:String;\r
+                       \r
+                       if (unknown.length == 0)\r
+                       {\r
+                               this.initialize();\r
+                               return false;\r
+                       }\r
+                       \r
+                       // Some users love the backslash key.  Fix it.\r
+                       unknown = unknown.replace(/\\/g, "/");\r
+                       \r
+                       // Check for any obviously missing scheme.\r
+                       if (unknown.length >= 2)\r
+                       {\r
+                               temp = unknown.substr(0, 2);\r
+                               if (temp == "//")\r
+                                       unknown = defaultScheme + ":" + unknown;\r
+                       }\r
+                       \r
+                       if (unknown.length >= 3)\r
+                       {\r
+                               temp = unknown.substr(0, 3);\r
+                               if (temp == "://")\r
+                                       unknown = defaultScheme + unknown;\r
+                       }\r
+\r
+                       // Try parsing it as a normal URI\r
+                       var uri:URI = new URI(unknown);\r
+               \r
+                       if (uri.isHierarchical() == false)\r
+                       {\r
+                               if (uri.scheme == UNKNOWN_SCHEME)\r
+                               {\r
+                                       this.initialize();\r
+                                       return false;\r
+                               }\r
+               \r
+                               // It's a non-hierarchical URI\r
+                               copyURI(uri);\r
+                               forceEscape();\r
+                               return true;\r
+                       }\r
+                       else if ((uri.scheme != UNKNOWN_SCHEME) &&\r
+                               (uri.scheme.length > 0))\r
+                       {\r
+                               if ( (uri.authority.length > 0) ||\r
+                                       (uri.scheme == "file") )\r
+                               {\r
+                                       // file://... URI\r
+                                       copyURI(uri);\r
+                                       forceEscape();  // ensure proper escaping\r
+                                       return true;\r
+                               }\r
+                               else if (uri.authority.length == 0 && uri.path.length == 0)\r
+                               {\r
+                                       // It's is an incomplete URI (eg "http://")\r
+                                       \r
+                                       setParts(uri.scheme, "", "", "", "", "");\r
+                                       return false;\r
+                               }\r
+                       }\r
+                       else\r
+                       {\r
+                               // Possible relative URI.  We can only detect relative URI's\r
+                               // that start with "." or "..".  If it starts with something\r
+                               // else, the parsing is ambiguous.\r
+                               var path:String = uri.path;\r
+               \r
+                               if (path == ".." || path == "." || \r
+                                       (path.length >= 3 && path.substr(0, 3) == "../") ||\r
+                                       (path.length >= 2 && path.substr(0, 2) == "./") )\r
+                               {\r
+                                       // This is a relative URI.\r
+                                       copyURI(uri);\r
+                                       forceEscape();\r
+                                       return true;\r
+                               }\r
+                       }\r
+               \r
+                       // Ok, it looks like we are just a normal URI missing the scheme.  Tack\r
+                       // on the scheme.\r
+                       uri = new URI(defaultScheme + "://" + unknown);\r
+               \r
+                       // Check to see if we are good now\r
+                       if (uri.scheme.length > 0 && uri.authority.length > 0)\r
+                       {\r
+                               // It was just missing the scheme.\r
+                               copyURI(uri);\r
+                               forceEscape();  // Make sure we are properly encoded.\r
+                               return true;\r
+                       }\r
+               \r
+                       // don't know what this is\r
+                       this.initialize();\r
+                       return false;\r
+               }\r
+               \r
+       } // end URI class\r
+} // end package
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/URIEncodingBitmap.as
new file mode 100644 (file)
index 0000000..d786b33
--- /dev/null
@@ -0,0 +1,139 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.net\r
+{\r
+       import flash.utils.ByteArray;\r
+       \r
+       /**\r
+        * This class implements an efficient lookup table for URI\r
+        * character escaping.  This class is only needed if you\r
+        * create a derived class of URI to handle custom URI\r
+        * syntax.  This class is used internally by URI.\r
+        * \r
+        * @langversion ActionScript 3.0\r
+        * @playerversion Flash 9.0* \r
+        */\r
+       public class URIEncodingBitmap extends ByteArray\r
+       {\r
+               /**\r
+                * Constructor.  Creates an encoding bitmap using the given\r
+                * string of characters as the set of characters that need\r
+                * to be URI escaped.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */\r
+               public function URIEncodingBitmap(charsToEscape:String) : void\r
+               {\r
+                       var i:int;\r
+                       var data:ByteArray = new ByteArray();\r
+                       \r
+                       // Initialize our 128 bits (16 bytes) to zero\r
+                       for (i = 0; i < 16; i++)\r
+                               this.writeByte(0);\r
+                               \r
+                       data.writeUTFBytes(charsToEscape);\r
+                       data.position = 0;\r
+                       \r
+                       while (data.bytesAvailable)\r
+                       {\r
+                               var c:int = data.readByte();\r
+                               \r
+                               if (c > 0x7f)\r
+                                       continue;  // only escape low bytes\r
+                                       \r
+                               var enc:int;\r
+                               this.position = (c >> 3);\r
+                               enc = this.readByte();\r
+                               enc |= 1 << (c & 0x7);\r
+                               this.position = (c >> 3);\r
+                               this.writeByte(enc);\r
+                       }\r
+               }\r
+               \r
+               /**\r
+                * Based on the data table contained in this object, check\r
+                * if the given character should be escaped.\r
+                * \r
+                * @param char  the character to be escaped.  Only the first\r
+                * character in the string is used.  Any other characters\r
+                * are ignored.\r
+                * \r
+                * @return      the integer value of the raw UTF8 character.  For\r
+                * example, if '%' is given, the return value is 37 (0x25).\r
+                * If the character given does not need to be escaped, the\r
+                * return value is zero.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0 \r
+                */\r
+               public function ShouldEscape(char:String) : int\r
+               {\r
+                       var data:ByteArray = new ByteArray();\r
+                       var c:int, mask:int;\r
+                       \r
+                       // write the character into a ByteArray so\r
+                       // we can pull it out as a raw byte value.\r
+                       data.writeUTFBytes(char);\r
+                       data.position = 0;\r
+                       c = data.readByte();\r
+                       \r
+                       if (c & 0x80)\r
+                       {\r
+                               // don't escape high byte characters.  It can make international\r
+                               // URI's unreadable.  We just want to escape characters that would\r
+                               // make URI syntax ambiguous.\r
+                               return 0;\r
+                       }\r
+                       else if ((c < 0x1f) || (c == 0x7f))\r
+                       {\r
+                               // control characters must be escaped.\r
+                               return c;\r
+                       }\r
+                       \r
+                       this.position = (c >> 3);\r
+                       mask = this.readByte();\r
+                       \r
+                       if (mask & (1 << (c & 0x7)))\r
+                       {\r
+                               // we need to escape this, return the numeric value\r
+                               // of the character\r
+                               return c;\r
+                       }\r
+                       else\r
+                       {\r
+                               return 0;\r
+                       }\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as b/redakcja/static/filebrowser/uploadify/com/adobe/net/proxies/RFC2817Socket.as
new file mode 100644 (file)
index 0000000..e73e9e7
--- /dev/null
@@ -0,0 +1,198 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+package com.adobe.net.proxies\r
+{\r
+       import flash.events.Event;\r
+       import flash.events.IOErrorEvent;\r
+       import flash.events.ProgressEvent;\r
+       import flash.net.Socket;\r
+\r
+       /**\r
+        * This class allows TCP socket connections through HTTP proxies in accordance with\r
+        * RFC 2817:\r
+        * \r
+        * ftp://ftp.rfc-editor.org/in-notes/rfc2817.txt\r
+        * \r
+        * It can also be used to make direct connections to a destination, as well. If you\r
+        * pass the host and port into the constructor, no proxy will be used. You can also\r
+        * call connect, passing in the host and the port, and if you didn't set the proxy\r
+        * info, a direct connection will be made. A proxy is only used after you have called\r
+        * the setProxyInfo function.\r
+        * \r
+        * The connection to and negotiation with the proxy is completely hidden. All the\r
+        * same events are thrown whether you are using a proxy or not, and the data you\r
+        * receive from the target server will look exact as it would if you were connected\r
+        * to it directly rather than through a proxy.\r
+        * \r
+        * @author Christian Cantrell\r
+        * \r
+        **/\r
+       public class RFC2817Socket\r
+               extends Socket\r
+       {\r
+               private var proxyHost:String = null;\r
+               private var host:String = null;\r
+               private var proxyPort:int = 0;\r
+               private var port:int = 0;\r
+               private var deferredEventHandlers:Object = new Object();\r
+               private var buffer:String = new String();\r
+\r
+               /**\r
+                * Construct a new RFC2817Socket object. If you pass in the host and the port,\r
+                * no proxy will be used. If you want to use a proxy, instantiate with no\r
+                * arguments, call setProxyInfo, then call connect.\r
+                **/\r
+               public function RFC2817Socket(host:String = null, port:int = 0)\r
+               {\r
+                       super(host, port);\r
+               }\r
+               \r
+               /**\r
+                * Set the proxy host and port number. Your connection will only proxied if\r
+                * this function has been called.\r
+                **/\r
+               public function setProxyInfo(host:String, port:int):void\r
+               {\r
+                       this.proxyHost = host;\r
+                       this.proxyPort = port;\r
+\r
+                       var deferredSocketDataHandler:Object = this.deferredEventHandlers[ProgressEvent.SOCKET_DATA];\r
+                       var deferredConnectHandler:Object = this.deferredEventHandlers[Event.CONNECT];\r
+\r
+                       if (deferredSocketDataHandler != null)\r
+                       {\r
+                               super.removeEventListener(ProgressEvent.SOCKET_DATA, deferredSocketDataHandler.listener, deferredSocketDataHandler.useCapture);\r
+                       }\r
+\r
+                       if (deferredConnectHandler != null)\r
+                       {\r
+                               super.removeEventListener(Event.CONNECT, deferredConnectHandler.listener, deferredConnectHandler.useCapture);\r
+                       }\r
+               }\r
+               \r
+               /**\r
+                * Connect to the specified host over the specified port. If you want your\r
+                * connection proxied, call the setProxyInfo function first.\r
+                **/\r
+               public override function connect(host:String, port:int):void\r
+               {\r
+                       if (this.proxyHost == null)\r
+                       {\r
+                               this.redirectConnectEvent();\r
+                               this.redirectSocketDataEvent();\r
+                               super.connect(host, port);\r
+                       }\r
+                       else\r
+                       {\r
+                               this.host = host;\r
+                               this.port = port;\r
+                               super.addEventListener(Event.CONNECT, this.onConnect);\r
+                               super.addEventListener(ProgressEvent.SOCKET_DATA, this.onSocketData);\r
+                               super.connect(this.proxyHost, this.proxyPort);\r
+                       }\r
+               }\r
+\r
+               private function onConnect(event:Event):void\r
+               {\r
+                       this.writeUTFBytes("CONNECT "+this.host+":"+this.port+" HTTP/1.1\n\n");\r
+                       this.flush();\r
+                       this.redirectConnectEvent();\r
+               }\r
+               \r
+               private function onSocketData(event:ProgressEvent):void\r
+               {\r
+                       while (this.bytesAvailable != 0)\r
+                       {\r
+                               this.buffer += this.readUTFBytes(1);\r
+                               if (this.buffer.search(/\r?\n\r?\n$/) != -1)\r
+                               {\r
+                                       this.checkResponse(event);\r
+                                       break;\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               private function checkResponse(event:ProgressEvent):void\r
+               {\r
+                       var responseCode:String = this.buffer.substr(this.buffer.indexOf(" ")+1, 3);\r
+\r
+                       if (responseCode.search(/^2/) == -1)\r
+                       {\r
+                               var ioError:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR);\r
+                               ioError.text = "Error connecting to the proxy ["+this.proxyHost+"] on port ["+this.proxyPort+"]: " + this.buffer;\r
+                               this.dispatchEvent(ioError);\r
+                       }\r
+                       else\r
+                       {\r
+                               this.redirectSocketDataEvent();\r
+                               this.dispatchEvent(new Event(Event.CONNECT));\r
+                               if (this.bytesAvailable > 0)\r
+                               {\r
+                                       this.dispatchEvent(event);\r
+                               }\r
+                       }\r
+                       this.buffer = null;\r
+               }\r
+               \r
+               private function redirectConnectEvent():void\r
+               {\r
+                       super.removeEventListener(Event.CONNECT, onConnect);\r
+                       var deferredEventHandler:Object = this.deferredEventHandlers[Event.CONNECT];\r
+                       if (deferredEventHandler != null)\r
+                       {\r
+                               super.addEventListener(Event.CONNECT, deferredEventHandler.listener, deferredEventHandler.useCapture, deferredEventHandler.priority, deferredEventHandler.useWeakReference);                    \r
+                       }\r
+               }\r
+               \r
+               private function redirectSocketDataEvent():void\r
+               {\r
+                       super.removeEventListener(ProgressEvent.SOCKET_DATA, onSocketData);\r
+                       var deferredEventHandler:Object = this.deferredEventHandlers[ProgressEvent.SOCKET_DATA];\r
+                       if (deferredEventHandler != null)\r
+                       {\r
+                               super.addEventListener(ProgressEvent.SOCKET_DATA, deferredEventHandler.listener, deferredEventHandler.useCapture, deferredEventHandler.priority, deferredEventHandler.useWeakReference);                        \r
+                       }\r
+               }\r
+               \r
+               public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int=0.0, useWeakReference:Boolean=false):void\r
+               {\r
+                       if (type == Event.CONNECT || type == ProgressEvent.SOCKET_DATA)\r
+                       {\r
+                               this.deferredEventHandlers[type] = {listener:listener,useCapture:useCapture, priority:priority, useWeakReference:useWeakReference};\r
+                       }\r
+                       else\r
+                       {\r
+                               super.addEventListener(type, listener, useCapture, priority, useWeakReference);\r
+                       }\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Database.as
new file mode 100644 (file)
index 0000000..0ddeef5
--- /dev/null
@@ -0,0 +1,34 @@
+package com.adobe.protocols.dict\r
+{\r
+       public class Database\r
+       {\r
+               private var _name:String;\r
+               private var _description:String;\r
+\r
+               public function Database(name:String, description:String)\r
+               {\r
+                       this._name = name;\r
+                       this._description = description;\r
+               }\r
+\r
+               public function set name(name:String):void\r
+               {\r
+                       this._name = name;\r
+               }\r
+\r
+               public function get name():String\r
+               {\r
+                       return this._name;\r
+               }\r
+\r
+               public function set description(description:String):void\r
+               {\r
+                       this._description = description;\r
+               }\r
+\r
+               public function get description():String\r
+               {\r
+                       return this._description;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Definition.as
new file mode 100644 (file)
index 0000000..934a330
--- /dev/null
@@ -0,0 +1,39 @@
+package com.adobe.protocols.dict\r
+{\r
+       public class Definition\r
+       {\r
+               private var _definition:String;\r
+               private var _database:String;\r
+               private var _term:String;\r
+               \r
+               public function set definition(definition:String):void\r
+               {\r
+                       this._definition = definition;\r
+               }\r
+               \r
+               public function get definition():String\r
+               {\r
+                       return this._definition;\r
+               }\r
+\r
+               public function set database(database:String):void\r
+               {\r
+                       this._database = database;\r
+               }\r
+               \r
+               public function get database():String\r
+               {\r
+                       return this._database;\r
+               }\r
+\r
+               public function set term(term:String):void\r
+               {\r
+                       this._term = term;\r
+               }\r
+               \r
+               public function get term():String\r
+               {\r
+                       return this._term;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Dict.as
new file mode 100644 (file)
index 0000000..07d2530
--- /dev/null
@@ -0,0 +1,328 @@
+package com.adobe.protocols.dict\r
+{\r
+       import com.adobe.protocols.dict.events.*;\r
+       import com.adobe.protocols.dict.util.*;\r
+       \r
+       import flash.events.Event;\r
+       import flash.events.EventDispatcher;\r
+       import flash.events.IOErrorEvent;\r
+       import flash.events.ProgressEvent;\r
+       import flash.events.SecurityErrorEvent;\r
+       import flash.net.Socket;\r
+       import mx.rpc.http.HTTPService;\r
+       import mx.rpc.events.ResultEvent;\r
+       import mx.rpc.events.FaultEvent;\r
+       import flash.xml.XMLNode;\r
+       import mx.utils.StringUtil;\r
+\r
+       public class Dict\r
+               extends EventDispatcher\r
+       {\r
+               // Event type names.\r
+               public static var CONNECTED:String = "connected";\r
+               public static var DISCONNECTED:String = "disconnected";\r
+               public static var IO_ERROR:String = IOErrorEvent.IO_ERROR;\r
+               public static var ERROR:String = "error";\r
+               public static var SERVERS:String = "servers";\r
+               public static var DATABASES:String = "databases";\r
+               public static var MATCH_STRATEGIES:String = "matchStrategies";\r
+               public static var DEFINITION:String = "definition";\r
+               public static var DEFINITION_HEADER:String = "definitionHeader";\r
+               public static var MATCH:String = "match";\r
+               public static var NO_MATCH:String = "noMatch";\r
+\r
+               public static var FIRST_MATCH:uint = 0;\r
+               public static var ALL_DATABASES:uint = 1;\r
+\r
+               private var socket:SocketHelper;\r
+               \r
+               private var dbShortList:Boolean;\r
+\r
+               public function Dict()\r
+               {\r
+                       this.socket = new SocketHelper();\r
+                       this.socket.addEventListener(Event.CONNECT, connected);\r
+                       this.socket.addEventListener(Event.CLOSE, disconnected);\r
+                       this.socket.addEventListener(SocketHelper.COMPLETE_RESPONSE, incomingData);\r
+                       this.socket.addEventListener(IOErrorEvent.IO_ERROR, ioError);\r
+                       this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityError);\r
+               }\r
+\r
+               public function connect(server:String, port:uint = 2628):void\r
+               {\r
+                       if (this.socket.connected)\r
+                       {\r
+                               this.socket.close();\r
+                       }\r
+                       this.socket.connect(server, port);\r
+               }\r
+\r
+               public function connectThroughProxy(proxyServer:String,\r
+                                                                                       proxyPort:int,\r
+                                                                                       server:String,\r
+                                                                                       port:uint = 2628):void\r
+               {\r
+                       if (this.socket.connected)\r
+                       {\r
+                               this.socket.close();\r
+                       }\r
+                       this.socket.setProxyInfo(proxyServer, proxyPort);\r
+                       this.socket.connect(server, port);\r
+               }\r
+\r
+               public function disconnect():void\r
+               {\r
+                       this.socket.close();\r
+                       this.disconnected(null);\r
+               }\r
+\r
+               public function getServers():void\r
+               {\r
+                       var http:HTTPService = new HTTPService();\r
+                       http.url = "http://luetzschena-stahmeln.de/dictd/xmllist.php";\r
+                       http.addEventListener(ResultEvent.RESULT, incomingServerXML);\r
+                       http.addEventListener(FaultEvent.FAULT, httpError);\r
+                       http.resultFormat = HTTPService.RESULT_FORMAT_E4X;\r
+                       http.send();\r
+               }\r
+\r
+               public function getDatabases(shortList:Boolean=true):void\r
+               {\r
+                       this.dbShortList = shortList;\r
+                       this.socket.writeUTFBytes("show db\r\n");\r
+                       this.socket.flush();\r
+               }\r
+\r
+               public function getMatchStrategies():void\r
+               {\r
+                       this.socket.writeUTFBytes("show strat\r\n");\r
+                       this.socket.flush();\r
+               }\r
+\r
+               public function match(database:String, term:String, scope:String="prefix"):void\r
+               {\r
+                       this.socket.writeUTFBytes("match " + database + " " + scope + " \"" + term + "\"\r\n");\r
+                       this.socket.flush();\r
+               }\r
+\r
+               public function define(database:String, term:String):void\r
+               {\r
+                       this.socket.writeUTFBytes("define " + database + " \"" + term + "\"\r\n");\r
+                       this.socket.flush();\r
+               }\r
+\r
+               public function lookup(term:String, scope:uint):void\r
+               {\r
+                       var flag:String;\r
+                       if (scope == Dict.ALL_DATABASES)\r
+                       {\r
+                               flag = "*";\r
+                       }\r
+                       else if (scope == Dict.FIRST_MATCH)\r
+                       {\r
+                               flag = "!";\r
+                       }\r
+                       this.socket.writeUTFBytes("define " + flag + " \"" + term + "\"\r\n");\r
+                       this.socket.flush();\r
+               }\r
+\r
+               //// Private functions ////\r
+\r
+               private function connected(event:Event):void\r
+               {\r
+               // Wait to dispatch an event until we get the 220 response.\r
+       }\r
+\r
+               private function disconnected(event:Event):void\r
+               {\r
+               dispatchEvent(new DisconnectedEvent());\r
+       }\r
+\r
+               private function incomingServerXML(event:ResultEvent):void\r
+               {\r
+                       var dictd:Namespace = new Namespace("http://www.luetzschena-stahmeln.de/dictd/");\r
+                       var result:XML = event.result as XML;\r
+                       var server:String, description:String;\r
+                       var servers:Array = new Array();\r
+                       for each (var serverNode:XML in result.dictd::server)\r
+                       {\r
+                               server = serverNode.dictd::dictdurl;\r
+                               description = serverNode.dictd::description;\r
+                               if (StringUtil.trim(server).length != 0 &&\r
+                                       StringUtil.trim(description).length != 0)\r
+                               {\r
+                                       var dServer:DictionaryServer = new DictionaryServer();\r
+                                       dServer.server = server.replace("dict://", "");\r
+                                       dServer.description = description;\r
+                                       servers.push(dServer);\r
+                               }\r
+                       }\r
+                       var dEvent:DictionaryServerEvent = new DictionaryServerEvent();\r
+                       dEvent.servers = servers;\r
+                       dispatchEvent(dEvent);\r
+               }\r
+\r
+               private function incomingData(event:CompleteResponseEvent):void\r
+               {                       \r
+                       var rawResponse:String = event.response;\r
+                       var response:Response = this.parseRawResponse(rawResponse);\r
+                       var responseCode:uint = response.code;\r
+                       if (responseCode == 552) // no matches\r
+                       {\r
+                               throwNoMatchEvent(response);\r
+                       }\r
+                       else if (responseCode >= 400 && responseCode <= 599) // error\r
+                       {\r
+                               throwErrorEvent(response);\r
+                       }\r
+                       else if (responseCode == 220) // successful connection\r
+                       {\r
+                               dispatchEvent(new ConnectedEvent());\r
+                       }\r
+                       else if (responseCode == 110) // databases are being returned\r
+                       {\r
+                               throwDatabasesEvent(response);                          \r
+                       }\r
+                       else if (responseCode == 111) // matches strategies\r
+                       {\r
+                               throwMatchStrategiesEvent(response);\r
+                       }\r
+                       else if (responseCode == 152) // matches\r
+                       {\r
+                               throwMatchEvent(response);\r
+                       }\r
+                       else if (responseCode == 150)\r
+                       {\r
+                               throwDefinitionHeaderEvent(response);\r
+                       }\r
+                       else if (responseCode == 151)\r
+                       {\r
+                               throwDefinitionEvent(response);\r
+                       }\r
+       }\r
+\r
+       private function ioError(event:IOErrorEvent):void\r
+       {\r
+                       dispatchEvent(event);\r
+       }\r
+\r
+       private function httpError(event:FaultEvent):void\r
+       {\r
+               trace("httpError!");\r
+       }\r
+\r
+       private function securityError(event:SecurityErrorEvent):void\r
+       {\r
+               trace("security error!");\r
+               trace(event.text);\r
+       }\r
+\r
+       // Dispatch new events.\r
+\r
+       private function throwDatabasesEvent(response:Response):void\r
+       {\r
+                       var databases:Array = new Array();\r
+                       var responseArray:Array = response.body.split("\r\n");\r
+               for each (var line:String in responseArray)\r
+               {\r
+                       var name:String = line.substring(0, line.indexOf(" "));\r
+                       if (name == "--exit--")\r
+                       {\r
+                               if (this.dbShortList)\r
+                               {\r
+                                       break;\r
+                               }\r
+                               continue;\r
+                       }\r
+                       var description:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
+                       databases.push(new Database(name, description));\r
+               }\r
+               var event:DatabaseEvent = new DatabaseEvent();\r
+               event.databases = databases;\r
+               dispatchEvent(event);\r
+       }\r
+\r
+       private function throwMatchStrategiesEvent(response:Response):void\r
+       {\r
+                       var strategies:Array = new Array();\r
+                       var responseArray:Array = response.body.split("\r\n");\r
+               for each (var line:String in responseArray)\r
+               {\r
+                       var name:String = line.substring(0, line.indexOf(" "));\r
+                       var description:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
+                       strategies.push(new MatchStrategy(name, description));\r
+               }\r
+               var event:MatchStrategiesEvent = new MatchStrategiesEvent();\r
+               event.strategies = strategies;\r
+               dispatchEvent(event);\r
+       }\r
+\r
+       private function throwMatchEvent(response:Response):void\r
+       {\r
+                       var matches:Array = new Array();\r
+                       var responseArray:Array = response.body.split("\r\n");\r
+               for each (var line:String in responseArray)\r
+               {\r
+                       var match:String = line.substring(line.indexOf(" ")+1, line.length).replace(/\"/g,"");\r
+                       matches.push(match);\r
+               }\r
+               var event:MatchEvent = new MatchEvent();\r
+               event.matches = matches;\r
+               dispatchEvent(event);\r
+       }\r
+\r
+       private function throwErrorEvent(response:Response):void\r
+       {\r
+               var event:ErrorEvent = new ErrorEvent();\r
+               event.code = response.code;\r
+               event.message = response.headerText;\r
+                       dispatchEvent(event);\r
+       }\r
+\r
+       private function throwNoMatchEvent(response:Response):void\r
+       {\r
+                       dispatchEvent(new NoMatchEvent());\r
+       }\r
+\r
+       private function throwDefinitionHeaderEvent(response:Response):void\r
+       {\r
+                       var event:DefinitionHeaderEvent = new DefinitionHeaderEvent();\r
+                       event.definitionCount = uint(response.headerText.substring(0, response.headerText.indexOf(" ")));\r
+                       dispatchEvent(event);\r
+       }\r
+\r
+       private function throwDefinitionEvent(response:Response):void\r
+       {\r
+               var event:DefinitionEvent = new DefinitionEvent();\r
+               var def:Definition = new Definition();\r
+               var headerText:String = response.headerText;\r
+               var tokens:Array = headerText.match(/"[^"]+"/g);\r
+               def.term = String(tokens[0]).replace(/"/g, "");\r
+               def.database = String(tokens[1]).replace(/"/g, "");\r
+               def.definition = response.body;\r
+               event.definition = def;\r
+                       dispatchEvent(event);\r
+       }\r
+\r
+       private function parseRawResponse(rawResponse:String):Response\r
+       {\r
+               var response:Response = new Response();\r
+               var fullHeader:String;\r
+               if (rawResponse.indexOf("\r\n") != -1)\r
+               {\r
+                       fullHeader = rawResponse.substring(0, rawResponse.indexOf("\r\n"));\r
+               }\r
+               else\r
+               {\r
+                       fullHeader = rawResponse;\r
+               }\r
+               var responseCodeMatch:Array = fullHeader.match(/^\d{3}/);\r
+               response.code = uint(responseCodeMatch[0]);\r
+               response.headerText = fullHeader.substring(fullHeader.indexOf(" ")+1, fullHeader.length);\r
+                       var body:String = rawResponse.substring(rawResponse.indexOf("\r\n")+2, rawResponse.length);\r
+                       body = body.replace(/\r\n\.\./, "\r\n.");\r
+                       response.body = body;\r
+               return response;\r
+       }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/DictionaryServer.as
new file mode 100644 (file)
index 0000000..422b603
--- /dev/null
@@ -0,0 +1,28 @@
+package com.adobe.protocols.dict\r
+{\r
+       public class DictionaryServer\r
+       {\r
+               private var _server:String;\r
+               private var _description:String;\r
+\r
+               public function set server(server:String):void\r
+               {\r
+                       this._server = server;\r
+               }\r
+               \r
+               public function get server():String\r
+               {\r
+                       return this._server;\r
+               }\r
+\r
+               public function set description(description:String):void\r
+               {\r
+                       this._description = description;\r
+               }\r
+               \r
+               public function get description():String\r
+               {\r
+                       return this._description;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/MatchStrategy.as
new file mode 100644 (file)
index 0000000..1e17da3
--- /dev/null
@@ -0,0 +1,34 @@
+package com.adobe.protocols.dict\r
+{\r
+       public class MatchStrategy\r
+       {\r
+               private var _name:String;\r
+               private var _description:String;\r
+\r
+               public function MatchStrategy(name:String, description:String)\r
+               {\r
+                       this._name = name;\r
+                       this._description = description;\r
+               }\r
+\r
+               public function set name(name:String):void\r
+               {\r
+                       this._name = name;\r
+               }\r
+\r
+               public function get name():String\r
+               {\r
+                       return this._name;\r
+               }\r
+\r
+               public function set description(description:String):void\r
+               {\r
+                       this._description = description;\r
+               }\r
+\r
+               public function get description():String\r
+               {\r
+                       return this._description;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/Response.as
new file mode 100644 (file)
index 0000000..619a8e9
--- /dev/null
@@ -0,0 +1,39 @@
+package com.adobe.protocols.dict\r
+{\r
+       public class Response\r
+       {\r
+               private var _code:uint;\r
+               private var _headerText:String;\r
+               private var _body:String;\r
+\r
+               public function set code(code:uint):void\r
+               {\r
+                       this._code = code;\r
+               }\r
+\r
+               public function set headerText(headerText:String):void\r
+               {\r
+                       this._headerText = headerText;\r
+               }\r
+\r
+               public function set body(body:String):void\r
+               {\r
+                       this._body = body;\r
+               }\r
+\r
+               public function get code():uint\r
+               {\r
+                       return this._code;\r
+               }\r
+\r
+               public function get headerText():String\r
+               {\r
+                       return this._headerText;\r
+               }\r
+\r
+               public function get body():String\r
+               {\r
+                       return this._body;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ConnectedEvent.as
new file mode 100644 (file)
index 0000000..c4a4145
--- /dev/null
@@ -0,0 +1,14 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class ConnectedEvent extends Event\r
+       {\r
+               public function ConnectedEvent()\r
+               {\r
+                       super(Dict.CONNECTED);\r
+               }\r
+               \r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DatabaseEvent.as
new file mode 100644 (file)
index 0000000..fdd2cc1
--- /dev/null
@@ -0,0 +1,26 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class DatabaseEvent\r
+               extends Event\r
+       {\r
+               private var _databases:Array;\r
+               \r
+               public function DatabaseEvent()\r
+               {\r
+                       super(Dict.DATABASES);\r
+               }\r
+               \r
+               public function set databases(databases:Array):void\r
+               {\r
+                       this._databases = databases;\r
+               }\r
+               \r
+               public function get databases():Array\r
+               {\r
+                       return this._databases;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionEvent.as
new file mode 100644 (file)
index 0000000..8107173
--- /dev/null
@@ -0,0 +1,27 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+       import com.adobe.protocols.dict.Definition;\r
+\r
+       public class DefinitionEvent\r
+               extends Event\r
+       {\r
+               private var _definition:Definition;\r
+               \r
+               public function DefinitionEvent()\r
+               {\r
+                       super(Dict.DEFINITION);\r
+               }\r
+               \r
+               public function set definition(definition:Definition):void\r
+               {\r
+                       this._definition = definition;\r
+               }\r
+               \r
+               public function get definition():Definition\r
+               {\r
+                       return this._definition;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as
new file mode 100644 (file)
index 0000000..e77c402
--- /dev/null
@@ -0,0 +1,26 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class DefinitionHeaderEvent\r
+               extends Event\r
+       {\r
+               private var _definitionCount:uint;\r
+               \r
+               public function DefinitionHeaderEvent()\r
+               {\r
+                       super(Dict.DEFINITION_HEADER);\r
+               }\r
+               \r
+               public function set definitionCount(definitionCount:uint):void\r
+               {\r
+                       this._definitionCount = definitionCount;\r
+               }\r
+               \r
+               public function get definitionCount():uint\r
+               {\r
+                       return this._definitionCount;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DictionaryServerEvent.as
new file mode 100644 (file)
index 0000000..9b406e9
--- /dev/null
@@ -0,0 +1,26 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class DictionaryServerEvent\r
+               extends Event\r
+       {\r
+               private var _servers:Array;\r
+               \r
+               public function DictionaryServerEvent()\r
+               {\r
+                       super(Dict.SERVERS);\r
+               }\r
+               \r
+               public function set servers(servers:Array):void\r
+               {\r
+                       this._servers = servers;\r
+               }\r
+               \r
+               public function get servers():Array\r
+               {\r
+                       return this._servers;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/DisconnectedEvent.as
new file mode 100644 (file)
index 0000000..485b3ed
--- /dev/null
@@ -0,0 +1,14 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class DisconnectedEvent extends Event\r
+       {\r
+               public function DisconnectedEvent()\r
+               {\r
+                       super(Dict.DISCONNECTED);\r
+               }\r
+               \r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/ErrorEvent.as
new file mode 100644 (file)
index 0000000..9e5fc7a
--- /dev/null
@@ -0,0 +1,37 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+       \r
+       public class ErrorEvent\r
+               extends Event\r
+       {\r
+               private var _code:uint;\r
+               private var _message:String;\r
+               \r
+               public function ErrorEvent()\r
+               {\r
+                       super(Dict.ERROR);\r
+               }\r
+\r
+               public function set code(code:uint):void\r
+               {\r
+                       this._code = code;\r
+               }\r
+\r
+               public function set message(message:String):void\r
+               {\r
+                       this._message = message;\r
+               }\r
+\r
+               public function get code():uint\r
+               {\r
+                       return this._code;\r
+               }\r
+\r
+               public function get message():String\r
+               {\r
+                       return this._message;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchEvent.as
new file mode 100644 (file)
index 0000000..65b8688
--- /dev/null
@@ -0,0 +1,26 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class MatchEvent\r
+               extends Event\r
+       {\r
+               private var _matches:Array;\r
+               \r
+               public function MatchEvent()\r
+               {\r
+                       super(Dict.MATCH);\r
+               }\r
+               \r
+               public function set matches(matches:Array):void\r
+               {\r
+                       this._matches = matches;\r
+               }\r
+               \r
+               public function get matches():Array\r
+               {\r
+                       return this._matches;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/MatchStrategiesEvent.as
new file mode 100644 (file)
index 0000000..75b76f8
--- /dev/null
@@ -0,0 +1,26 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class MatchStrategiesEvent\r
+               extends Event\r
+       {\r
+               private var _strategies:Array;\r
+               \r
+               public function MatchStrategiesEvent()\r
+               {\r
+                       super(Dict.MATCH_STRATEGIES);\r
+               }\r
+               \r
+               public function set strategies(strategies:Array):void\r
+               {\r
+                       this._strategies = strategies;\r
+               }\r
+               \r
+               public function get strategies():Array\r
+               {\r
+                       return this._strategies;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/events/NoMatchEvent.as
new file mode 100644 (file)
index 0000000..894d1ae
--- /dev/null
@@ -0,0 +1,14 @@
+package com.adobe.protocols.dict.events\r
+{\r
+       import flash.events.Event;\r
+       import com.adobe.protocols.dict.Dict;\r
+\r
+       public class NoMatchEvent\r
+               extends Event\r
+       {\r
+               public function NoMatchEvent()\r
+               {\r
+                       super(Dict.NO_MATCH);\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/CompleteResponseEvent.as
new file mode 100644 (file)
index 0000000..fc552f1
--- /dev/null
@@ -0,0 +1,25 @@
+package com.adobe.protocols.dict.util\r
+{\r
+       import flash.events.Event;\r
+\r
+       public class CompleteResponseEvent\r
+               extends Event\r
+       {\r
+               private var _response:String;\r
+\r
+               public function CompleteResponseEvent()\r
+               {\r
+                       super(SocketHelper.COMPLETE_RESPONSE);\r
+               }\r
+\r
+               public function set response(response:String):void\r
+               {\r
+                       this._response = response;\r
+               }\r
+               \r
+               public function get response():String\r
+               {\r
+                       return this._response;\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as b/redakcja/static/filebrowser/uploadify/com/adobe/protocols/dict/util/SocketHelper.as
new file mode 100644 (file)
index 0000000..feb494b
--- /dev/null
@@ -0,0 +1,49 @@
+package com.adobe.protocols.dict.util\r
+{\r
+       import com.adobe.net.proxies.RFC2817Socket;\r
+       import flash.events.ProgressEvent;\r
+\r
+       public class SocketHelper\r
+               extends RFC2817Socket\r
+       {\r
+               private var terminator:String = "\r\n.\r\n";\r
+               private var buffer:String;\r
+               public static var COMPLETE_RESPONSE:String = "completeResponse";\r
+\r
+               public function SocketHelper()\r
+               {\r
+                       super();\r
+                       buffer = new String();\r
+                       addEventListener(ProgressEvent.SOCKET_DATA, incomingData);\r
+               }\r
+\r
+               private function incomingData(event:ProgressEvent):void\r
+               {\r
+                       buffer += readUTFBytes(bytesAvailable);\r
+                       buffer = buffer.replace(/250[^\r\n]+\r\n/, ""); // Get rid of all 250s. Don't need them.\r
+                       var codeStr:String = buffer.substring(0, 3);\r
+                       if (!isNaN(parseInt(codeStr)))\r
+                       {\r
+                               var code:uint = uint(codeStr);\r
+                               if (code == 150 || code >= 200)\r
+                               {\r
+                                       buffer = buffer.replace("\r\n", this.terminator);\r
+                               }\r
+                       }\r
+\r
+                       while (buffer.indexOf(this.terminator) != -1)\r
+                       {\r
+                               var chunk:String = buffer.substring(0, buffer.indexOf(this.terminator));\r
+                               buffer = buffer.substring(chunk.length + this.terminator.length, buffer.length);\r
+                               throwResponseEvent(chunk);\r
+                       }\r
+               }\r
+               \r
+               private function throwResponseEvent(response:String):void\r
+               {\r
+                       var responseEvent:CompleteResponseEvent = new CompleteResponseEvent();\r
+                       responseEvent.response = response;\r
+                       dispatchEvent(responseEvent);                   \r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSON.as
new file mode 100644 (file)
index 0000000..bfee6d9
--- /dev/null
@@ -0,0 +1,85 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       /**\r
+        * This class provides encoding and decoding of the JSON format.\r
+        *\r
+        * Example usage:\r
+        * <code>\r
+        *              // create a JSON string from an internal object\r
+        *              JSON.encode( myObject );\r
+        *\r
+        *              // read a JSON string into an internal object\r
+        *              var myObject:Object = JSON.decode( jsonString );\r
+        *      </code>\r
+        */\r
+       public class JSON {\r
+       \r
+       \r
+               /**\r
+                * Encodes a object into a JSON string.\r
+                *\r
+                * @param o The object to create a JSON string for\r
+                * @return the JSON string representing o\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function encode( o:Object ):String {\r
+                       \r
+                       var encoder:JSONEncoder = new JSONEncoder( o );\r
+                       return encoder.getString();\r
+               \r
+               }\r
+               \r
+               /**\r
+                * Decodes a JSON string into a native object.\r
+                * \r
+                * @param s The JSON string representing the object\r
+                * @return A native object as specified by s\r
+                * @throw JSONParseError\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function decode( s:String ):* {\r
+                       \r
+                       var decoder:JSONDecoder = new JSONDecoder( s )\r
+                       return decoder.getValue();\r
+                       \r
+               }\r
+       \r
+       }\r
+\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONDecoder.as
new file mode 100644 (file)
index 0000000..82ade19
--- /dev/null
@@ -0,0 +1,221 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       public class JSONDecoder {\r
+               \r
+               /** The value that will get parsed from the JSON string */\r
+               private var value:*;\r
+               \r
+               /** The tokenizer designated to read the JSON string */\r
+               private var tokenizer:JSONTokenizer;\r
+               \r
+               /** The current token from the tokenizer */\r
+               private var token:JSONToken;\r
+               \r
+               /**\r
+                * Constructs a new JSONDecoder to parse a JSON string \r
+                * into a native object.\r
+                *\r
+                * @param s The JSON string to be converted\r
+                *              into a native object\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function JSONDecoder( s:String ) {\r
+                       \r
+                       tokenizer = new JSONTokenizer( s );\r
+                       \r
+                       nextToken();\r
+                       value = parseValue();\r
+               }\r
+               \r
+               /**\r
+                * Gets the internal object that was created by parsing\r
+                * the JSON string passed to the constructor.\r
+                *\r
+                * @return The internal object representation of the JSON\r
+                *              string that was passed to the constructor\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function getValue():* {\r
+                       return value;\r
+               }\r
+               \r
+               /**\r
+                * Returns the next token from the tokenzier reading\r
+                * the JSON string\r
+                */\r
+               private function nextToken():JSONToken {\r
+                       return token = tokenizer.getNextToken();\r
+               }\r
+               \r
+               /**\r
+                * Attempt to parse an array\r
+                */\r
+               private function parseArray():Array {\r
+                       // create an array internally that we're going to attempt\r
+                       // to parse from the tokenizer\r
+                       var a:Array = new Array();\r
+                       \r
+                       // grab the next token from the tokenizer to move\r
+                       // past the opening [\r
+                       nextToken();\r
+                       \r
+                       // check to see if we have an empty array\r
+                       if ( token.type == JSONTokenType.RIGHT_BRACKET ) {\r
+                               // we're done reading the array, so return it\r
+                               return a;\r
+                       }\r
+                       \r
+                       // deal with elements of the array, and use an "infinite"\r
+                       // loop because we could have any amount of elements\r
+                       while ( true ) {\r
+                               // read in the value and add it to the array\r
+                               a.push ( parseValue() );\r
+                       \r
+                               // after the value there should be a ] or a ,\r
+                               nextToken();\r
+                               \r
+                               if ( token.type == JSONTokenType.RIGHT_BRACKET ) {\r
+                                       // we're done reading the array, so return it\r
+                                       return a;\r
+                               } else if ( token.type == JSONTokenType.COMMA ) {\r
+                                       // move past the comma and read another value\r
+                                       nextToken();\r
+                               } else {\r
+                                       tokenizer.parseError( "Expecting ] or , but found " + token.value );\r
+                               }\r
+                       }\r
+            return null;\r
+               }\r
+               \r
+               /**\r
+                * Attempt to parse an object\r
+                */\r
+               private function parseObject():Object {\r
+                       // create the object internally that we're going to\r
+                       // attempt to parse from the tokenizer\r
+                       var o:Object = new Object();\r
+                                               \r
+                       // store the string part of an object member so\r
+                       // that we can assign it a value in the object\r
+                       var key:String\r
+                       \r
+                       // grab the next token from the tokenizer\r
+                       nextToken();\r
+                       \r
+                       // check to see if we have an empty object\r
+                       if ( token.type == JSONTokenType.RIGHT_BRACE ) {\r
+                               // we're done reading the object, so return it\r
+                               return o;\r
+                       }\r
+                       \r
+                       // deal with members of the object, and use an "infinite"\r
+                       // loop because we could have any amount of members\r
+                       while ( true ) {\r
+                       \r
+                               if ( token.type == JSONTokenType.STRING ) {\r
+                                       // the string value we read is the key for the object\r
+                                       key = String( token.value );\r
+                                       \r
+                                       // move past the string to see what's next\r
+                                       nextToken();\r
+                                       \r
+                                       // after the string there should be a :\r
+                                       if ( token.type == JSONTokenType.COLON ) {\r
+                                               \r
+                                               // move past the : and read/assign a value for the key\r
+                                               nextToken();\r
+                                               o[key] = parseValue();  \r
+                                               \r
+                                               // move past the value to see what's next\r
+                                               nextToken();\r
+                                               \r
+                                               // after the value there's either a } or a ,\r
+                                               if ( token.type == JSONTokenType.RIGHT_BRACE ) {\r
+                                                       // // we're done reading the object, so return it\r
+                                                       return o;\r
+                                                       \r
+                                               } else if ( token.type == JSONTokenType.COMMA ) {\r
+                                                       // skip past the comma and read another member\r
+                                                       nextToken();\r
+                                               } else {\r
+                                                       tokenizer.parseError( "Expecting } or , but found " + token.value );\r
+                                               }\r
+                                       } else {\r
+                                               tokenizer.parseError( "Expecting : but found " + token.value );\r
+                                       }\r
+                               } else {\r
+                                       tokenizer.parseError( "Expecting string but found " + token.value );\r
+                               }\r
+                       }\r
+            return null;\r
+               }\r
+               \r
+               /**\r
+                * Attempt to parse a value\r
+                */\r
+               private function parseValue():Object\r
+               {\r
+                       // Catch errors when the input stream ends abruptly\r
+                       if ( token == null )\r
+                       {\r
+                               tokenizer.parseError( "Unexpected end of input" );\r
+                       }\r
+                                       \r
+                       switch ( token.type ) {\r
+                               case JSONTokenType.LEFT_BRACE:\r
+                                       return parseObject();\r
+                                       \r
+                               case JSONTokenType.LEFT_BRACKET:\r
+                                       return parseArray();\r
+                                       \r
+                               case JSONTokenType.STRING:\r
+                               case JSONTokenType.NUMBER:\r
+                               case JSONTokenType.TRUE:\r
+                               case JSONTokenType.FALSE:\r
+                               case JSONTokenType.NULL:\r
+                                       return token.value;\r
+\r
+                               default:\r
+                                       tokenizer.parseError( "Unexpected " + token.value );\r
+                                       \r
+                       }\r
+            return null;\r
+               }\r
+       }\r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONEncoder.as
new file mode 100644 (file)
index 0000000..44469d0
--- /dev/null
@@ -0,0 +1,299 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json \r
+{\r
+\r
+       import flash.utils.describeType;\r
+\r
+       public class JSONEncoder {\r
+       \r
+               /** The string that is going to represent the object we're encoding */\r
+               private var jsonString:String;\r
+               \r
+               /**\r
+                * Creates a new JSONEncoder.\r
+                *\r
+                * @param o The object to encode as a JSON string\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function JSONEncoder( value:* ) {\r
+                       jsonString = convertToString( value );\r
+               \r
+               }\r
+               \r
+               /**\r
+                * Gets the JSON string from the encoder.\r
+                *\r
+                * @return The JSON string representation of the object\r
+                *              that was passed to the constructor\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function getString():String {\r
+                       return jsonString;\r
+               }\r
+               \r
+               /**\r
+                * Converts a value to it's JSON string equivalent.\r
+                *\r
+                * @param value The value to convert.  Could be any \r
+                *              type (object, number, array, etc)\r
+                */\r
+               private function convertToString( value:* ):String {\r
+                       \r
+                       // determine what value is and convert it based on it's type\r
+                       if ( value is String ) {\r
+                               \r
+                               // escape the string so it's formatted correctly\r
+                               return escapeString( value as String );\r
+                               \r
+                       } else if ( value is Number ) {\r
+                               \r
+                               // only encode numbers that finate\r
+                               return isFinite( value as Number) ? value.toString() : "null";\r
+\r
+                       } else if ( value is Boolean ) {\r
+                               \r
+                               // convert boolean to string easily\r
+                               return value ? "true" : "false";\r
+\r
+                       } else if ( value is Array ) {\r
+                       \r
+                               // call the helper method to convert an array\r
+                               return arrayToString( value as Array );\r
+                       \r
+                       } else if ( value is Object && value != null ) {\r
+                       \r
+                               // call the helper method to convert an object\r
+                               return objectToString( value );\r
+                       }\r
+            return "null";\r
+               }\r
+               \r
+               /**\r
+                * Escapes a string accoding to the JSON specification.\r
+                *\r
+                * @param str The string to be escaped\r
+                * @return The string with escaped special characters\r
+                *              according to the JSON specification\r
+                */\r
+               private function escapeString( str:String ):String {\r
+                       // create a string to store the string's jsonstring value\r
+                       var s:String = "";\r
+                       // current character in the string we're processing\r
+                       var ch:String;\r
+                       // store the length in a local variable to reduce lookups\r
+                       var len:Number = str.length;\r
+                       \r
+                       // loop over all of the characters in the string\r
+                       for ( var i:int = 0; i < len; i++ ) {\r
+                       \r
+                               // examine the character to determine if we have to escape it\r
+                               ch = str.charAt( i );\r
+                               switch ( ch ) {\r
+                               \r
+                                       case '"':       // quotation mark\r
+                                               s += "\\\"";\r
+                                               break;\r
+                                               \r
+                                       //case '/':     // solidus\r
+                                       //      s += "\\/";\r
+                                       //      break;\r
+                                               \r
+                                       case '\\':      // reverse solidus\r
+                                               s += "\\\\";\r
+                                               break;\r
+                                               \r
+                                       case '\b':      // bell\r
+                                               s += "\\b";\r
+                                               break;\r
+                                               \r
+                                       case '\f':      // form feed\r
+                                               s += "\\f";\r
+                                               break;\r
+                                               \r
+                                       case '\n':      // newline\r
+                                               s += "\\n";\r
+                                               break;\r
+                                               \r
+                                       case '\r':      // carriage return\r
+                                               s += "\\r";\r
+                                               break;\r
+                                               \r
+                                       case '\t':      // horizontal tab\r
+                                               s += "\\t";\r
+                                               break;\r
+                                               \r
+                                       default:        // everything else\r
+                                               \r
+                                               // check for a control character and escape as unicode\r
+                                               if ( ch < ' ' ) {\r
+                                                       // get the hex digit(s) of the character (either 1 or 2 digits)\r
+                                                       var hexCode:String = ch.charCodeAt( 0 ).toString( 16 );\r
+                                                       \r
+                                                       // ensure that there are 4 digits by adjusting\r
+                                                       // the # of zeros accordingly.\r
+                                                       var zeroPad:String = hexCode.length == 2 ? "00" : "000";\r
+                                                       \r
+                                                       // create the unicode escape sequence with 4 hex digits\r
+                                                       s += "\\u" + zeroPad + hexCode;\r
+                                               } else {\r
+                                               \r
+                                                       // no need to do any special encoding, just pass-through\r
+                                                       s += ch;\r
+                                                       \r
+                                               }\r
+                               }       // end switch\r
+                               \r
+                       }       // end for loop\r
+                                               \r
+                       return "\"" + s + "\"";\r
+               }\r
+               \r
+               /**\r
+                * Converts an array to it's JSON string equivalent\r
+                *\r
+                * @param a The array to convert\r
+                * @return The JSON string representation of <code>a</code>\r
+                */\r
+               private function arrayToString( a:Array ):String {\r
+                       // create a string to store the array's jsonstring value\r
+                       var s:String = "";\r
+                       \r
+                       // loop over the elements in the array and add their converted\r
+                       // values to the string\r
+                       for ( var i:int = 0; i < a.length; i++ ) {\r
+                               // when the length is 0 we're adding the first element so\r
+                               // no comma is necessary\r
+                               if ( s.length > 0 ) {\r
+                                       // we've already added an element, so add the comma separator\r
+                                       s += ","\r
+                               }\r
+                               \r
+                               // convert the value to a string\r
+                               s += convertToString( a[i] );   \r
+                       }\r
+                       \r
+                       // KNOWN ISSUE:  In ActionScript, Arrays can also be associative\r
+                       // objects and you can put anything in them, ie:\r
+                       //              myArray["foo"] = "bar";\r
+                       //\r
+                       // These properties aren't picked up in the for loop above because\r
+                       // the properties don't correspond to indexes.  However, we're\r
+                       // sort of out luck because the JSON specification doesn't allow\r
+                       // these types of array properties.\r
+                       //\r
+                       // So, if the array was also used as an associative object, there\r
+                       // may be some values in the array that don't get properly encoded.\r
+                       //\r
+                       // A possible solution is to instead encode the Array as an Object\r
+                       // but then it won't get decoded correctly (and won't be an\r
+                       // Array instance)\r
+                                               \r
+                       // close the array and return it's string value\r
+                       return "[" + s + "]";\r
+               }\r
+               \r
+               /**\r
+                * Converts an object to it's JSON string equivalent\r
+                *\r
+                * @param o The object to convert\r
+                * @return The JSON string representation of <code>o</code>\r
+                */\r
+               private function objectToString( o:Object ):String\r
+               {\r
+                       // create a string to store the object's jsonstring value\r
+                       var s:String = "";\r
+                       \r
+                       // determine if o is a class instance or a plain object\r
+                       var classInfo:XML = describeType( o );\r
+                       if ( classInfo.@name.toString() == "Object" )\r
+                       {\r
+                               // the value of o[key] in the loop below - store this \r
+                               // as a variable so we don't have to keep looking up o[key]\r
+                               // when testing for valid values to convert\r
+                               var value:Object;\r
+                               \r
+                               // loop over the keys in the object and add their converted\r
+                               // values to the string\r
+                               for ( var key:String in o )\r
+                               {\r
+                                       // assign value to a variable for quick lookup\r
+                                       value = o[key];\r
+                                       \r
+                                       // don't add function's to the JSON string\r
+                                       if ( value is Function )\r
+                                       {\r
+                                               // skip this key and try another\r
+                                               continue;\r
+                                       }\r
+                                       \r
+                                       // when the length is 0 we're adding the first item so\r
+                                       // no comma is necessary\r
+                                       if ( s.length > 0 ) {\r
+                                               // we've already added an item, so add the comma separator\r
+                                               s += ","\r
+                                       }\r
+                                       \r
+                                       s += escapeString( key ) + ":" + convertToString( value );\r
+                               }\r
+                       }\r
+                       else // o is a class instance\r
+                       {\r
+                               // Loop over all of the variables and accessors in the class and \r
+                               // serialize them along with their values.\r
+                               for each ( var v:XML in classInfo..*.( name() == "variable" || name() == "accessor" ) )\r
+                               {\r
+                                       // When the length is 0 we're adding the first item so\r
+                                       // no comma is necessary\r
+                                       if ( s.length > 0 ) {\r
+                                               // We've already added an item, so add the comma separator\r
+                                               s += ","\r
+                                       }\r
+                                       \r
+                                       s += escapeString( v.@name.toString() ) + ":" \r
+                                                       + convertToString( o[ v.@name ] );\r
+                               }\r
+                               \r
+                       }\r
+                       \r
+                       return "{" + s + "}";\r
+               }\r
+\r
+               \r
+       }\r
+       \r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONParseError.as
new file mode 100644 (file)
index 0000000..5aec1e3
--- /dev/null
@@ -0,0 +1,87 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       /**\r
+        *\r
+        *\r
+        */\r
+       public class JSONParseError extends Error       {\r
+       \r
+               /** The location in the string where the error occurred */\r
+               private var _location:int;\r
+               \r
+               /** The string in which the parse error occurred */\r
+               private var _text:String;\r
+       \r
+               /**\r
+                * Constructs a new JSONParseError.\r
+                *\r
+                * @param message The error message that occured during parsing\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function JSONParseError( message:String = "", location:int = 0, text:String = "") {\r
+                       super( message );\r
+                       name = "JSONParseError";\r
+                       _location = location;\r
+                       _text = text;\r
+               }\r
+\r
+               /**\r
+                * Provides read-only access to the location variable.\r
+                *\r
+                * @return The location in the string where the error occurred\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function get location():int {\r
+                       return _location;\r
+               }\r
+               \r
+               /**\r
+                * Provides read-only access to the text variable.\r
+                *\r
+                * @return The string in which the error occurred\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function get text():String {\r
+                       return _text;\r
+               }\r
+       }\r
+       \r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONToken.as
new file mode 100644 (file)
index 0000000..258d63c
--- /dev/null
@@ -0,0 +1,104 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       public class JSONToken {\r
+       \r
+               private var _type:int;\r
+               private var _value:Object;\r
+               \r
+               /**\r
+                * Creates a new JSONToken with a specific token type and value.\r
+                *\r
+                * @param type The JSONTokenType of the token\r
+                * @param value The value of the token\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function JSONToken( type:int = -1 /* JSONTokenType.UNKNOWN */, value:Object = null ) {\r
+                       _type = type;\r
+                       _value = value;\r
+               }\r
+               \r
+               /**\r
+                * Returns the type of the token.\r
+                *\r
+                * @see com.adobe.serialization.json.JSONTokenType\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function get type():int {\r
+                       return _type;   \r
+               }\r
+               \r
+               /**\r
+                * Sets the type of the token.\r
+                *\r
+                * @see com.adobe.serialization.json.JSONTokenType\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function set type( value:int ):void {\r
+                       _type = value;  \r
+               }\r
+               \r
+               /**\r
+                * Gets the value of the token\r
+                *\r
+                * @see com.adobe.serialization.json.JSONTokenType\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function get value():Object {\r
+                       return _value;  \r
+               }\r
+               \r
+               /**\r
+                * Sets the value of the token\r
+                *\r
+                * @see com.adobe.serialization.json.JSONTokenType\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public function set value ( v:Object ):void {\r
+                       _value = v;     \r
+               }\r
+\r
+       }\r
+       \r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenType.as
new file mode 100644 (file)
index 0000000..fceb3f0
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       /**\r
+        * Class containing constant values for the different types\r
+        * of tokens in a JSON encoded string.\r
+        */\r
+       public class JSONTokenType {\r
+       \r
+               public static const UNKNOWN:int = -1;\r
+               \r
+               public static const COMMA:int = 0;\r
+               \r
+               public static const LEFT_BRACE:int = 1;\r
+               \r
+               public static const RIGHT_BRACE:int = 2;\r
+               \r
+               public static const LEFT_BRACKET:int = 3;\r
+               \r
+               public static const RIGHT_BRACKET:int = 4;\r
+               \r
+               public static const COLON:int = 6;\r
+               \r
+               public static const TRUE:int = 7;\r
+               \r
+               public static const FALSE:int = 8;\r
+               \r
+               public static const NULL:int = 9;\r
+               \r
+               public static const STRING:int = 10;\r
+               \r
+               public static const NUMBER:int = 11;\r
+               \r
+       }\r
+       \r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as b/redakcja/static/filebrowser/uploadify/com/adobe/serialization/json/JSONTokenizer.as
new file mode 100644 (file)
index 0000000..dc36bfc
--- /dev/null
@@ -0,0 +1,583 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.serialization.json {\r
+\r
+       public class JSONTokenizer {\r
+       \r
+               /** The object that will get parsed from the JSON string */\r
+               private var obj:Object;\r
+               \r
+               /** The JSON string to be parsed */\r
+               private var jsonString:String;\r
+               \r
+               /** The current parsing location in the JSON string */\r
+               private var loc:int;\r
+               \r
+               /** The current character in the JSON string during parsing */\r
+               private var ch:String;\r
+               \r
+               /**\r
+                * Constructs a new JSONDecoder to parse a JSON string \r
+                * into a native object.\r
+                *\r
+                * @param s The JSON string to be converted\r
+                *              into a native object\r
+                */\r
+               public function JSONTokenizer( s:String ) {\r
+                       jsonString = s;\r
+                       loc = 0;\r
+                       \r
+                       // prime the pump by getting the first character\r
+                       nextChar();\r
+               }\r
+               \r
+               /**\r
+                * Gets the next token in the input sting and advances\r
+               * the character to the next character after the token\r
+                */\r
+               public function getNextToken():JSONToken {\r
+                       var token:JSONToken = new JSONToken();\r
+                       \r
+                       // skip any whitespace / comments since the last \r
+                       // token was read\r
+                       skipIgnored();\r
+                                               \r
+                       // examine the new character and see what we have...\r
+                       switch ( ch ) {\r
+                               \r
+                               case '{':\r
+                                       token.type = JSONTokenType.LEFT_BRACE;\r
+                                       token.value = '{';\r
+                                       nextChar();\r
+                                       break\r
+                                       \r
+                               case '}':\r
+                                       token.type = JSONTokenType.RIGHT_BRACE;\r
+                                       token.value = '}';\r
+                                       nextChar();\r
+                                       break\r
+                                       \r
+                               case '[':\r
+                                       token.type = JSONTokenType.LEFT_BRACKET;\r
+                                       token.value = '[';\r
+                                       nextChar();\r
+                                       break\r
+                                       \r
+                               case ']':\r
+                                       token.type = JSONTokenType.RIGHT_BRACKET;\r
+                                       token.value = ']';\r
+                                       nextChar();\r
+                                       break\r
+                               \r
+                               case ',':\r
+                                       token.type = JSONTokenType.COMMA;\r
+                                       token.value = ',';\r
+                                       nextChar();\r
+                                       break\r
+                                       \r
+                               case ':':\r
+                                       token.type = JSONTokenType.COLON;\r
+                                       token.value = ':';\r
+                                       nextChar();\r
+                                       break;\r
+                                       \r
+                               case 't': // attempt to read true\r
+                                       var possibleTrue:String = "t" + nextChar() + nextChar() + nextChar();\r
+                                       \r
+                                       if ( possibleTrue == "true" ) {\r
+                                               token.type = JSONTokenType.TRUE;\r
+                                               token.value = true;\r
+                                               nextChar();\r
+                                       } else {\r
+                                               parseError( "Expecting 'true' but found " + possibleTrue );\r
+                                       }\r
+                                       \r
+                                       break;\r
+                                       \r
+                               case 'f': // attempt to read false\r
+                                       var possibleFalse:String = "f" + nextChar() + nextChar() + nextChar() + nextChar();\r
+                                       \r
+                                       if ( possibleFalse == "false" ) {\r
+                                               token.type = JSONTokenType.FALSE;\r
+                                               token.value = false;\r
+                                               nextChar();\r
+                                       } else {\r
+                                               parseError( "Expecting 'false' but found " + possibleFalse );\r
+                                       }\r
+                                       \r
+                                       break;\r
+                                       \r
+                               case 'n': // attempt to read null\r
+                               \r
+                                       var possibleNull:String = "n" + nextChar() + nextChar() + nextChar();\r
+                                       \r
+                                       if ( possibleNull == "null" ) {\r
+                                               token.type = JSONTokenType.NULL;\r
+                                               token.value = null;\r
+                                               nextChar();\r
+                                       } else {\r
+                                               parseError( "Expecting 'null' but found " + possibleNull );\r
+                                       }\r
+                                       \r
+                                       break;\r
+                                       \r
+                               case '"': // the start of a string\r
+                                       token = readString();\r
+                                       break;\r
+                                       \r
+                               default: \r
+                                       // see if we can read a number\r
+                                       if ( isDigit( ch ) || ch == '-' ) {\r
+                                               token = readNumber();\r
+                                       } else if ( ch == '' ) {\r
+                                               // check for reading past the end of the string\r
+                                               return null;\r
+                                       } else {                                                \r
+                                               // not sure what was in the input string - it's not\r
+                                               // anything we expected\r
+                                               parseError( "Unexpected " + ch + " encountered" );\r
+                                       }\r
+                       }\r
+                       \r
+                       return token;\r
+               }\r
+               \r
+               /**\r
+                * Attempts to read a string from the input string.  Places\r
+                * the character location at the first character after the\r
+                * string.  It is assumed that ch is " before this method is called.\r
+                *\r
+                * @return the JSONToken with the string value if a string could\r
+                *              be read.  Throws an error otherwise.\r
+                */\r
+               private function readString():JSONToken {\r
+                       // the token for the string we'll try to read\r
+                       var token:JSONToken = new JSONToken();\r
+                       token.type = JSONTokenType.STRING;\r
+                       \r
+                       // the string to store the string we'll try to read\r
+                       var string:String = "";\r
+                       \r
+                       // advance past the first "\r
+                       nextChar();\r
+                       \r
+                       while ( ch != '"' && ch != '' ) {\r
+                                                               \r
+                               // unescape the escape sequences in the string\r
+                               if ( ch == '\\' ) {\r
+                                       \r
+                                       // get the next character so we know what\r
+                                       // to unescape\r
+                                       nextChar();\r
+                                       \r
+                                       switch ( ch ) {\r
+                                               \r
+                                               case '"': // quotation mark\r
+                                                       string += '"';\r
+                                                       break;\r
+                                               \r
+                                               case '/':       // solidus\r
+                                                       string += "/";\r
+                                                       break;\r
+                                                       \r
+                                               case '\\':      // reverse solidus\r
+                                                       string += '\\';\r
+                                                       break;\r
+                                                       \r
+                                               case 'b':       // bell\r
+                                                       string += '\b';\r
+                                                       break;\r
+                                                       \r
+                                               case 'f':       // form feed\r
+                                                       string += '\f';\r
+                                                       break;\r
+                                                       \r
+                                               case 'n':       // newline\r
+                                                       string += '\n';\r
+                                                       break;\r
+                                                       \r
+                                               case 'r':       // carriage return\r
+                                                       string += '\r';\r
+                                                       break;\r
+                                                       \r
+                                               case 't':       // horizontal tab\r
+                                                       string += '\t'\r
+                                                       break;\r
+                                               \r
+                                               case 'u':\r
+                                                       // convert a unicode escape sequence\r
+                                                       // to it's character value - expecting\r
+                                                       // 4 hex digits\r
+                                                       \r
+                                                       // save the characters as a string we'll convert to an int\r
+                                                       var hexValue:String = "";\r
+                                                       \r
+                                                       // try to find 4 hex characters\r
+                                                       for ( var i:int = 0; i < 4; i++ ) {\r
+                                                               // get the next character and determine\r
+                                                               // if it's a valid hex digit or not\r
+                                                               if ( !isHexDigit( nextChar() ) ) {\r
+                                                                       parseError( " Excepted a hex digit, but found: " + ch );\r
+                                                               }\r
+                                                               // valid, add it to the value\r
+                                                               hexValue += ch;\r
+                                                       }\r
+                                                       \r
+                                                       // convert hexValue to an integer, and use that\r
+                                                       // integrer value to create a character to add\r
+                                                       // to our string.\r
+                                                       string += String.fromCharCode( parseInt( hexValue, 16 ) );\r
+                                                       \r
+                                                       break;\r
+                                       \r
+                                               default:\r
+                                                       // couldn't unescape the sequence, so just\r
+                                                       // pass it through\r
+                                                       string += '\\' + ch;\r
+                                               \r
+                                       }\r
+                                       \r
+                               } else {\r
+                                       // didn't have to unescape, so add the character to the string\r
+                                       string += ch;\r
+                                       \r
+                               }\r
+                               \r
+                               // move to the next character\r
+                               nextChar();\r
+                               \r
+                       }\r
+                       \r
+                       // we read past the end of the string without closing it, which\r
+                       // is a parse error\r
+                       if ( ch == '' ) {\r
+                               parseError( "Unterminated string literal" );\r
+                       }\r
+                       \r
+                       // move past the closing " in the input string\r
+                       nextChar();\r
+                       \r
+                       // attach to the string to the token so we can return it\r
+                       token.value = string;\r
+                       \r
+                       return token;\r
+               }\r
+               \r
+               /**\r
+                * Attempts to read a number from the input string.  Places\r
+                * the character location at the first character after the\r
+                * number.\r
+                * \r
+                * @return The JSONToken with the number value if a number could\r
+                *              be read.  Throws an error otherwise.\r
+                */\r
+               private function readNumber():JSONToken {\r
+                       // the token for the number we'll try to read\r
+                       var token:JSONToken = new JSONToken();\r
+                       token.type = JSONTokenType.NUMBER;\r
+                       \r
+                       // the string to accumulate the number characters\r
+                       // into that we'll convert to a number at the end\r
+                       var input:String = "";\r
+                       \r
+                       // check for a negative number\r
+                       if ( ch == '-' ) {\r
+                               input += '-';\r
+                               nextChar();\r
+                       }\r
+                       \r
+                       // the number must start with a digit\r
+                       if ( !isDigit( ch ) )\r
+                       {\r
+                               parseError( "Expecting a digit" );\r
+                       }\r
+                       \r
+                       // 0 can only be the first digit if it\r
+                       // is followed by a decimal point\r
+                       if ( ch == '0' )\r
+                       {\r
+                               input += ch;\r
+                               nextChar();\r
+                               \r
+                               // make sure no other digits come after 0\r
+                               if ( isDigit( ch ) )\r
+                               {\r
+                                       parseError( "A digit cannot immediately follow 0" );\r
+                               }\r
+// Commented out - this should only be available when "strict" is false\r
+//                             // unless we have 0x which starts a hex number\\r
+//                             else if ( ch == 'x' )\r
+//                             {\r
+//                                     // include the x in the input\r
+//                                     input += ch;\r
+//                                     nextChar();\r
+//                                     \r
+//                                     // need at least one hex digit after 0x to\r
+//                                     // be valid\r
+//                                     if ( isHexDigit( ch ) )\r
+//                                     {\r
+//                                             input += ch;\r
+//                                             nextChar();\r
+//                                     }\r
+//                                     else\r
+//                                     {\r
+//                                             parseError( "Number in hex format require at least one hex digit after \"0x\"" );       \r
+//                                     }\r
+//                                     \r
+//                                     // consume all of the hex values\r
+//                                     while ( isHexDigit( ch ) )\r
+//                                     {\r
+//                                             input += ch;\r
+//                                             nextChar();\r
+//                                     }\r
+//                             }\r
+                       }\r
+                       else\r
+                       {\r
+                               // read numbers while we can\r
+                               while ( isDigit( ch ) ) {\r
+                                       input += ch;\r
+                                       nextChar();\r
+                               }\r
+                       }\r
+                       \r
+                       // check for a decimal value\r
+                       if ( ch == '.' ) {\r
+                               input += '.';\r
+                               nextChar();\r
+                               \r
+                               // after the decimal there has to be a digit\r
+                               if ( !isDigit( ch ) )\r
+                               {\r
+                                       parseError( "Expecting a digit" );\r
+                               }\r
+                               \r
+                               // read more numbers to get the decimal value\r
+                               while ( isDigit( ch ) ) {\r
+                                       input += ch;\r
+                                       nextChar();\r
+                               }\r
+                       }\r
+                       \r
+                       // check for scientific notation\r
+                       if ( ch == 'e' || ch == 'E' )\r
+                       {\r
+                               input += "e"\r
+                               nextChar();\r
+                               // check for sign\r
+                               if ( ch == '+' || ch == '-' )\r
+                               {\r
+                                       input += ch;\r
+                                       nextChar();\r
+                               }\r
+                               \r
+                               // require at least one number for the exponent\r
+                               // in this case\r
+                               if ( !isDigit( ch ) )\r
+                               {\r
+                                       parseError( "Scientific notation number needs exponent value" );\r
+                               }\r
+                                                       \r
+                               // read in the exponent\r
+                               while ( isDigit( ch ) )\r
+                               {\r
+                                       input += ch;\r
+                                       nextChar();\r
+                               }\r
+                       }\r
+                       \r
+                       // convert the string to a number value\r
+                       var num:Number = Number( input );\r
+                       \r
+                       if ( isFinite( num ) && !isNaN( num ) ) {\r
+                               token.value = num;\r
+                               return token;\r
+                       } else {\r
+                               parseError( "Number " + num + " is not valid!" );\r
+                       }\r
+            return null;\r
+               }\r
+\r
+               /**\r
+                * Reads the next character in the input\r
+                * string and advances the character location.\r
+                *\r
+                * @return The next character in the input string, or\r
+                *              null if we've read past the end.\r
+                */\r
+               private function nextChar():String {\r
+                       return ch = jsonString.charAt( loc++ );\r
+               }\r
+               \r
+               /**\r
+                * Advances the character location past any\r
+                * sort of white space and comments\r
+                */\r
+               private function skipIgnored():void\r
+               {\r
+                       var originalLoc:int;\r
+                       \r
+                       // keep trying to skip whitespace and comments as long\r
+                       // as we keep advancing past the original location \r
+                       do\r
+                       {\r
+                               originalLoc = loc;\r
+                               skipWhite();\r
+                               skipComments();\r
+                       }\r
+                       while ( originalLoc != loc );\r
+               }\r
+               \r
+               /**\r
+                * Skips comments in the input string, either\r
+                * single-line or multi-line.  Advances the character\r
+                * to the first position after the end of the comment.\r
+                */\r
+               private function skipComments():void {\r
+                       if ( ch == '/' ) {\r
+                               // Advance past the first / to find out what type of comment\r
+                               nextChar();\r
+                               switch ( ch ) {\r
+                                       case '/': // single-line comment, read through end of line\r
+                                               \r
+                                               // Loop over the characters until we find\r
+                                               // a newline or until there's no more characters left\r
+                                               do {\r
+                                                       nextChar();\r
+                                               } while ( ch != '\n' && ch != '' )\r
+                                               \r
+                                               // move past the \n\r
+                                               nextChar();\r
+                                               \r
+                                               break;\r
+                                       \r
+                                       case '*': // multi-line comment, read until closing */\r
+\r
+                                               // move past the opening *\r
+                                               nextChar();\r
+                                               \r
+                                               // try to find a trailing */\r
+                                               while ( true ) {\r
+                                                       if ( ch == '*' ) {\r
+                                                               // check to see if we have a closing /\r
+                                                               nextChar();\r
+                                                               if ( ch == '/') {\r
+                                                                       // move past the end of the closing */\r
+                                                                       nextChar();\r
+                                                                       break;\r
+                                                               }\r
+                                                       } else {\r
+                                                               // move along, looking if the next character is a *\r
+                                                               nextChar();\r
+                                                       }\r
+                                                       \r
+                                                       // when we're here we've read past the end of \r
+                                                       // the string without finding a closing */, so error\r
+                                                       if ( ch == '' ) {\r
+                                                               parseError( "Multi-line comment not closed" );\r
+                                                       }\r
+                                               }\r
+\r
+                                               break;\r
+                                       \r
+                                       // Can't match a comment after a /, so it's a parsing error\r
+                                       default:\r
+                                               parseError( "Unexpected " + ch + " encountered (expecting '/' or '*' )" );\r
+                               }\r
+                       }\r
+                       \r
+               }\r
+               \r
+               \r
+               /**\r
+                * Skip any whitespace in the input string and advances\r
+                * the character to the first character after any possible\r
+                * whitespace.\r
+                */\r
+               private function skipWhite():void {\r
+                       \r
+                       // As long as there are spaces in the input \r
+                       // stream, advance the current location pointer\r
+                       // past them\r
+                       while ( isWhiteSpace( ch ) ) {\r
+                               nextChar();\r
+                       }\r
+                       \r
+               }\r
+               \r
+               /**\r
+                * Determines if a character is whitespace or not.\r
+                *\r
+                * @return True if the character passed in is a whitespace\r
+                *      character\r
+                */\r
+               private function isWhiteSpace( ch:String ):Boolean {\r
+                       return ( ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' );\r
+               }\r
+               \r
+               /**\r
+                * Determines if a character is a digit [0-9].\r
+                *\r
+                * @return True if the character passed in is a digit\r
+                */\r
+               private function isDigit( ch:String ):Boolean {\r
+                       return ( ch >= '0' && ch <= '9' );\r
+               }\r
+               \r
+               /**\r
+                * Determines if a character is a digit [0-9].\r
+                *\r
+                * @return True if the character passed in is a digit\r
+                */\r
+               private function isHexDigit( ch:String ):Boolean {\r
+                       // get the uppercase value of ch so we only have\r
+                       // to compare the value between 'A' and 'F'\r
+                       var uc:String = ch.toUpperCase();\r
+                       \r
+                       // a hex digit is a digit of A-F, inclusive ( using\r
+                       // our uppercase constraint )\r
+                       return ( isDigit( ch ) || ( uc >= 'A' && uc <= 'F' ) );\r
+               }\r
+       \r
+               /**\r
+                * Raises a parsing error with a specified message, tacking\r
+                * on the error location and the original string.\r
+                *\r
+                * @param message The message indicating why the error occurred\r
+                */\r
+               public function parseError( message:String ):void {\r
+                       throw new JSONParseError( message, loc, jsonString );\r
+               }\r
+       }\r
+       \r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/ArrayUtil.as
new file mode 100644 (file)
index 0000000..e656120
--- /dev/null
@@ -0,0 +1,187 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.utils\r
+{\r
+       \r
+       /**\r
+       *       Class that contains static utility methods for manipulating and working\r
+       *       with Arrays.\r
+       * \r
+       *       Note that all APIs assume that they are working with well formed arrays.\r
+       *       i.e. they will only manipulate indexed values.  \r
+       * \r
+       *       @langversion ActionScript 3.0\r
+       *       @playerversion Flash 9.0\r
+       *       @tiptext\r
+       */              \r
+       public class ArrayUtil\r
+       {\r
+                               \r
+               /**\r
+               *       Determines whether the specified array contains the specified value.    \r
+               * \r
+               *       @param arr The array that will be checked for the specified value.\r
+               *\r
+               *       @param value The object which will be searched for within the array\r
+               * \r
+               *       @return True if the array contains the value, False if it does not.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */                      \r
+               public static function arrayContainsValue(arr:Array, value:Object):Boolean\r
+               {\r
+                       return (arr.indexOf(value) != -1);\r
+               }       \r
+               \r
+               /**\r
+               *       Remove all instances of the specified value from the array,\r
+               * \r
+               *       @param arr The array from which the value will be removed\r
+               *\r
+               *       @param value The object that will be removed from the array.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */              \r
+               public static function removeValueFromArray(arr:Array, value:Object):void\r
+               {\r
+                       var len:uint = arr.length;\r
+                       \r
+                       for(var i:Number = len; i > -1; i--)\r
+                       {\r
+                               if(arr[i] === value)\r
+                               {\r
+                                       arr.splice(i, 1);\r
+                               }\r
+                       }                                       \r
+               }\r
+\r
+               /**\r
+               *       Create a new array that only contains unique instances of objects\r
+               *       in the specified array.\r
+               *\r
+               *       Basically, this can be used to remove duplication object instances\r
+               *       from an array\r
+               * \r
+               *       @param arr The array which contains the values that will be used to\r
+               *       create the new array that contains no duplicate values.\r
+               *\r
+               *       @return A new array which only contains unique items from the specified\r
+               *       array.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */      \r
+               public static function createUniqueCopy(a:Array):Array\r
+               {\r
+                       var newArray:Array = new Array();\r
+                       \r
+                       var len:Number = a.length;\r
+                       var item:Object;\r
+                       \r
+                       for (var i:uint = 0; i < len; ++i)\r
+                       {\r
+                               item = a[i];\r
+                               \r
+                               if(ArrayUtil.arrayContainsValue(newArray, item))\r
+                               {\r
+                                       continue;\r
+                               }\r
+                               \r
+                               newArray.push(item);\r
+                       }\r
+                       \r
+                       return newArray;\r
+               }\r
+               \r
+               /**\r
+               *       Creates a copy of the specified array.\r
+               *\r
+               *       Note that the array returned is a new array but the items within the\r
+               *       array are not copies of the items in the original array (but rather \r
+               *       references to the same items)\r
+               * \r
+               *       @param arr The array that will be copies\r
+               *\r
+               *       @return A new array which contains the same items as the array passed\r
+               *       in.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */                      \r
+               public static function copyArray(arr:Array):Array\r
+               {       \r
+                       return arr.slice();\r
+               }\r
+               \r
+               /**\r
+               *       Compares two arrays and returns a boolean indicating whether the arrays\r
+               *       contain the same values at the same indexes.\r
+               * \r
+               *       @param arr1 The first array that will be compared to the second.\r
+               *\r
+               *       @param arr2 The second array that will be compared to the first.\r
+               *\r
+               *       @return True if the arrays contains the same values at the same indexes.\r
+                       False if they do not.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */              \r
+               public static function arraysAreEqual(arr1:Array, arr2:Array):Boolean\r
+               {\r
+                       if(arr1.length != arr2.length)\r
+                       {\r
+                               return false;\r
+                       }\r
+                       \r
+                       var len:Number = arr1.length;\r
+                       \r
+                       for(var i:Number = 0; i < len; i++)\r
+                       {\r
+                               if(arr1[i] !== arr2[i])\r
+                               {\r
+                                       return false;\r
+                               }\r
+                       }\r
+                       \r
+                       return true;\r
+               }\r
+       }\r
+}\r
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/DateUtil.as
new file mode 100644 (file)
index 0000000..a49fe43
--- /dev/null
@@ -0,0 +1,699 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.utils
+{
+       import mx.formatters.DateBase;
+
+       /**
+       *       Class that contains static utility methods for manipulating and working
+       *       with Dates.
+       * 
+       *       @langversion ActionScript 3.0
+       *       @playerversion Flash 9.0
+       *       @tiptext
+       */      
+       public class DateUtil
+       {
+       
+               /**
+               *       Returns the English Short Month name (3 letters) for the Month that
+               *       the Date represents.    
+               * 
+               *       @param d The Date instance whose month will be used to retrieve the
+               *       short month name.
+               * 
+               *       @return An English 3 Letter Month abbreviation.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see SHORT_MONTH
+               */      
+               public static function getShortMonthName(d:Date):String
+               {
+                       return DateBase.monthNamesShort[d.getMonth()];
+               }
+
+               /**
+               *       Returns the index of the month that the short month name string
+               *       represents.     
+               * 
+               *       @param m The 3 letter abbreviation representing a short month name.
+               *
+               *       @param Optional parameter indicating whether the search should be case
+               *       sensitive
+               * 
+               *       @return A int that represents that month represented by the specifed
+               *       short name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see SHORT_MONTH
+               */      
+               public static function getShortMonthIndex(m:String):int
+               {
+                       return DateBase.monthNamesShort.indexOf(m);
+               }
+               
+               /**
+               *       Returns the English full Month name for the Month that
+               *       the Date represents.    
+               * 
+               *       @param d The Date instance whose month will be used to retrieve the
+               *       full month name.
+               * 
+               *       @return An English full month name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see FULL_MONTH
+               */      
+               public static function getFullMonthName(d:Date):String
+               {
+                       return DateBase.monthNamesLong[d.getMonth()];   
+               }
+
+               /**
+               *       Returns the index of the month that the full month name string
+               *       represents.     
+               * 
+               *       @param m A full month name.
+               * 
+               *       @return A int that represents that month represented by the specifed
+               *       full month name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see FULL_MONTH
+               */      
+               public static function getFullMonthIndex(m:String):int
+               {
+                       return DateBase.monthNamesLong.indexOf(m);
+               }
+
+               /**
+               *       Returns the English Short Day name (3 letters) for the day that
+               *       the Date represents.    
+               * 
+               *       @param d The Date instance whose day will be used to retrieve the
+               *       short day name.
+               * 
+               *       @return An English 3 Letter day abbreviation.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see SHORT_DAY
+               */      
+               public static function getShortDayName(d:Date):String
+               {
+                       return DateBase.dayNamesShort[d.getDay()];      
+               }
+               
+               /**
+               *       Returns the index of the day that the short day name string
+               *       represents.     
+               * 
+               *       @param m A short day name.
+               * 
+               *       @return A int that represents that short day represented by the specifed
+               *       full month name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see SHORT_DAY
+               */                      
+               public static function getShortDayIndex(d:String):int
+               {
+                       return DateBase.dayNamesShort.indexOf(d);
+               }
+
+               /**
+               *       Returns the English full day name for the day that
+               *       the Date represents.    
+               * 
+               *       @param d The Date instance whose day will be used to retrieve the
+               *       full day name.
+               * 
+               *       @return An English full day name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see FULL_DAY
+               */      
+               public static function getFullDayName(d:Date):String
+               {
+                       return DateBase.dayNamesLong[d.getDay()];       
+               }               
+
+               /**
+               *       Returns the index of the day that the full day name string
+               *       represents.     
+               * 
+               *       @param m A full day name.
+               * 
+               *       @return A int that represents that full day represented by the specifed
+               *       full month name.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               *
+               *       @see FULL_DAY
+               */              
+               public static function getFullDayIndex(d:String):int
+               {
+                       return DateBase.dayNamesLong.indexOf(d);
+               }
+
+               /**
+               *       Returns a two digit representation of the year represented by the 
+               *       specified date.
+               * 
+               *       @param d The Date instance whose year will be used to generate a two
+               *       digit string representation of the year.
+               * 
+               *       @return A string that contains a 2 digit representation of the year.
+               *       Single digits will be padded with 0.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function getShortYear(d:Date):String
+               {
+                       var dStr:String = String(d.getFullYear());
+                       
+                       if(dStr.length < 3)
+                       {
+                               return dStr;
+                       }
+
+                       return (dStr.substr(dStr.length - 2));
+               }
+
+               /**
+               *       Compares two dates and returns an integer depending on their relationship.
+               *
+               *       Returns -1 if d1 is greater than d2.
+               *       Returns 1 if d2 is greater than d1.
+               *       Returns 0 if both dates are equal.
+               * 
+               *       @param d1 The date that will be compared to the second date.
+               *       @param d2 The date that will be compared to the first date.
+               * 
+               *       @return An int indicating how the two dates compare.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function compareDates(d1:Date, d2:Date):int
+               {
+                       var d1ms:Number = d1.getTime();
+                       var d2ms:Number = d2.getTime();
+                       
+                       if(d1ms > d2ms)
+                       {
+                               return -1;
+                       }
+                       else if(d1ms < d2ms)
+                       {
+                               return 1;
+                       }
+                       else
+                       {
+                               return 0;
+                       }
+               }
+
+               /**
+               *       Returns a short hour (0 - 12) represented by the specified date.
+               *
+               *       If the hour is less than 12 (0 - 11 AM) then the hour will be returned.
+               *
+               *       If the hour is greater than 12 (12 - 23 PM) then the hour minus 12
+               *       will be returned.
+               * 
+               *       @param d1 The Date from which to generate the short hour
+               * 
+               *       @return An int between 0 and 13 ( 1 - 12 ) representing the short hour.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function getShortHour(d:Date):int
+               {
+                       var h:int = d.hours;
+                       
+                       if(h == 0 || h == 12)
+                       {
+                               return 12;
+                       }
+                       else if(h > 12)
+                       {
+                               return h - 12;
+                       }
+                       else
+                       {
+                               return h;
+                       }
+               }
+               
+               /**
+               *       Returns a string indicating whether the date represents a time in the
+               *       ante meridiem (AM) or post meridiem (PM).
+               *
+               *       If the hour is less than 12 then "AM" will be returned.
+               *
+               *       If the hour is greater than 12 then "PM" will be returned.
+               * 
+               *       @param d1 The Date from which to generate the 12 hour clock indicator.
+               * 
+               *       @return A String ("AM" or "PM") indicating which half of the day the 
+               *       hour represents.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function getAMPM(d:Date):String
+               {
+                       return (d.hours > 11)? "PM" : "AM";
+               }
+
+               /**
+               * Parses dates that conform to RFC822 into Date objects. This method also
+               * supports four-digit years (not supported in RFC822), but two-digit years
+               * (referring to the 20th century) are fine, too.
+               *
+               * This function is useful for parsing RSS .91, .92, and 2.0 dates.
+               *
+               * @param str
+               *
+               * @returns
+               *
+               * @langversion ActionScript 3.0
+               * @playerversion Flash 9.0
+               * @tiptext
+               *
+               * @see http://asg.web.cmu.edu/rfc/rfc822.html
+               */              
+               public static function parseRFC822(str:String):Date
+               {
+            var finalDate:Date;
+                       try
+                       {
+                               var dateParts:Array = str.split(" ");
+                               var day:String = null;
+                               
+                               if (dateParts[0].search(/\d/) == -1)
+                               {
+                                       day = dateParts.shift().replace(/\W/, "");
+                               }
+                               
+                               var date:Number = Number(dateParts.shift());
+                               var month:Number = Number(DateUtil.getShortMonthIndex(dateParts.shift()));
+                               var year:Number = Number(dateParts.shift());
+                               var timeParts:Array = dateParts.shift().split(":");
+                               var hour:Number = int(timeParts.shift());
+                               var minute:Number = int(timeParts.shift());
+                               var second:Number = (timeParts.length > 0) ? int(timeParts.shift()): 0;
+       
+                               var milliseconds:Number = Date.UTC(year, month, date, hour, minute, second, 0);
+       
+                               var timezone:String = dateParts.shift();
+                               var offset:Number = 0;
+
+                               if (timezone.search(/\d/) == -1)
+                               {
+                                       switch(timezone)
+                                       {
+                                               case "UT":
+                                                       offset = 0;
+                                                       break;
+                                               case "UTC":
+                                                       offset = 0;
+                                                       break;
+                                               case "GMT":
+                                                       offset = 0;
+                                                       break;
+                                               case "EST":
+                                                       offset = (-5 * 3600000);
+                                                       break;
+                                               case "EDT":
+                                                       offset = (-4 * 3600000);
+                                                       break;
+                                               case "CST":
+                                                       offset = (-6 * 3600000);
+                                                       break;
+                                               case "CDT":
+                                                       offset = (-5 * 3600000);
+                                                       break;
+                                               case "MST":
+                                                       offset = (-7 * 3600000);
+                                                       break;
+                                               case "MDT":
+                                                       offset = (-6 * 3600000);
+                                                       break;
+                                               case "PST":
+                                                       offset = (-8 * 3600000);
+                                                       break;
+                                               case "PDT":
+                                                       offset = (-7 * 3600000);
+                                                       break;
+                                               case "Z":
+                                                       offset = 0;
+                                                       break;
+                                               case "A":
+                                                       offset = (-1 * 3600000);
+                                                       break;
+                                               case "M":
+                                                       offset = (-12 * 3600000);
+                                                       break;
+                                               case "N":
+                                                       offset = (1 * 3600000);
+                                                       break;
+                                               case "Y":
+                                                       offset = (12 * 3600000);
+                                                       break;
+                                               default:
+                                                       offset = 0;
+                                       }
+                               }
+                               else
+                               {
+                                       var multiplier:Number = 1;
+                                       var oHours:Number = 0;
+                                       var oMinutes:Number = 0;
+                                       if (timezone.length != 4)
+                                       {
+                                               if (timezone.charAt(0) == "-")
+                                               {
+                                                       multiplier = -1;
+                                               }
+                                               timezone = timezone.substr(1, 4);
+                                       }
+                                       oHours = Number(timezone.substr(0, 2));
+                                       oMinutes = Number(timezone.substr(2, 2));
+                                       offset = (((oHours * 3600000) + (oMinutes * 60000)) * multiplier);
+                               }
+
+                               finalDate = new Date(milliseconds - offset);
+
+                               if (finalDate.toString() == "Invalid Date")
+                               {
+                                       throw new Error("This date does not conform to RFC822.");
+                               }
+                       }
+                       catch (e:Error)
+                       {
+                               var eStr:String = "Unable to parse the string [" +str+ "] into a date. ";
+                               eStr += "The internal error was: " + e.toString();
+                               throw new Error(eStr);
+                       }
+            return finalDate;
+               }
+            
+               /**
+               * Returns a date string formatted according to RFC822.
+               *
+               * @param d
+               *
+               * @returns
+               *
+               * @langversion ActionScript 3.0
+               * @playerversion Flash 9.0
+               * @tiptext
+               *
+               * @see http://asg.web.cmu.edu/rfc/rfc822.html
+               */      
+               public static function toRFC822(d:Date):String
+               {
+                       var date:Number = d.getUTCDate();
+                       var hours:Number = d.getUTCHours();
+                       var minutes:Number = d.getUTCMinutes();
+                       var seconds:Number = d.getUTCSeconds();
+                       var sb:String = new String();
+                       sb += DateBase.dayNamesShort[d.getUTCDay()];
+                       sb += ", ";
+                       
+                       if (date < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += date;
+                       sb += " ";
+                       //sb += DateUtil.SHORT_MONTH[d.getUTCMonth()];
+                       sb += DateBase.monthNamesShort[d.getUTCMonth()];
+                       sb += " ";
+                       sb += d.getUTCFullYear();
+                       sb += " ";
+                       if (hours < 10)
+                       {                       
+                               sb += "0";
+                       }
+                       sb += hours;
+                       sb += ":";
+                       if (minutes < 10)
+                       {                       
+                               sb += "0";
+                       }
+                       sb += minutes;
+                       sb += ":";
+                       if (seconds < 10)
+                       {                       
+                               sb += "0";
+                       }
+                       sb += seconds;
+                       sb += " GMT";
+                       return sb;
+               }
+            
+               /**
+               * Parses dates that conform to the W3C Date-time Format into Date objects.
+               *
+               * This function is useful for parsing RSS 1.0 and Atom 1.0 dates.
+               *
+               * @param str
+               *
+               * @returns
+               *
+               * @langversion ActionScript 3.0
+               * @playerversion Flash 9.0
+               * @tiptext
+               *
+               * @see http://www.w3.org/TR/NOTE-datetime
+               */                   
+               public static function parseW3CDTF(str:String):Date
+               {
+            var finalDate:Date;
+                       try
+                       {
+                               var dateStr:String = str.substring(0, str.indexOf("T"));
+                               var timeStr:String = str.substring(str.indexOf("T")+1, str.length);
+                               var dateArr:Array = dateStr.split("-");
+                               var year:Number = Number(dateArr.shift());
+                               var month:Number = Number(dateArr.shift());
+                               var date:Number = Number(dateArr.shift());
+                               
+                               var multiplier:Number;
+                               var offsetHours:Number;
+                               var offsetMinutes:Number;
+                               var offsetStr:String;
+                               
+                               if (timeStr.indexOf("Z") != -1)
+                               {
+                                       multiplier = 1;
+                                       offsetHours = 0;
+                                       offsetMinutes = 0;
+                                       timeStr = timeStr.replace("Z", "");
+                               }
+                               else if (timeStr.indexOf("+") != -1)
+                               {
+                                       multiplier = 1;
+                                       offsetStr = timeStr.substring(timeStr.indexOf("+")+1, timeStr.length);
+                                       offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":")));
+                                       offsetMinutes = Number(offsetStr.substring(offsetStr.indexOf(":")+1, offsetStr.length));
+                                       timeStr = timeStr.substring(0, timeStr.indexOf("+"));
+                               }
+                               else // offset is -
+                               {
+                                       multiplier = -1;
+                                       offsetStr = timeStr.substring(timeStr.indexOf("-")+1, timeStr.length);
+                                       offsetHours = Number(offsetStr.substring(0, offsetStr.indexOf(":")));
+                                       offsetMinutes = Number(offsetStr.substring(offsetStr.indexOf(":")+1, offsetStr.length));
+                                       timeStr = timeStr.substring(0, timeStr.indexOf("-"));
+                               }
+                               var timeArr:Array = timeStr.split(":");
+                               var hour:Number = Number(timeArr.shift());
+                               var minutes:Number = Number(timeArr.shift());
+                               var secondsArr:Array = (timeArr.length > 0) ? String(timeArr.shift()).split(".") : null;
+                               var seconds:Number = (secondsArr != null && secondsArr.length > 0) ? Number(secondsArr.shift()) : 0;
+                               var milliseconds:Number = (secondsArr != null && secondsArr.length > 0) ? Number(secondsArr.shift()) : 0;
+                               var utc:Number = Date.UTC(year, month-1, date, hour, minutes, seconds, milliseconds);
+                               var offset:Number = (((offsetHours * 3600000) + (offsetMinutes * 60000)) * multiplier);
+                               finalDate = new Date(utc - offset);
+       
+                               if (finalDate.toString() == "Invalid Date")
+                               {
+                                       throw new Error("This date does not conform to W3CDTF.");
+                               }
+                       }
+                       catch (e:Error)
+                       {
+                               var eStr:String = "Unable to parse the string [" +str+ "] into a date. ";
+                               eStr += "The internal error was: " + e.toString();
+                               throw new Error(eStr);
+                       }
+            return finalDate;
+               }
+            
+               /**
+               * Returns a date string formatted according to W3CDTF.
+               *
+               * @param d
+               * @param includeMilliseconds Determines whether to include the
+               * milliseconds value (if any) in the formatted string.
+               *
+               * @returns
+               *
+               * @langversion ActionScript 3.0
+               * @playerversion Flash 9.0
+               * @tiptext
+               *
+               * @see http://www.w3.org/TR/NOTE-datetime
+               */                   
+               public static function toW3CDTF(d:Date,includeMilliseconds:Boolean=false):String
+               {
+                       var date:Number = d.getUTCDate();
+                       var month:Number = d.getUTCMonth();
+                       var hours:Number = d.getUTCHours();
+                       var minutes:Number = d.getUTCMinutes();
+                       var seconds:Number = d.getUTCSeconds();
+                       var milliseconds:Number = d.getUTCMilliseconds();
+                       var sb:String = new String();
+                       
+                       sb += d.getUTCFullYear();
+                       sb += "-";
+                       
+                       //thanks to "dom" who sent in a fix for the line below
+                       if (month + 1 < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += month + 1;
+                       sb += "-";
+                       if (date < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += date;
+                       sb += "T";
+                       if (hours < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += hours;
+                       sb += ":";
+                       if (minutes < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += minutes;
+                       sb += ":";
+                       if (seconds < 10)
+                       {
+                               sb += "0";
+                       }
+                       sb += seconds;
+                       if (includeMilliseconds && milliseconds > 0)
+                       {
+                               sb += ".";
+                               sb += milliseconds;
+                       }
+                       sb += "-00:00";
+                       return sb;
+               }
+               
+               /**
+                * Converts a date into just after midnight.
+                */
+               public static function makeMorning(d:Date):Date
+               {
+                       var d:Date = new Date(d.time);
+                       d.hours = 0;
+            d.minutes = 0;
+            d.seconds = 0;
+            d.milliseconds = 0;
+            return d;
+               }
+               
+               /**
+                * Converts a date into just befor midnight.
+                */
+               public static function makeNight(d:Date):Date
+               {
+                       var d:Date = new Date(d.time);
+                       d.hours = 23;
+            d.minutes = 59;
+            d.seconds = 59;
+            d.milliseconds = 999;                              
+            return d;
+               }
+
+               /**
+                * Sort of converts a date into UTC.
+                */
+               public static function getUTCDate(d:Date):Date
+               {
+                       var nd:Date = new Date();
+                       var offset:Number = d.getTimezoneOffset() * 60 * 1000; 
+                       nd.setTime(d.getTime() + offset);
+                       return nd;
+               }
+       }
+}
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/DictionaryUtil.as
new file mode 100644 (file)
index 0000000..9552ef4
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.utils
+{
+       import flash.utils.Dictionary;
+       
+       public class DictionaryUtil
+       {
+               
+               /**
+               *       Returns an Array of all keys within the specified dictionary.   
+               * 
+               *       @param d The Dictionary instance whose keys will be returned.
+               * 
+               *       @return Array of keys contained within the Dictionary
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */                                      
+               public static function getKeys(d:Dictionary):Array
+               {
+                       var a:Array = new Array();
+                       
+                       for (var key:Object in d)
+                       {
+                               a.push(key);
+                       }
+                       
+                       return a;
+               }
+               
+               /**
+               *       Returns an Array of all values within the specified dictionary.         
+               * 
+               *       @param d The Dictionary instance whose values will be returned.
+               * 
+               *       @return Array of values contained within the Dictionary
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */                                      
+               public static function getValues(d:Dictionary):Array
+               {
+                       var a:Array = new Array();
+                       
+                       for each (var value:Object in d)
+                       {
+                               a.push(value);
+                       }
+                       
+                       return a;
+               }
+               
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/IntUtil.as
new file mode 100644 (file)
index 0000000..8c812fe
--- /dev/null
@@ -0,0 +1,99 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+package com.adobe.utils {\r
+       \r
+       import flash.utils.Endian;\r
+       \r
+       /**\r
+        * Contains reusable methods for operations pertaining \r
+        * to int values.\r
+        */\r
+       public class IntUtil {\r
+               \r
+               /**\r
+                * Rotates x left n bits\r
+                *\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function rol ( x:int, n:int ):int {\r
+                       return ( x << n ) | ( x >>> ( 32 - n ) );\r
+               }\r
+               \r
+               /**\r
+                * Rotates x right n bits\r
+                *\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function ror ( x:int, n:int ):uint {\r
+                       var nn:int = 32 - n;\r
+                       return ( x << nn ) | ( x >>> ( 32 - nn ) );\r
+               }\r
+               \r
+               /** String for quick lookup of a hex character based on index */\r
+               private static var hexChars:String = "0123456789abcdef";\r
+               \r
+               /**\r
+                * Outputs the hex value of a int, allowing the developer to specify\r
+                * the endinaness in the process.  Hex output is lowercase.\r
+                *\r
+                * @param n The int value to output as hex\r
+                * @param bigEndian Flag to output the int as big or little endian\r
+                * @return A string of length 8 corresponding to the \r
+                *              hex representation of n ( minus the leading "0x" )\r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                * @tiptext\r
+                */\r
+               public static function toHex( n:int, bigEndian:Boolean = false ):String {\r
+                       var s:String = "";\r
+                       \r
+                       if ( bigEndian ) {\r
+                               for ( var i:int = 0; i < 4; i++ ) {\r
+                                       s += hexChars.charAt( ( n >> ( ( 3 - i ) * 8 + 4 ) ) & 0xF ) \r
+                                               + hexChars.charAt( ( n >> ( ( 3 - i ) * 8 ) ) & 0xF );\r
+                               }\r
+                       } else {\r
+                               for ( var x:int = 0; x < 4; x++ ) {\r
+                                       s += hexChars.charAt( ( n >> ( x * 8 + 4 ) ) & 0xF )\r
+                                               + hexChars.charAt( ( n >> ( x * 8 ) ) & 0xF );\r
+                               }\r
+                       }\r
+                       \r
+                       return s;\r
+               }\r
+       }\r
+               \r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/NumberFormatter.as
new file mode 100644 (file)
index 0000000..6fe12e1
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.utils\r
+{\r
+\r
+       /**\r
+       *       Class that contains static utility methods for formatting Numbers\r
+       * \r
+       *       @langversion ActionScript 3.0\r
+       *       @playerversion Flash 9.0\r
+       *       @tiptext\r
+       *\r
+       *       @see #mx.formatters.NumberFormatter\r
+       */              \r
+       public class NumberFormatter\r
+       {\r
+       \r
+               /**\r
+               *       Formats a number to include a leading zero if it is a single digit\r
+               *       between -1 and 10.      \r
+               * \r
+               *       @param n The number that will be formatted\r
+               *\r
+               *       @return A string with single digits between -1 and 10 padded with a \r
+               *       leading zero.\r
+               *\r
+               *       @langversion ActionScript 3.0\r
+               *       @playerversion Flash 9.0\r
+               *       @tiptext\r
+               */              \r
+               public static function addLeadingZero(n:Number):String\r
+               {\r
+                       var out:String = String(n);\r
+                       \r
+                       if(n < 10 && n > -1)\r
+                       {\r
+                               out = "0" + out;\r
+                       }\r
+                       \r
+                       return out;\r
+               }       \r
+       \r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/StringUtil.as
new file mode 100644 (file)
index 0000000..6aa1979
--- /dev/null
@@ -0,0 +1,270 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  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 Adobe Systems Incorporated nor the names of its 
+    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.
+*/
+
+package com.adobe.utils
+{
+       
+       /**
+       *       Class that contains static utility methods for manipulating Strings.
+       * 
+       *       @langversion ActionScript 3.0
+       *       @playerversion Flash 9.0
+       *       @tiptext
+       */              
+       public class StringUtil
+       {
+
+               
+               /**
+               *       Does a case insensitive compare or two strings and returns true if
+               *       they are equal.
+               * 
+               *       @param s1 The first string to compare.
+               *
+               *       @param s2 The second string to compare.
+               *
+               *       @returns A boolean value indicating whether the strings' values are 
+               *       equal in a case sensitive compare.      
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */                      
+               public static function stringsAreEqual(s1:String, s2:String, 
+                                                                                       caseSensitive:Boolean):Boolean
+               {
+                       if(caseSensitive)
+                       {
+                               return (s1 == s2);
+                       }
+                       else
+                       {
+                               return (s1.toUpperCase() == s2.toUpperCase());
+                       }
+               }
+               
+               /**
+               *       Removes whitespace from the front and the end of the specified
+               *       string.
+               * 
+               *       @param input The String whose beginning and ending whitespace will
+               *       will be removed.
+               *
+               *       @returns A String with whitespace removed from the begining and end     
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */                      
+               public static function trim(input:String):String
+               {
+                       return StringUtil.ltrim(StringUtil.rtrim(input));
+               }
+
+               /**
+               *       Removes whitespace from the front of the specified string.
+               * 
+               *       @param input The String whose beginning whitespace will will be removed.
+               *
+               *       @returns A String with whitespace removed from the begining     
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function ltrim(input:String):String
+               {
+                       var size:Number = input.length;
+                       for(var i:Number = 0; i < size; i++)
+                       {
+                               if(input.charCodeAt(i) > 32)
+                               {
+                                       return input.substring(i);
+                               }
+                       }
+                       return "";
+               }
+
+               /**
+               *       Removes whitespace from the end of the specified string.
+               * 
+               *       @param input The String whose ending whitespace will will be removed.
+               *
+               *       @returns A String with whitespace removed from the end  
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function rtrim(input:String):String
+               {
+                       var size:Number = input.length;
+                       for(var i:Number = size; i > 0; i--)
+                       {
+                               if(input.charCodeAt(i - 1) > 32)
+                               {
+                                       return input.substring(0, i);
+                               }
+                       }
+
+                       return "";
+               }
+
+               /**
+               *       Determines whether the specified string begins with the spcified prefix.
+               * 
+               *       @param input The string that the prefix will be checked against.
+               *
+               *       @param prefix The prefix that will be tested against the string.
+               *
+               *       @returns True if the string starts with the prefix, false if it does not.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function beginsWith(input:String, prefix:String):Boolean
+               {                       
+                       return (prefix == input.substring(0, prefix.length));
+               }       
+
+               /**
+               *       Determines whether the specified string ends with the spcified suffix.
+               * 
+               *       @param input The string that the suffic will be checked against.
+               *
+               *       @param prefix The suffic that will be tested against the string.
+               *
+               *       @returns True if the string ends with the suffix, false if it does not.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function endsWith(input:String, suffix:String):Boolean
+               {
+                       return (suffix == input.substring(input.length - suffix.length));
+               }       
+
+               /**
+               *       Removes all instances of the remove string in the input string.
+               * 
+               *       @param input The string that will be checked for instances of remove
+               *       string
+               *
+               *       @param remove The string that will be removed from the input string.
+               *
+               *       @returns A String with the remove string removed.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */      
+               public static function remove(input:String, remove:String):String
+               {
+                       return StringUtil.replace(input, remove, "");
+               }
+
+               /**
+               *       Replaces all instances of the replace string in the input string
+               *       with the replaceWith string.
+               * 
+               *       @param input The string that instances of replace string will be 
+               *       replaces with removeWith string.
+               *
+               *       @param replace The string that will be replaced by instances of 
+               *       the replaceWith string.
+               *
+               *       @param replaceWith The string that will replace instances of replace
+               *       string.
+               *
+               *       @returns A new String with the replace string replaced with the 
+               *       replaceWith string.
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */
+               public static function replace(input:String, replace:String, replaceWith:String):String
+               {
+                       //change to StringBuilder
+                       var sb:String = new String();
+                       var found:Boolean = false;
+
+                       var sLen:Number = input.length;
+                       var rLen:Number = replace.length;
+
+                       for (var i:Number = 0; i < sLen; i++)
+                       {
+                               if(input.charAt(i) == replace.charAt(0))
+                               {   
+                                       found = true;
+                                       for(var j:Number = 0; j < rLen; j++)
+                                       {
+                                               if(!(input.charAt(i + j) == replace.charAt(j)))
+                                               {
+                                                       found = false;
+                                                       break;
+                                               }
+                                       }
+
+                                       if(found)
+                                       {
+                                               sb += replaceWith;
+                                               i = i + (rLen - 1);
+                                               continue;
+                                       }
+                               }
+                               sb += input.charAt(i);
+                       }
+                       //TODO : if the string is not found, should we return the original
+                       //string?
+                       return sb;
+               }
+               
+               /**
+               *       Specifies whether the specified string is either non-null, or contains
+               *       characters (i.e. length is greater that 0)
+               * 
+               *       @param s The string which is being checked for a value
+               *
+               *       @langversion ActionScript 3.0
+               *       @playerversion Flash 9.0
+               *       @tiptext
+               */              
+               public static function stringHasValue(s:String):Boolean
+               {
+                       //todo: this needs a unit test
+                       return (s != null && s.length > 0);                     
+               }
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as b/redakcja/static/filebrowser/uploadify/com/adobe/utils/XMLUtil.as
new file mode 100644 (file)
index 0000000..24fce00
--- /dev/null
@@ -0,0 +1,168 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.utils\r
+{\r
+\r
+       public class XMLUtil\r
+       {\r
+               /**\r
+                * Constant representing a text node type returned from XML.nodeKind.\r
+                * \r
+                * @see XML.nodeKind()\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */\r
+               public static const TEXT:String = "text";\r
+               \r
+               /**\r
+                * Constant representing a comment node type returned from XML.nodeKind.\r
+                * \r
+                * @see XML.nodeKind()\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */             \r
+               public static const COMMENT:String = "comment";\r
+               \r
+               /**\r
+                * Constant representing a processing instruction type returned from XML.nodeKind.\r
+                * \r
+                * @see XML.nodeKind()\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */             \r
+               public static const PROCESSING_INSTRUCTION:String = "processing-instruction";\r
+               \r
+               /**\r
+                * Constant representing an attribute type returned from XML.nodeKind.\r
+                * \r
+                * @see XML.nodeKind()\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */             \r
+               public static const ATTRIBUTE:String = "attribute";\r
+               \r
+               /**\r
+                * Constant representing a element type returned from XML.nodeKind.\r
+                * \r
+                * @see XML.nodeKind()\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */             \r
+               public static const ELEMENT:String = "element";\r
+               \r
+               /**\r
+                * Checks whether the specified string is valid and well formed XML.\r
+                * \r
+                * @param data The string that is being checked to see if it is valid XML.\r
+                * \r
+                * @return A Boolean value indicating whether the specified string is\r
+                * valid XML.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */\r
+               public static function isValidXML(data:String):Boolean\r
+               {\r
+                       var xml:XML;\r
+                       \r
+                       try\r
+                       {\r
+                               xml = new XML(data);\r
+                       }\r
+                       catch(e:Error)\r
+                       {\r
+                               return false;\r
+                       }\r
+                       \r
+                       if(xml.nodeKind() != XMLUtil.ELEMENT)\r
+                       {\r
+                               return false;\r
+                       }\r
+                       \r
+                       return true;\r
+               }\r
+               \r
+               /**\r
+                * Returns the next sibling of the specified node relative to the node's parent.\r
+                * \r
+                * @param x The node whose next sibling will be returned.\r
+                * \r
+                * @return The next sibling of the node. null if the node does not have \r
+                * a sibling after it, or if the node has no parent.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */             \r
+               public static function getNextSibling(x:XML):XML\r
+               {       \r
+                       return XMLUtil.getSiblingByIndex(x, 1);\r
+               }\r
+               \r
+               /**\r
+                * Returns the sibling before the specified node relative to the node's parent.\r
+                * \r
+                * @param x The node whose sibling before it will be returned.\r
+                * \r
+                * @return The sibling before the node. null if the node does not have \r
+                * a sibling before it, or if the node has no parent.\r
+                * \r
+                * @langversion ActionScript 3.0\r
+                * @playerversion Flash 9.0\r
+                */                     \r
+               public static function getPreviousSibling(x:XML):XML\r
+               {       \r
+                       return XMLUtil.getSiblingByIndex(x, -1);\r
+               }               \r
+               \r
+               protected static function getSiblingByIndex(x:XML, count:int):XML       \r
+               {\r
+                       var out:XML;\r
+                       \r
+                       try\r
+                       {\r
+                               out = x.parent().children()[x.childIndex() + count];    \r
+                       }               \r
+                       catch(e:Error)\r
+                       {\r
+                               return null;\r
+                       }\r
+                       \r
+                       return out;                     \r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as b/redakcja/static/filebrowser/uploadify/com/adobe/webapis/ServiceBase.as
new file mode 100644 (file)
index 0000000..7080287
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+\r
+package com.adobe.webapis \r
+{\r
+       import flash.events.EventDispatcher;\r
+\r
+       /**\r
+       * Base class for remote service classes.\r
+       */\r
+       public class ServiceBase extends EventDispatcher\r
+       {\r
+               public function ServiceBase()\r
+               {\r
+               }\r
+               \r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as b/redakcja/static/filebrowser/uploadify/com/adobe/webapis/URLLoaderBase.as
new file mode 100644 (file)
index 0000000..fc0085c
--- /dev/null
@@ -0,0 +1,108 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+package com.adobe.webapis\r
+{\r
+       import flash.events.IOErrorEvent;\r
+       import flash.events.SecurityErrorEvent;\r
+       import flash.events.ProgressEvent;\r
+       \r
+       import com.adobe.net.DynamicURLLoader;\r
+       \r
+               /**\r
+               *       Dispatched when data is \r
+               *       received as the download operation progresses.\r
+               *        \r
+               *       @eventType flash.events.ProgressEvent.PROGRESS\r
+               * \r
+               * @langversion ActionScript 3.0\r
+               * @playerversion Flash 9.0\r
+               */\r
+               [Event(name="progress", type="flash.events.ProgressEvent")]             \r
+       \r
+               /**\r
+               *       Dispatched if a call to the server results in a fatal \r
+               *       error that terminates the download.\r
+               * \r
+               *       @eventType flash.events.IOErrorEvent.IO_ERROR\r
+               * \r
+               * @langversion ActionScript 3.0\r
+               * @playerversion Flash 9.0\r
+               */\r
+               [Event(name="ioError", type="flash.events.IOErrorEvent")]               \r
+               \r
+               /**\r
+               *       A securityError event occurs if a call attempts to\r
+               *       load data from a server outside the security sandbox.\r
+               * \r
+               *       @eventType flash.events.SecurityErrorEvent.SECURITY_ERROR\r
+               * \r
+               * @langversion ActionScript 3.0\r
+               * @playerversion Flash 9.0\r
+               */\r
+               [Event(name="securityError", type="flash.events.SecurityErrorEvent")]   \r
+       \r
+       /**\r
+       *       Base class for services that utilize URLLoader\r
+       *       to communicate with remote APIs / Services.\r
+       * \r
+       * @langversion ActionScript 3.0\r
+       * @playerversion Flash 9.0\r
+       */\r
+       public class URLLoaderBase extends ServiceBase\r
+       {       \r
+               protected function getURLLoader():DynamicURLLoader\r
+               {\r
+                       var loader:DynamicURLLoader = new DynamicURLLoader();\r
+                               loader.addEventListener("progress", onProgress);\r
+                               loader.addEventListener("ioError", onIOError);\r
+                               loader.addEventListener("securityError", onSecurityError);\r
+                       \r
+                       return loader;                  \r
+               }               \r
+               \r
+               private function onIOError(event:IOErrorEvent):void\r
+               {\r
+                       dispatchEvent(event);\r
+               }                       \r
+               \r
+               private function onSecurityError(event:SecurityErrorEvent):void\r
+               {\r
+                       dispatchEvent(event);\r
+               }       \r
+               \r
+               private function onProgress(event:ProgressEvent):void\r
+               {\r
+                       dispatchEvent(event);\r
+               }       \r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as b/redakcja/static/filebrowser/uploadify/com/adobe/webapis/events/ServiceEvent.as
new file mode 100644 (file)
index 0000000..d1aaf3d
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+  Copyright (c) 2008, Adobe Systems Incorporated\r
+  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\r
+  met:\r
+\r
+  * Redistributions of source code must retain the above copyright notice, \r
+    this list of conditions and the following disclaimer.\r
+  \r
+  * Redistributions in binary form must reproduce the above copyright\r
+    notice, this list of conditions and the following disclaimer in the \r
+    documentation and/or other materials provided with the distribution.\r
+  \r
+  * Neither the name of Adobe Systems Incorporated nor the names of its \r
+    contributors may be used to endorse or promote products derived from \r
+    this software without specific prior written permission.\r
+\r
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+*/\r
+\r
+\r
+package com.adobe.webapis.events\r
+{\r
+\r
+       import flash.events.Event;\r
+\r
+       /**\r
+       * Event class that contains data loaded from remote services.\r
+       *\r
+       * @author Mike Chambers\r
+       */\r
+       public class ServiceEvent extends Event\r
+       {\r
+               private var _data:Object = new Object();;\r
+\r
+               /**\r
+               * Constructor for ServiceEvent class.\r
+               *\r
+               * @param type The type of event that the instance represents.\r
+               */\r
+               public function ServiceEvent(type:String, bubbles:Boolean = false, \r
+                                                                                                               cancelable:Boolean=false)\r
+               {\r
+                       super(type, bubbles, cancelable);\r
+               }\r
+\r
+               /**\r
+               *       This object contains data loaded in response\r
+               *       to remote service calls, and properties associated with that call.\r
+               */\r
+               public function get data():Object\r
+               {\r
+                       return _data;\r
+               }\r
+\r
+               public function set data(d:Object):void\r
+               {\r
+                       _data = d;\r
+               }\r
+               \r
+\r
+       }\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/_notes/dwsync.xml b/redakcja/static/filebrowser/uploadify/example/_notes/dwsync.xml
new file mode 100644 (file)
index 0000000..36ecaa5
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<dwsync>\r
+<file name="index.php" server="ftp.uploadify.com/www.uploadify.com/" local="128911652226450000" remote="128911651800000000" />\r
+<file name="cancel.png" server="ftp.uploadify.com/www.uploadify.com/" local="128794107540000000" remote="128911638000000000" />\r
+</dwsync>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/cancel.png b/redakcja/static/filebrowser/uploadify/example/cancel.png
new file mode 100644 (file)
index 0000000..1c062ae
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/example/cancel.png differ
diff --git a/redakcja/static/filebrowser/uploadify/example/css/_notes/dwsync.xml b/redakcja/static/filebrowser/uploadify/example/css/_notes/dwsync.xml
new file mode 100644 (file)
index 0000000..049ffa5
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<dwsync>\r
+<file name="default.css" server="ftp.uploadify.com/www.uploadify.com/" local="128911634053800000" remote="128911633800000000" />\r
+<file name="uploadify.css" server="ftp.uploadify.com/www.uploadify.com/" local="128911650121540000" remote="128911650000000000" />\r
+</dwsync>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/css/default.css b/redakcja/static/filebrowser/uploadify/example/css/default.css
new file mode 100644 (file)
index 0000000..ec5902d
--- /dev/null
@@ -0,0 +1,10 @@
+body {\r
+       font: 12px/16px Arial, Helvetica, sans-serif;\r
+}\r
+#fileQueue {\r
+       width: 400px;\r
+       height: 300px;\r
+       overflow: auto;\r
+       border: 1px solid #E5E5E5;\r
+       margin-bottom: 10px;\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/css/uploadify.css b/redakcja/static/filebrowser/uploadify/example/css/uploadify.css
new file mode 100644 (file)
index 0000000..0cf8c0e
--- /dev/null
@@ -0,0 +1,53 @@
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+.uploadifyQueueItem {\r
+       font: 11px Verdana, Geneva, sans-serif;\r
+       border: 2px solid #E5E5E5;\r
+       background-color: #F5F5F5;\r
+       margin-top: 5px;\r
+       padding: 10px;\r
+       width: 350px;\r
+}\r
+.uploadifyError {\r
+       border: 2px solid #FBCBBC !important;\r
+       background-color: #FDE5DD !important;\r
+}\r
+.uploadifyQueueItem .cancel {\r
+       float: right;\r
+}\r
+.uploadifyProgress {\r
+       background-color: #FFFFFF;\r
+       border-top: 1px solid #808080;\r
+       border-left: 1px solid #808080;\r
+       border-right: 1px solid #C5C5C5;\r
+       border-bottom: 1px solid #C5C5C5;\r
+       margin-top: 10px;\r
+       width: 100%;\r
+}\r
+.uploadifyProgressBar {\r
+       background-color: #0099FF;\r
+       width: 1px;\r
+       height: 3px;\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/index.php b/redakcja/static/filebrowser/uploadify/example/index.php
new file mode 100644 (file)
index 0000000..769d11c
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<title>Uploadify Example Script</title>\r
+<link href="/example/css/default.css" rel="stylesheet" type="text/css" />\r
+<link href="/example/css/uploadify.css" rel="stylesheet" type="text/css" />\r
+<script type="text/javascript" src="/example/scripts/jquery-1.3.2.min.js"></script>\r
+<script type="text/javascript" src="/example/scripts/swfobject.js"></script>\r
+<script type="text/javascript" src="/example/scripts/jquery.uploadify.v2.1.0.min.js"></script>\r
+<script type="text/javascript">\r
+$(document).ready(function() {\r
+       $("#uploadify").uploadify({\r
+               'uploader'       : 'scripts/uploadify.swf',\r
+               'script'         : 'scripts/uploadify.php',\r
+               'cancelImg'      : 'cancel.png',\r
+               'folder'         : 'uploads',\r
+               'queueID'        : 'fileQueue',\r
+               'auto'           : true,\r
+               'multi'          : true\r
+       });\r
+});\r
+</script>\r
+</head>\r
+\r
+<body>\r
+<div id="fileQueue"></div>\r
+<input type="file" name="uploadify" id="uploadify" />\r
+<p><a href="javascript:jQuery('#uploadify').uploadifyClearQueue()">Cancel All Uploads</a></p>\r
+</body>\r
+</html>\r
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml b/redakcja/static/filebrowser/uploadify/example/scripts/_notes/dwsync.xml
new file mode 100644 (file)
index 0000000..13ca043
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<dwsync>\r
+<file name="check.php" server="ftp.uploadify.com/www.uploadify.com/" local="128870002502195719" remote="128911633200000000" />\r
+<file name="expressInstall.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128886114740000000" remote="128911633200000000" />\r
+<file name="jquery-1.3.2.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128799223180000000" remote="128911633200000000" />\r
+<file name="jquery.uploadify.v2.0.0.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128911646622270000" remote="128911646400000000" />\r
+<file name="uploadify.php" server="ftp.uploadify.com/www.uploadify.com/" local="128907148701750000" remote="128911633200000000" />\r
+<file name="uploadify.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128911508403330000" remote="128911633200000000" />\r
+<file name="swfobject.js" server="ftp.uploadify.com/www.uploadify.com/" local="128892320400000000" remote="128911637400000000" />\r
+</dwsync>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/check.php b/redakcja/static/filebrowser/uploadify/example/scripts/check.php
new file mode 100644 (file)
index 0000000..d7dc571
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+$fileArray = array();\r
+foreach ($_POST as $key => $value) {\r
+       if ($key != 'folder') {\r
+               if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) {\r
+                       $fileArray[$key] = $value;\r
+               }\r
+       }\r
+}\r
+echo json_encode($fileArray);\r
+?>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/expressInstall.swf b/redakcja/static/filebrowser/uploadify/example/scripts/expressInstall.swf
new file mode 100644 (file)
index 0000000..0fbf8fc
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/example/scripts/expressInstall.swf differ
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js b/redakcja/static/filebrowser/uploadify/example/scripts/jquery-1.3.2.min.js
new file mode 100644 (file)
index 0000000..b1ae21d
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js b/redakcja/static/filebrowser/uploadify/example/scripts/jquery.uploadify.v2.1.0.min.js
new file mode 100644 (file)
index 0000000..4305311
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+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.
+*/
+
+if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('<div id="'+a(this).attr("id")+'Uploader"></div>');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('<div id="'+a(this).attr("id")+'Queue" class="uploadifyQueue"></div>')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('<div id="'+a(this).attr("id")+h+'" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#'+a(this).attr("id")+"').uploadifyCancel('"+h+'\')"><img src="'+settings.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+k+l+')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="'+a(this).attr("id")+h+'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full.  The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d<b.length;d++){var h=b[d].split("=");e[h[0]]=h[1]}g=e}return g}},uploadifyUpload:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").startFileUpload(b,false)})},uploadifyCancel:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").cancelFileUpload(b,true,false)})},uploadifyClearQueue:function(){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").clearFileUploadQueue(false)})}})})(jQuery)};
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/swfobject.js b/redakcja/static/filebrowser/uploadify/example/scripts/swfobject.js
new file mode 100644 (file)
index 0000000..acc7da4
--- /dev/null
@@ -0,0 +1,4 @@
+/*     SWFObject v2.2 <http://code.google.com/p/swfobject/>
+       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/uploadify.php b/redakcja/static/filebrowser/uploadify/example/scripts/uploadify.php
new file mode 100644 (file)
index 0000000..8bf14a6
--- /dev/null
@@ -0,0 +1,46 @@
+<?php\r
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+if (!empty($_FILES)) {\r
+       $tempFile = $_FILES['Filedata']['tmp_name'];\r
+       $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';\r
+       $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];\r
+       \r
+       // $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);\r
+       // $fileTypes  = str_replace(';','|',$fileTypes);\r
+       // $typesArray = split('\|',$fileTypes);\r
+       // $fileParts  = pathinfo($_FILES['Filedata']['name']);\r
+       \r
+       // if (in_array($fileParts['extension'],$typesArray)) {\r
+               // Uncomment the following line if you want to make the directory if it doesn't exist\r
+               // mkdir(str_replace('//','/',$targetPath), 0755, true);\r
+               \r
+               move_uploaded_file($tempFile,$targetFile);\r
+               echo "1";\r
+       // } else {\r
+       //      echo 'Invalid file type.';\r
+       // }\r
+}\r
+?>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/example/scripts/uploadify.swf b/redakcja/static/filebrowser/uploadify/example/scripts/uploadify.swf
new file mode 100644 (file)
index 0000000..4d27952
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/example/scripts/uploadify.swf differ
diff --git a/redakcja/static/filebrowser/uploadify/expressInstall.swf b/redakcja/static/filebrowser/uploadify/expressInstall.swf
new file mode 100644 (file)
index 0000000..0fbf8fc
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/expressInstall.swf differ
diff --git a/redakcja/static/filebrowser/uploadify/jquery-1.3.2.min.js b/redakcja/static/filebrowser/uploadify/jquery-1.3.2.min.js
new file mode 100644 (file)
index 0000000..b1ae21d
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js b/redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.js
new file mode 100644 (file)
index 0000000..43c87be
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+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.
+*/
+
+if(jQuery)(
+       function(jQuery){
+               jQuery.extend(jQuery.fn,{
+                       uploadify:function(options) {
+                               jQuery(this).each(function(){
+                                       settings = jQuery.extend({
+                                       id             : jQuery(this).attr('id'), // The ID of the object being Uploadified
+                                       uploader       : 'uploadify.swf', // The path to the uploadify swf file
+                                       script         : 'uploadify.php', // The path to the uploadify backend upload script
+                                       expressInstall : null, // The path to the express install swf file
+                                       folder         : '', // The path to the upload folder
+                                       height         : 30, // The height of the flash button
+                                       width          : 110, // The width of the flash button
+                                       cancelImg      : 'cancel.png', // The path to the cancel image for the default file queue item container
+                                       wmode          : 'opaque', // The wmode of the flash file
+                                       scriptAccess   : 'sameDomain', // Set to "always" to allow script access across domains
+                                       fileDataName   : 'Filedata', // The name of the file collection object in the backend upload script
+                                       method         : 'POST', // The method for sending variables to the backend upload script
+                                       queueSizeLimit : 999, // The maximum size of the file queue
+                                       simUploadLimit : 1, // The number of simultaneous uploads allowed
+                                       queueID        : false, // The optional ID of the queue container
+                                       displayData    : 'percentage', // Set to "speed" to show the upload speed in the default queue item
+                                       onInit         : function() {}, // Function to run when uploadify is initialized
+                                       onSelect       : function() {}, // Function to run when a file is selected
+                                       onQueueFull    : function() {}, // Function to run when the queue reaches capacity
+                                       onCheck        : function() {}, // Function to run when script checks for duplicate files on the server
+                                       onCancel       : function() {}, // Function to run when an item is cleared from the queue
+                                       onError        : function() {}, // Function to run when an upload item returns an error
+                                       onProgress     : function() {}, // Function to run each time the upload progress is updated
+                                       onComplete     : function() {}, // Function to run when an upload is completed
+                                       onAllComplete  : function() {}  // Functino to run when all uploads are completed
+                               }, options);
+                               var pagePath = location.pathname;
+                               pagePath = pagePath.split('/');
+                               pagePath.pop();
+                               pagePath = pagePath.join('/') + '/';
+                               var data = {};
+                               data.uploadifyID = settings.id;
+                               data.pagepath = pagePath;
+                               if (settings.buttonImg) data.buttonImg = escape(settings.buttonImg);
+                               if (settings.buttonText) data.buttonText = escape(settings.buttonText);
+                               if (settings.rollover) data.rollover = true;
+                               data.script = settings.script;
+                               data.folder = escape(settings.folder);
+                               if (settings.scriptData) {
+                                       var scriptDataString = '';
+                                       for (var name in settings.scriptData) {
+                                               scriptDataString += '&' + name + '=' + settings.scriptData[name];
+                                       }
+                                       data.scriptData = escape(scriptDataString.substr(1));
+                               }
+                               data.width          = settings.width;
+                               data.height         = settings.height;
+                               data.wmode          = settings.wmode;
+                               data.method         = settings.method;
+                               data.queueSizeLimit = settings.queueSizeLimit;
+                               data.simUploadLimit = settings.simUploadLimit;
+                               if (settings.hideButton)   data.hideButton   = true;
+                               if (settings.fileDesc)     data.fileDesc     = settings.fileDesc;
+                               if (settings.fileExt)      data.fileExt      = settings.fileExt;
+                               if (settings.multi)        data.multi        = true;
+                               if (settings.auto)         data.auto         = true;
+                               if (settings.sizeLimit)    data.sizeLimit    = settings.sizeLimit;
+                               if (settings.checkScript)  data.checkScript  = settings.checkScript;
+                               if (settings.fileDataName) data.fileDataName = settings.fileDataName;
+                               if (settings.queueID)      data.queueID      = settings.queueID;
+                               if (settings.onInit() !== false) {
+                                       jQuery(this).css('display','none');
+                                       jQuery(this).after('<div id="' + jQuery(this).attr('id') + 'Uploader"></div>');
+                                       swfobject.embedSWF(settings.uploader, settings.id + 'Uploader', settings.width, settings.height, '9.0.24', settings.expressInstall, data, {'quality':'high','wmode':settings.wmode,'allowScriptAccess':settings.scriptAccess});
+                                       if (settings.queueID == false) {
+                                               jQuery("#" + jQuery(this).attr('id') + "Uploader").after('<div id="' + jQuery(this).attr('id') + 'Queue" class="uploadifyQueue"></div>');
+                                       }
+                               }
+                               if (typeof(settings.onOpen) == 'function') {
+                                       jQuery(this).bind("uploadifyOpen", settings.onOpen);
+                               }
+                               jQuery(this).bind("uploadifySelect", {'action': settings.onSelect, 'queueID': settings.queueID}, function(event, ID, fileObj) {
+                                       if (event.data.action(event, ID, fileObj) !== false) {
+                                               var byteSize = Math.round(fileObj.size / 1024 * 100) * .01;
+                                               var suffix = 'KB';
+                                               if (byteSize > 1000) {
+                                                       byteSize = Math.round(byteSize *.001 * 100) * .01;
+                                                       suffix = 'MB';
+                                               }
+                                               var sizeParts = byteSize.toString().split('.');
+                                               if (sizeParts.length > 1) {
+                                                       byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2);
+                                               } else {
+                                                       byteSize = sizeParts[0];
+                                               }
+                                               if (fileObj.name.length > 20) {
+                                                       fileName = fileObj.name.substr(0,20) + '...';
+                                               } else {
+                                                       fileName = fileObj.name;
+                                               }
+                                               queue = '#' + jQuery(this).attr('id') + 'Queue';
+                                               if (event.data.queueID) {
+                                                       queue = '#' + event.data.queueID;
+                                               }
+                                               jQuery(queue).append('<div id="' + jQuery(this).attr('id') + ID + '" class="uploadifyQueueItem">\
+                                                               <div class="cancel">\
+                                                                       <a href="javascript:jQuery(\'#' + jQuery(this).attr('id') + '\').uploadifyCancel(\'' + ID + '\')"><img src="' + settings.cancelImg + '" border="0" /></a>\
+                                                               </div>\
+                                                               <span class="fileName">' + fileName + ' (' + byteSize + suffix + ')</span><span class="percentage"></span>\
+                                                               <div class="uploadifyProgress">\
+                                                                       <div id="' + jQuery(this).attr('id') + ID + 'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div>\
+                                                               </div>\
+                                                       </div>');
+                                       }
+                               });
+                               if (typeof(settings.onSelectOnce) == 'function') {
+                                       jQuery(this).bind("uploadifySelectOnce", settings.onSelectOnce);
+                               }
+                               jQuery(this).bind("uploadifyQueueFull", {'action': settings.onQueueFull}, function(event, queueSizeLimit) {
+                                       if (event.data.action(event, queueSizeLimit) !== false) {
+                                               alert('The queue is full.  The max size is ' + queueSizeLimit + '.');
+                                       }
+                               });
+                               jQuery(this).bind("uploadifyCheckExist", {'action': settings.onCheck}, function(event, checkScript, fileQueueObj, folder, single) {
+                                       var postData = new Object();
+                                       postData = fileQueueObj;
+                                       postData.folder = pagePath + folder;
+                                       if (single) {
+                                               for (var ID in fileQueueObj) {
+                                                       var singleFileID = ID;
+                                               }
+                                       }
+                                       jQuery.post(checkScript, postData, function(data) {
+                                               for(var key in data) {
+                                                       if (event.data.action(event, checkScript, fileQueueObj, folder, single) !== false) {
+                                                               var replaceFile = confirm("Do you want to replace the file " + data[key] + "?");
+                                                               if (!replaceFile) {
+                                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').cancelFileUpload(key, true,true);
+                                                               }
+                                                       }
+                                               }
+                                               if (single) {
+                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(singleFileID, true);
+                                               } else {
+                                                       document.getElementById(jQuery(event.target).attr('id') + 'Uploader').startFileUpload(null, true);
+                                               }
+                                       }, "json");
+                               });
+                               jQuery(this).bind("uploadifyCancel", {'action': settings.onCancel}, function(event, ID, fileObj, data, clearFast) {
+                                       if (event.data.action(event, ID, fileObj, data, clearFast) !== false) {
+                                               var fadeSpeed = (clearFast == true) ? 0 : 250;
+                                               jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(fadeSpeed, function() { jQuery(this).remove() });
+                                       }
+                               });
+                               if (typeof(settings.onClearQueue) == 'function') {
+                                       jQuery(this).bind("uploadifyClearQueue", settings.onClearQueue);
+                               }
+                               var errorArray = [];
+                               jQuery(this).bind("uploadifyError", {'action': settings.onError}, function(event, ID, fileObj, errorObj) {
+                                       if (event.data.action(event, ID, fileObj, errorObj) !== false) {
+                                               var fileArray = new Array(ID, fileObj, errorObj);
+                                               errorArray.push(fileArray);
+                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(" - " + errorObj.type + " Error");
+                                               jQuery("#" + jQuery(this).attr('id') + ID).addClass('uploadifyError');
+                                       }
+                               });
+                               jQuery(this).bind("uploadifyProgress", {'action': settings.onProgress, 'toDisplay': settings.displayData}, function(event, ID, fileObj, data) {
+                                       if (event.data.action(event, ID, fileObj, data) !== false) {
+                                               jQuery("#" + jQuery(this).attr('id') + ID + "ProgressBar").css('width', data.percentage + '%');
+                                               if (event.data.toDisplay == 'percentage') displayData = ' - ' + data.percentage + '%';
+                                               if (event.data.toDisplay == 'speed') displayData = ' - ' + data.speed + 'KB/s';
+                                               if (event.data.toDisplay == null) displayData = ' ';
+                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(displayData);
+                                       }
+                               });
+                               jQuery(this).bind("uploadifyComplete", {'action': settings.onComplete}, function(event, ID, fileObj, response, data) {
+                                       if (event.data.action(event, ID, fileObj, unescape(response), data) !== false) {
+                                               jQuery("#" + jQuery(this).attr('id') + ID + " .percentage").text(' - Completed');
+                                               jQuery("#" + jQuery(this).attr('id') + ID).fadeOut(250, function() { jQuery(this).remove()});
+                                       }
+                               });
+                               if (typeof(settings.onAllComplete) == 'function') {
+                                       jQuery(this).bind("uploadifyAllComplete", {'action': settings.onAllComplete}, function(event, uploadObj) {
+                                               if (event.data.action(event, uploadObj) !== false) {
+                                                       errorArray = [];
+                                               }
+                                       });
+                               }
+                       });
+               },
+               uploadifySettings:function(settingName, settingValue, resetObject) {
+                       var returnValue = false;
+                       jQuery(this).each(function() {
+                               if (settingName == 'scriptData' && settingValue != null) {
+                                       if (resetObject) {
+                                               var scriptData = settingValue;
+                                       } else {
+                                               var scriptData = jQuery.extend(settings.scriptData, settingValue);
+                                       }
+                                       var scriptDataString = '';
+                                       for (var name in scriptData) {
+                                               scriptDataString += '&' + name + '=' + escape(scriptData[name]);
+                                       }
+                                       settingValue = scriptDataString.substr(1);
+                               }
+                               returnValue = document.getElementById(jQuery(this).attr('id') + 'Uploader').updateSettings(settingName, settingValue);
+                       });
+                       if (settingValue == null) {
+                               if (settingName == 'scriptData') {
+                                       var returnSplit = unescape(returnValue).split('&');
+                                       var returnObj   = new Object();
+                                       for (var i = 0; i < returnSplit.length; i++) {
+                                               var iSplit = returnSplit[i].split('=');
+                                               returnObj[iSplit[0]] = iSplit[1];
+                                       }
+                                       returnValue = returnObj;
+                               }
+                               return returnValue;
+                       }
+               },
+               uploadifyUpload:function(ID) {
+                       jQuery(this).each(function() {
+                               document.getElementById(jQuery(this).attr('id') + 'Uploader').startFileUpload(ID, false);
+                       });
+               },
+               uploadifyCancel:function(ID) {
+                       jQuery(this).each(function() {
+                               document.getElementById(jQuery(this).attr('id') + 'Uploader').cancelFileUpload(ID, true, false);
+                       });
+               },
+               uploadifyClearQueue:function() {
+                       jQuery(this).each(function() {
+                               document.getElementById(jQuery(this).attr('id') + 'Uploader').clearFileUploadQueue(false);
+                       });
+               }
+       })
+})(jQuery);
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js b/redakcja/static/filebrowser/uploadify/jquery.uploadify.v2.1.0.min.js
new file mode 100644 (file)
index 0000000..4305311
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+Uploadify v2.1.0
+Release Date: August 24, 2009
+
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels
+
+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.
+*/
+
+if(jQuery){(function(a){a.extend(a.fn,{uploadify:function(b){a(this).each(function(){settings=a.extend({id:a(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:110,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},b);var e=location.pathname;e=e.split("/");e.pop();e=e.join("/")+"/";var f={};f.uploadifyID=settings.id;f.pagepath=e;if(settings.buttonImg){f.buttonImg=escape(settings.buttonImg)}if(settings.buttonText){f.buttonText=escape(settings.buttonText)}if(settings.rollover){f.rollover=true}f.script=settings.script;f.folder=escape(settings.folder);if(settings.scriptData){var g="";for(var d in settings.scriptData){g+="&"+d+"="+settings.scriptData[d]}f.scriptData=escape(g.substr(1))}f.width=settings.width;f.height=settings.height;f.wmode=settings.wmode;f.method=settings.method;f.queueSizeLimit=settings.queueSizeLimit;f.simUploadLimit=settings.simUploadLimit;if(settings.hideButton){f.hideButton=true}if(settings.fileDesc){f.fileDesc=settings.fileDesc}if(settings.fileExt){f.fileExt=settings.fileExt}if(settings.multi){f.multi=true}if(settings.auto){f.auto=true}if(settings.sizeLimit){f.sizeLimit=settings.sizeLimit}if(settings.checkScript){f.checkScript=settings.checkScript}if(settings.fileDataName){f.fileDataName=settings.fileDataName}if(settings.queueID){f.queueID=settings.queueID}if(settings.onInit()!==false){a(this).css("display","none");a(this).after('<div id="'+a(this).attr("id")+'Uploader"></div>');swfobject.embedSWF(settings.uploader,settings.id+"Uploader",settings.width,settings.height,"9.0.24",settings.expressInstall,f,{quality:"high",wmode:settings.wmode,allowScriptAccess:settings.scriptAccess});if(settings.queueID==false){a("#"+a(this).attr("id")+"Uploader").after('<div id="'+a(this).attr("id")+'Queue" class="uploadifyQueue"></div>')}}if(typeof(settings.onOpen)=="function"){a(this).bind("uploadifyOpen",settings.onOpen)}a(this).bind("uploadifySelect",{action:settings.onSelect,queueID:settings.queueID},function(j,h,i){if(j.data.action(j,h,i)!==false){var k=Math.round(i.size/1024*100)*0.01;var l="KB";if(k>1000){k=Math.round(k*0.001*100)*0.01;l="MB"}var m=k.toString().split(".");if(m.length>1){k=m[0]+"."+m[1].substr(0,2)}else{k=m[0]}if(i.name.length>20){fileName=i.name.substr(0,20)+"..."}else{fileName=i.name}queue="#"+a(this).attr("id")+"Queue";if(j.data.queueID){queue="#"+j.data.queueID}a(queue).append('<div id="'+a(this).attr("id")+h+'" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#'+a(this).attr("id")+"').uploadifyCancel('"+h+'\')"><img src="'+settings.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+k+l+')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="'+a(this).attr("id")+h+'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>')}});if(typeof(settings.onSelectOnce)=="function"){a(this).bind("uploadifySelectOnce",settings.onSelectOnce)}a(this).bind("uploadifyQueueFull",{action:settings.onQueueFull},function(h,i){if(h.data.action(h,i)!==false){alert("The queue is full.  The max size is "+i+".")}});a(this).bind("uploadifyCheckExist",{action:settings.onCheck},function(m,l,k,j,o){var i=new Object();i=k;i.folder=e+j;if(o){for(var h in k){var n=h}}a.post(l,i,function(r){for(var p in r){if(m.data.action(m,l,k,j,o)!==false){var q=confirm("Do you want to replace the file "+r[p]+"?");if(!q){document.getElementById(a(m.target).attr("id")+"Uploader").cancelFileUpload(p,true,true)}}}if(o){document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(n,true)}else{document.getElementById(a(m.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});a(this).bind("uploadifyCancel",{action:settings.onCancel},function(l,h,k,m,j){if(l.data.action(l,h,k,m,j)!==false){var i=(j==true)?0:250;a("#"+a(this).attr("id")+h).fadeOut(i,function(){a(this).remove()})}});if(typeof(settings.onClearQueue)=="function"){a(this).bind("uploadifyClearQueue",settings.onClearQueue)}var c=[];a(this).bind("uploadifyError",{action:settings.onError},function(l,h,k,j){if(l.data.action(l,h,k,j)!==false){var i=new Array(h,k,j);c.push(i);a("#"+a(this).attr("id")+h+" .percentage").text(" - "+j.type+" Error");a("#"+a(this).attr("id")+h).addClass("uploadifyError")}});a(this).bind("uploadifyProgress",{action:settings.onProgress,toDisplay:settings.displayData},function(j,h,i,k){if(j.data.action(j,h,i,k)!==false){a("#"+a(this).attr("id")+h+"ProgressBar").css("width",k.percentage+"%");if(j.data.toDisplay=="percentage"){displayData=" - "+k.percentage+"%"}if(j.data.toDisplay=="speed"){displayData=" - "+k.speed+"KB/s"}if(j.data.toDisplay==null){displayData=" "}a("#"+a(this).attr("id")+h+" .percentage").text(displayData)}});a(this).bind("uploadifyComplete",{action:settings.onComplete},function(k,h,j,i,l){if(k.data.action(k,h,j,unescape(i),l)!==false){a("#"+a(this).attr("id")+h+" .percentage").text(" - Completed");a("#"+a(this).attr("id")+h).fadeOut(250,function(){a(this).remove()})}});if(typeof(settings.onAllComplete)=="function"){a(this).bind("uploadifyAllComplete",{action:settings.onAllComplete},function(h,i){if(h.data.action(h,i)!==false){c=[]}})}})},uploadifySettings:function(f,j,c){var g=false;a(this).each(function(){if(f=="scriptData"&&j!=null){if(c){var i=j}else{var i=a.extend(settings.scriptData,j)}var l="";for(var k in i){l+="&"+k+"="+escape(i[k])}j=l.substr(1)}g=document.getElementById(a(this).attr("id")+"Uploader").updateSettings(f,j)});if(j==null){if(f=="scriptData"){var b=unescape(g).split("&");var e=new Object();for(var d=0;d<b.length;d++){var h=b[d].split("=");e[h[0]]=h[1]}g=e}return g}},uploadifyUpload:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").startFileUpload(b,false)})},uploadifyCancel:function(b){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").cancelFileUpload(b,true,false)})},uploadifyClearQueue:function(){a(this).each(function(){document.getElementById(a(this).attr("id")+"Uploader").clearFileUploadQueue(false)})}})})(jQuery)};
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/swfobject.js b/redakcja/static/filebrowser/uploadify/swfobject.js
new file mode 100644 (file)
index 0000000..acc7da4
--- /dev/null
@@ -0,0 +1,4 @@
+/*     SWFObject v2.2 <http://code.google.com/p/swfobject/>
+       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/uploadify.allglyphs.swf b/redakcja/static/filebrowser/uploadify/uploadify.allglyphs.swf
new file mode 100644 (file)
index 0000000..4bad011
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/uploadify.allglyphs.swf differ
diff --git a/redakcja/static/filebrowser/uploadify/uploadify.css b/redakcja/static/filebrowser/uploadify/uploadify.css
new file mode 100644 (file)
index 0000000..0cf8c0e
--- /dev/null
@@ -0,0 +1,53 @@
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+.uploadifyQueueItem {\r
+       font: 11px Verdana, Geneva, sans-serif;\r
+       border: 2px solid #E5E5E5;\r
+       background-color: #F5F5F5;\r
+       margin-top: 5px;\r
+       padding: 10px;\r
+       width: 350px;\r
+}\r
+.uploadifyError {\r
+       border: 2px solid #FBCBBC !important;\r
+       background-color: #FDE5DD !important;\r
+}\r
+.uploadifyQueueItem .cancel {\r
+       float: right;\r
+}\r
+.uploadifyProgress {\r
+       background-color: #FFFFFF;\r
+       border-top: 1px solid #808080;\r
+       border-left: 1px solid #808080;\r
+       border-right: 1px solid #C5C5C5;\r
+       border-bottom: 1px solid #C5C5C5;\r
+       margin-top: 10px;\r
+       width: 100%;\r
+}\r
+.uploadifyProgressBar {\r
+       background-color: #0099FF;\r
+       width: 1px;\r
+       height: 3px;\r
+}
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/uploadify.fla b/redakcja/static/filebrowser/uploadify/uploadify.fla
new file mode 100644 (file)
index 0000000..c07bbaf
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/uploadify.fla differ
diff --git a/redakcja/static/filebrowser/uploadify/uploadify.php b/redakcja/static/filebrowser/uploadify/uploadify.php
new file mode 100644 (file)
index 0000000..8bf14a6
--- /dev/null
@@ -0,0 +1,46 @@
+<?php\r
+/*\r
+Uploadify v2.1.0\r
+Release Date: August 24, 2009\r
+\r
+Copyright (c) 2009 Ronnie Garcia, Travis Nickels\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.\r
+*/\r
+if (!empty($_FILES)) {\r
+       $tempFile = $_FILES['Filedata']['tmp_name'];\r
+       $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';\r
+       $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];\r
+       \r
+       // $fileTypes  = str_replace('*.','',$_REQUEST['fileext']);\r
+       // $fileTypes  = str_replace(';','|',$fileTypes);\r
+       // $typesArray = split('\|',$fileTypes);\r
+       // $fileParts  = pathinfo($_FILES['Filedata']['name']);\r
+       \r
+       // if (in_array($fileParts['extension'],$typesArray)) {\r
+               // Uncomment the following line if you want to make the directory if it doesn't exist\r
+               // mkdir(str_replace('//','/',$targetPath), 0755, true);\r
+               \r
+               move_uploaded_file($tempFile,$targetFile);\r
+               echo "1";\r
+       // } else {\r
+       //      echo 'Invalid file type.';\r
+       // }\r
+}\r
+?>
\ No newline at end of file
diff --git a/redakcja/static/filebrowser/uploadify/uploadify.swf b/redakcja/static/filebrowser/uploadify/uploadify.swf
new file mode 100644 (file)
index 0000000..0385d9e
Binary files /dev/null and b/redakcja/static/filebrowser/uploadify/uploadify.swf differ
diff --git a/redakcja/static/icons/close.png b/redakcja/static/icons/close.png
new file mode 100644 (file)
index 0000000..5c08b05
Binary files /dev/null and b/redakcja/static/icons/close.png differ
diff --git a/redakcja/static/icons/go-next.png b/redakcja/static/icons/go-next.png
new file mode 100644 (file)
index 0000000..6ef8de7
Binary files /dev/null and b/redakcja/static/icons/go-next.png differ
diff --git a/redakcja/static/icons/go-previous.png b/redakcja/static/icons/go-previous.png
new file mode 100644 (file)
index 0000000..659cd90
Binary files /dev/null and b/redakcja/static/icons/go-previous.png differ
diff --git a/redakcja/static/icons/zoom.png b/redakcja/static/icons/zoom.png
new file mode 100644 (file)
index 0000000..6033b4d
Binary files /dev/null and b/redakcja/static/icons/zoom.png differ
diff --git a/redakcja/static/icons/zoom_in.png b/redakcja/static/icons/zoom_in.png
new file mode 100644 (file)
index 0000000..c7feedc
Binary files /dev/null and b/redakcja/static/icons/zoom_in.png differ
diff --git a/redakcja/static/icons/zoom_out.png b/redakcja/static/icons/zoom_out.png
new file mode 100644 (file)
index 0000000..fdd7124
Binary files /dev/null and b/redakcja/static/icons/zoom_out.png differ
diff --git a/redakcja/static/img/gallery.png b/redakcja/static/img/gallery.png
new file mode 100644 (file)
index 0000000..851a678
Binary files /dev/null and b/redakcja/static/img/gallery.png differ
diff --git a/redakcja/static/img/logo.png b/redakcja/static/img/logo.png
new file mode 100644 (file)
index 0000000..398f45d
Binary files /dev/null and b/redakcja/static/img/logo.png differ
diff --git a/redakcja/static/img/sample_cover.png b/redakcja/static/img/sample_cover.png
new file mode 100644 (file)
index 0000000..eb7e7d1
Binary files /dev/null and b/redakcja/static/img/sample_cover.png differ
diff --git a/redakcja/static/img/spinner.gif b/redakcja/static/img/spinner.gif
new file mode 100644 (file)
index 0000000..c69e937
Binary files /dev/null and b/redakcja/static/img/spinner.gif differ
diff --git a/redakcja/static/js/button_scripts.js b/redakcja/static/js/button_scripts.js
new file mode 100644 (file)
index 0000000..0d38b00
--- /dev/null
@@ -0,0 +1,293 @@
+(function() {
+  var slice = Array.prototype.slice;
+
+  function update(array, args) {
+    var arrayLength = array.length, length = args.length;
+    while (length--) array[arrayLength + length] = args[length];
+    return array;
+  };
+
+  function merge(array, args) {
+    array = slice.call(array, 0);
+    return update(array, args);
+  };
+
+  Function.prototype.bind = function(context) {
+    if (arguments.length < 2 && typeof arguments[0] === 'undefined') {
+      return this;
+    }
+    var __method = this;
+    var args = slice.call(arguments, 1);
+    return function() {
+      var a = merge(args, arguments);
+      return __method.apply(context, a);
+    }
+  }
+
+})();
+
+function nblck_each(array, body, after) {
+       $.each(array, function(i) {
+               body(this, i);
+       });
+
+       after();
+};
+
+function nblck_map(array, func, after) {
+       var acc = [];
+
+       nblck_each(array, function(elem, index) {
+               acc.push(func(elem, index));
+       }, function(){
+               after(acc);
+       });
+};
+
+function ScriptletCenter()
+{
+    this.scriptlets = {};
+
+    this.scriptlets['insert_tag'] = function(context, params, done)
+    {
+        var text = this.XMLEditorSelectedText(context);
+        var start_tag = '<'+params.tag;
+        var move_cursor = false;
+
+        for (var attr in params.attrs) {
+            start_tag += ' '+attr+'="' + params.attrs[attr] + '"';
+        }
+
+        start_tag += '>';
+        var end_tag = '</'+params.tag+'>';
+
+        if(text.length > 0) {
+            // tokenize
+            var output = '';
+            var token = '';
+            for(var index=0; index < text.length; index++)
+            {
+                if (text[index].match(/\s/)) { // whitespace
+                    token += text[index];
+                }
+                else { // character
+                    output += token;
+                    if(output == token) output += start_tag;
+                    token = '';
+                    output += text[index];
+                }
+            }
+
+            if( output[output.length-1] == '\\' ) {
+                output = output.substr(0, output.length-1) + end_tag + '\\';
+            } else {
+                output += end_tag;
+            }
+            output += token;
+        }
+        else {
+            if(params.nocontent) {
+                output = "<"+params.tag +" />";
+            }
+            else {
+                output = start_tag + end_tag;
+                move_cursor = true;
+            }
+        }
+
+        this.XMLEditorReplaceSelectedText(context, output);
+
+        try {
+            if (move_cursor) {
+                this.XMLEditorMoveCursorForward(context, params.tag.length+2);
+            }
+        } catch(e) {}
+
+               done();
+    }.bind(this);
+
+    this.scriptlets['lineregexp'] = function(context, params, done) {
+               var self = this;
+
+        var exprs = $.map(params.exprs, function(expr) {
+            var opts = "g";
+            if(expr.length > 2) {
+                opts = expr[2];
+            } return {
+                rx: new RegExp(expr[0], opts),
+                repl: expr[1]
+                };
+        });
+
+        var partial = true;
+        var text = this.XMLEditorSelectedText(context);
+        if(!text) return done();
+
+        var changed = 0;
+        var lines = text.split('\n');
+
+               nblck_map(lines, function(line, index) {
+            var old_line = line;
+            $(exprs).each(function() {
+                var expr = this;
+                line = line.replace(expr.rx, expr.repl);
+            });
+
+                       $progress.html(index);
+
+            if(old_line != line) changed += 1;
+            return line;
+        }, function(newlines) {
+                       if(changed > 0) {
+                               self.XMLEditorReplaceSelectedText(context, newlines.join('\n') );
+                       };
+
+                       done();
+               });
+    }.bind(this);
+
+    this.scriptlets['fulltextregexp'] = function(context, params, done) {
+               var self = this;
+
+        var exprs = $.map(params.exprs, function(expr) {
+            var opts = "mg";
+            if(expr.length > 2) {
+                opts = expr[2];
+            }
+            return {
+                rx: new RegExp(expr[0], opts),
+                repl: expr[1]
+                };
+        });
+
+        var text = this.XMLEditorSelectedText(context);
+        if(!text) return done();
+        var original = text;
+
+               nblck_each(exprs, function(expr, index) {
+                       $progress.html(600 + index);
+            text = text.replace(expr.rx, expr.repl);
+        }, function() {
+                       if( original != text) {
+                  self.XMLEditorReplaceSelectedText(context, text);
+               }
+
+                       done();
+               });
+    }.bind(this);
+
+    this.scriptlets['macro'] = function(context, params, done) {
+        var self = this;
+               var i = 0;
+
+               function next() {
+               if (i < params.length) {
+                               var e = params[i];
+                               i = i + 1;
+                               self.scriptlets[e[0]](context, e[1], next);
+                       }
+                       else {
+                               done();
+                       }
+        };
+
+               next();
+    }.bind(this);
+
+    this.scriptlets['lowercase'] = function(context, params, done)
+    {
+        var text = this.XMLEditorSelectedText(context);
+
+        if(!text) return;
+
+        var repl = '';
+        var lcase = text.toLowerCase();
+        var ucase = text.toUpperCase();
+
+        if(lcase == text) repl = ucase; /* was lowercase */
+        else if(ucase != text) repl = lcase; /* neither lower- or upper-case */
+        else { /* upper case -> camel-case */
+            var words = $(lcase.split(/\s/)).map(function() {
+                if(this.length > 0) {
+                    return this[0].toUpperCase() + this.slice(1);
+                } else {
+                    return '';
+                }
+            });
+            repl = words.join(' ');
+        }
+
+        if(repl != text) this.XMLEditorReplaceSelectedText(context, repl);
+
+               done();
+    }.bind(this);
+
+
+    this.scriptlets["insert_stanza"] = function(context, params, done) {
+        var text = this.XMLEditorSelectedText(context);
+
+        if(text) {
+            var verses = text.split('\n');
+            text = ''; var buf = ''; var ebuf = '';
+            var first = true;
+
+            for(var i=0;  i < verses.length; i++) {
+                var verse = verses[i].replace(/^\s+/, "").replace(/\s+$/, "");
+                if(verse) {
+                    text += (buf ? buf + '/\n' : '') + ebuf;
+                    buf = (first ? '<strofa>\n' : '') + verses[i];
+                    ebuf = '';
+                    first = false;
+                } else {
+                    ebuf += '\n' + verses[i];
+                }
+            }
+            text = text + buf + '\n</strofa>' + ebuf;
+            this.XMLEditorReplaceSelectedText(context, text);
+        }
+
+        if (!text) {
+            this.XMLEditorMoveCursorForward(context, params.tag.length + 2);
+        }
+
+               done();
+    }.bind(this);
+
+}
+
+ScriptletCenter.prototype.callInteractive = function(opts) {
+       $progress = $('<span>Executing script</span>');
+       var self = this;
+
+       $.blockUI({
+               message: $progress,
+
+       });
+
+
+       self.scriptlets[opts.action](opts.context, opts.extra, function(){
+               $.unblockUI(); // done
+       });
+}
+
+ScriptletCenter.prototype.XMLEditorSelectedText = function(editor) {
+
+    return editor.selection();
+};
+
+ScriptletCenter.prototype.XMLEditorReplaceSelectedText = function(editor, replacement)
+{
+       $progress.html("Replacing text");
+    editor.replaceSelection(replacement);
+};
+
+ScriptletCenter.prototype.XMLEditorMoveCursorForward = function(panel, n) {
+    var pos = panel.cursorPosition();
+    panel.selectLines(pos.line, pos.character + n);
+};
+
+var scriptletCenter;
+
+$(function() {
+    scriptletCenter = new ScriptletCenter();
+});
\ No newline at end of file
diff --git a/redakcja/static/js/jquery-1.4.2.min.js b/redakcja/static/js/jquery-1.4.2.min.js
new file mode 100644 (file)
index 0000000..7c24308
--- /dev/null
@@ -0,0 +1,154 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
+e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
+j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
+"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
+true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
+c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
+L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
+"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
+d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
+a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
+!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
+true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
+i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
+" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
+this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
+e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
+null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
+"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
+a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
+isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
+{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
+if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
+!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
+toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
+u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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".split(" "),
+function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
+if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
+for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
+1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
+relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
+l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
+h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
+m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
+!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
+h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
+gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
+c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
+a:b+"></"+d+">"},F={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,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
+this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
+u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
+1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
+"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
+serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
+function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
+global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
+e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
+"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
+false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
+false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
+c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
+d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
+g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
+1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
+"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
+if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
+this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
+"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
+animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
+j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
+this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
+"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
+c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
+this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
+this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
+e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
+c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
+function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
+this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
+k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
+f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
+c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
+d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
+f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
+"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
+e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/redakcja/static/js/jquery.autocomplete.js b/redakcja/static/js/jquery.autocomplete.js
new file mode 100644 (file)
index 0000000..0d25ba6
--- /dev/null
@@ -0,0 +1,808 @@
+/*
+ * jQuery Autocomplete plugin 1.1
+ *
+ * Copyright (c) 2009 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
+ */
+
+;(function($) {
+
+$.fn.extend({
+       autocomplete: function(urlOrData, options) {
+               var isUrl = typeof urlOrData == "string";
+               options = $.extend({}, $.Autocompleter.defaults, {
+                       url: isUrl ? urlOrData : null,
+                       data: isUrl ? null : urlOrData,
+                       delay: isUrl ? $.Autocompleter.defaults.delay : 10,
+                       max: options && !options.scroll ? 10 : 150
+               }, options);
+
+               // if highlight is set to false, replace it with a do-nothing function
+               options.highlight = options.highlight || function(value) { return value; };
+
+               // if the formatMatch option is not specified, then use formatItem for backwards compatibility
+               options.formatMatch = options.formatMatch || options.formatItem;
+
+               return this.each(function() {
+                       new $.Autocompleter(this, options);
+               });
+       },
+       result: function(handler) {
+               return this.bind("result", handler);
+       },
+       search: function(handler) {
+               return this.trigger("search", [handler]);
+       },
+       flushCache: function() {
+               return this.trigger("flushCache");
+       },
+       setOptions: function(options){
+               return this.trigger("setOptions", [options]);
+       },
+       unautocomplete: function() {
+               return this.trigger("unautocomplete");
+       }
+});
+
+$.Autocompleter = function(input, options) {
+
+       var KEY = {
+               UP: 38,
+               DOWN: 40,
+               DEL: 46,
+               TAB: 9,
+               RETURN: 13,
+               ESC: 27,
+               COMMA: 188,
+               PAGEUP: 33,
+               PAGEDOWN: 34,
+               BACKSPACE: 8
+       };
+
+       // Create $ object for input element
+       var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
+
+       var timeout;
+       var previousValue = "";
+       var cache = $.Autocompleter.Cache(options);
+       var hasFocus = 0;
+       var lastKeyPressCode;
+       var config = {
+               mouseDownOnSelect: false
+       };
+       var select = $.Autocompleter.Select(options, input, selectCurrent, config);
+
+       var blockSubmit;
+
+       // prevent form submit in opera when selecting with return key
+       $.browser.opera && $(input.form).bind("submit.autocomplete", function() {
+               if (blockSubmit) {
+                       blockSubmit = false;
+                       return false;
+               }
+       });
+
+       // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
+       $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
+               // a keypress means the input has focus
+               // avoids issue where input had focus before the autocomplete was applied
+               hasFocus = 1;
+               // track last key pressed
+               lastKeyPressCode = event.keyCode;
+               switch(event.keyCode) {
+
+                       case KEY.UP:
+                               event.preventDefault();
+                               if ( select.visible() ) {
+                                       select.prev();
+                               } else {
+                                       onChange(0, true);
+                               }
+                               break;
+
+                       case KEY.DOWN:
+                               event.preventDefault();
+                               if ( select.visible() ) {
+                                       select.next();
+                               } else {
+                                       onChange(0, true);
+                               }
+                               break;
+
+                       case KEY.PAGEUP:
+                               event.preventDefault();
+                               if ( select.visible() ) {
+                                       select.pageUp();
+                               } else {
+                                       onChange(0, true);
+                               }
+                               break;
+
+                       case KEY.PAGEDOWN:
+                               event.preventDefault();
+                               if ( select.visible() ) {
+                                       select.pageDown();
+                               } else {
+                                       onChange(0, true);
+                               }
+                               break;
+
+                       // matches also semicolon
+                       case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
+                       case KEY.TAB:
+                       case KEY.RETURN:
+                               if( selectCurrent() ) {
+                                       // stop default to prevent a form submit, Opera needs special handling
+                                       event.preventDefault();
+                                       blockSubmit = true;
+                                       return false;
+                               }
+                               break;
+
+                       case KEY.ESC:
+                               select.hide();
+                               break;
+
+                       default:
+                               clearTimeout(timeout);
+                               timeout = setTimeout(onChange, options.delay);
+                               break;
+               }
+       }).focus(function(){
+               // track whether the field has focus, we shouldn't process any
+               // results if the field no longer has focus
+               hasFocus++;
+       }).blur(function() {
+               hasFocus = 0;
+               if (!config.mouseDownOnSelect) {
+                       hideResults();
+               }
+       }).click(function() {
+               // show select when clicking in a focused field
+               if ( hasFocus++ > 1 && !select.visible() ) {
+                       onChange(0, true);
+               }
+       }).bind("search", function() {
+               // TODO why not just specifying both arguments?
+               var fn = (arguments.length > 1) ? arguments[1] : null;
+               function findValueCallback(q, data) {
+                       var result;
+                       if( data && data.length ) {
+                               for (var i=0; i < data.length; i++) {
+                                       if( data[i].result.toLowerCase() == q.toLowerCase() ) {
+                                               result = data[i];
+                                               break;
+                                       }
+                               }
+                       }
+                       if( typeof fn == "function" ) fn(result);
+                       else $input.trigger("result", result && [result.data, result.value]);
+               }
+               $.each(trimWords($input.val()), function(i, value) {
+                       request(value, findValueCallback, findValueCallback);
+               });
+       }).bind("flushCache", function() {
+               cache.flush();
+       }).bind("setOptions", function() {
+               $.extend(options, arguments[1]);
+               // if we've updated the data, repopulate
+               if ( "data" in arguments[1] )
+                       cache.populate();
+       }).bind("unautocomplete", function() {
+               select.unbind();
+               $input.unbind();
+               $(input.form).unbind(".autocomplete");
+       });
+
+
+       function selectCurrent() {
+               var selected = select.selected();
+               if( !selected )
+                       return false;
+
+               var v = selected.result;
+               previousValue = v;
+
+               if ( options.multiple ) {
+                       var words = trimWords($input.val());
+                       if ( words.length > 1 ) {
+                               var seperator = options.multipleSeparator.length;
+                               var cursorAt = $(input).selection().start;
+                               var wordAt, progress = 0;
+                               $.each(words, function(i, word) {
+                                       progress += word.length;
+                                       if (cursorAt <= progress) {
+                                               wordAt = i;
+                                               return false;
+                                       }
+                                       progress += seperator;
+                               });
+                               words[wordAt] = v;
+                               // TODO this should set the cursor to the right position, but it gets overriden somewhere
+                               //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
+                               v = words.join( options.multipleSeparator );
+                       }
+                       v += options.multipleSeparator;
+               }
+
+               $input.val(v);
+               hideResultsNow();
+               $input.trigger("result", [selected.data, selected.value]);
+               return true;
+       }
+
+       function onChange(crap, skipPrevCheck) {
+               if( lastKeyPressCode == KEY.DEL ) {
+                       select.hide();
+                       return;
+               }
+
+               var currentValue = $input.val();
+
+               if ( !skipPrevCheck && currentValue == previousValue )
+                       return;
+
+               previousValue = currentValue;
+
+               currentValue = lastWord(currentValue);
+               if ( currentValue.length >= options.minChars) {
+                       $input.addClass(options.loadingClass);
+                       if (!options.matchCase)
+                               currentValue = currentValue.toLowerCase();
+                       request(currentValue, receiveData, hideResultsNow);
+               } else {
+                       stopLoading();
+                       select.hide();
+               }
+       };
+
+       function trimWords(value) {
+               if (!value)
+                       return [""];
+               if (!options.multiple)
+                       return [$.trim(value)];
+               return $.map(value.split(options.multipleSeparator), function(word) {
+                       return $.trim(value).length ? $.trim(word) : null;
+               });
+       }
+
+       function lastWord(value) {
+               if ( !options.multiple )
+                       return value;
+               var words = trimWords(value);
+               if (words.length == 1)
+                       return words[0];
+               var cursorAt = $(input).selection().start;
+               if (cursorAt == value.length) {
+                       words = trimWords(value)
+               } else {
+                       words = trimWords(value.replace(value.substring(cursorAt), ""));
+               }
+               return words[words.length - 1];
+       }
+
+       // fills in the input box w/the first match (assumed to be the best match)
+       // q: the term entered
+       // sValue: the first matching result
+       function autoFill(q, sValue){
+               // autofill in the complete box w/the first match as long as the user hasn't entered in more data
+               // if the last user key pressed was backspace, don't autofill
+               if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
+                       // fill in the value (keep the case the user has typed)
+                       $input.val($input.val() + sValue.substring(lastWord(previousValue).length));
+                       // select the portion of the value not typed by the user (so the next character will erase)
+                       $(input).selection(previousValue.length, previousValue.length + sValue.length);
+               }
+       };
+
+       function hideResults() {
+               clearTimeout(timeout);
+               timeout = setTimeout(hideResultsNow, 200);
+       };
+
+       function hideResultsNow() {
+               var wasVisible = select.visible();
+               select.hide();
+               clearTimeout(timeout);
+               stopLoading();
+               if (options.mustMatch) {
+                       // call search and run callback
+                       $input.search(
+                               function (result){
+                                       // if no value found, clear the input box
+                                       if( !result ) {
+                                               if (options.multiple) {
+                                                       var words = trimWords($input.val()).slice(0, -1);
+                                                       $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
+                                               }
+                                               else {
+                                                       $input.val( "" );
+                                                       $input.trigger("result", null);
+                                               }
+                                       }
+                               }
+                       );
+               }
+       };
+
+       function receiveData(q, data) {
+               if ( data && data.length && hasFocus ) {
+                       stopLoading();
+                       select.display(data, q);
+                       autoFill(q, data[0].value);
+                       select.show();
+               } else {
+                       hideResultsNow();
+               }
+       };
+
+       function request(term, success, failure) {
+               if (!options.matchCase)
+                       term = term.toLowerCase();
+               var data = cache.load(term);
+               // recieve the cached data
+               if (data && data.length) {
+                       success(term, data);
+               // if an AJAX url has been supplied, try loading the data now
+               } else if( (typeof options.url == "string") && (options.url.length > 0) ){
+
+                       var extraParams = {
+                               timestamp: +new Date()
+                       };
+                       $.each(options.extraParams, function(key, param) {
+                               extraParams[key] = typeof param == "function" ? param() : param;
+                       });
+
+                       $.ajax({
+                               // try to leverage ajaxQueue plugin to abort previous requests
+                               mode: "abort",
+                               // limit abortion to this input
+                               port: "autocomplete" + input.name,
+                               dataType: options.dataType,
+                               url: options.url,
+                               data: $.extend({
+                                       q: lastWord(term),
+                                       limit: options.max
+                               }, extraParams),
+                               success: function(data) {
+                                       var parsed = options.parse && options.parse(data) || parse(data);
+                                       cache.add(term, parsed);
+                                       success(term, parsed);
+                               }
+                       });
+               } else {
+                       // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
+                       select.emptyList();
+                       failure(term);
+               }
+       };
+
+       function parse(data) {
+               var parsed = [];
+               var rows = data.split("\n");
+               for (var i=0; i < rows.length; i++) {
+                       var row = $.trim(rows[i]);
+                       if (row) {
+                               row = row.split("|");
+                               parsed[parsed.length] = {
+                                       data: row,
+                                       value: row[0],
+                                       result: options.formatResult && options.formatResult(row, row[0]) || row[0]
+                               };
+                       }
+               }
+               return parsed;
+       };
+
+       function stopLoading() {
+               $input.removeClass(options.loadingClass);
+       };
+
+};
+
+$.Autocompleter.defaults = {
+       inputClass: "ac_input",
+       resultsClass: "ac_results",
+       loadingClass: "ac_loading",
+       minChars: 1,
+       delay: 400,
+       matchCase: false,
+       matchSubset: true,
+       matchContains: false,
+       cacheLength: 10,
+       max: 100,
+       mustMatch: false,
+       extraParams: {},
+       selectFirst: true,
+       formatItem: function(row) { return row[0]; },
+       formatMatch: null,
+       autoFill: false,
+       width: 0,
+       multiple: false,
+       multipleSeparator: ", ",
+       highlight: function(value, term) {
+               return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
+       },
+    scroll: true,
+    scrollHeight: 180
+};
+
+$.Autocompleter.Cache = function(options) {
+
+       var data = {};
+       var length = 0;
+
+       function matchSubset(s, sub) {
+               if (!options.matchCase)
+                       s = s.toLowerCase();
+               var i = s.indexOf(sub);
+               if (options.matchContains == "word"){
+                       i = s.toLowerCase().search("\\b" + sub.toLowerCase());
+               }
+               if (i == -1) return false;
+               return i == 0 || options.matchContains;
+       };
+
+       function add(q, value) {
+               if (length > options.cacheLength){
+                       flush();
+               }
+               if (!data[q]){
+                       length++;
+               }
+               data[q] = value;
+       }
+
+       function populate(){
+               if( !options.data ) return false;
+               // track the matches
+               var stMatchSets = {},
+                       nullData = 0;
+
+               // no url was specified, we need to adjust the cache length to make sure it fits the local data store
+               if( !options.url ) options.cacheLength = 1;
+
+               // track all options for minChars = 0
+               stMatchSets[""] = [];
+
+               // loop through the array and create a lookup structure
+               for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
+                       var rawValue = options.data[i];
+                       // if rawValue is a string, make an array otherwise just reference the array
+                       rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
+
+                       var value = options.formatMatch(rawValue, i+1, options.data.length);
+                       if ( value === false )
+                               continue;
+
+                       var firstChar = value.charAt(0).toLowerCase();
+                       // if no lookup array for this character exists, look it up now
+                       if( !stMatchSets[firstChar] )
+                               stMatchSets[firstChar] = [];
+
+                       // if the match is a string
+                       var row = {
+                               value: value,
+                               data: rawValue,
+                               result: options.formatResult && options.formatResult(rawValue) || value
+                       };
+
+                       // push the current match into the set list
+                       stMatchSets[firstChar].push(row);
+
+                       // keep track of minChars zero items
+                       if ( nullData++ < options.max ) {
+                               stMatchSets[""].push(row);
+                       }
+               };
+
+               // add the data items to the cache
+               $.each(stMatchSets, function(i, value) {
+                       // increase the cache size
+                       options.cacheLength++;
+                       // add to the cache
+                       add(i, value);
+               });
+       }
+
+       // populate any existing data
+       setTimeout(populate, 25);
+
+       function flush(){
+               data = {};
+               length = 0;
+       }
+
+       return {
+               flush: flush,
+               add: add,
+               populate: populate,
+               load: function(q) {
+                       if (!options.cacheLength || !length)
+                               return null;
+                       /*
+                        * if dealing w/local data and matchContains than we must make sure
+                        * to loop through all the data collections looking for matches
+                        */
+                       if( !options.url && options.matchContains ){
+                               // track all matches
+                               var csub = [];
+                               // loop through all the data grids for matches
+                               for( var k in data ){
+                                       // don't search through the stMatchSets[""] (minChars: 0) cache
+                                       // this prevents duplicates
+                                       if( k.length > 0 ){
+                                               var c = data[k];
+                                               $.each(c, function(i, x) {
+                                                       // if we've got a match, add it to the array
+                                                       if (matchSubset(x.value, q)) {
+                                                               csub.push(x);
+                                                       }
+                                               });
+                                       }
+                               }
+                               return csub;
+                       } else
+                       // if the exact item exists, use it
+                       if (data[q]){
+                               return data[q];
+                       } else
+                       if (options.matchSubset) {
+                               for (var i = q.length - 1; i >= options.minChars; i--) {
+                                       var c = data[q.substr(0, i)];
+                                       if (c) {
+                                               var csub = [];
+                                               $.each(c, function(i, x) {
+                                                       if (matchSubset(x.value, q)) {
+                                                               csub[csub.length] = x;
+                                                       }
+                                               });
+                                               return csub;
+                                       }
+                               }
+                       }
+                       return null;
+               }
+       };
+};
+
+$.Autocompleter.Select = function (options, input, select, config) {
+       var CLASSES = {
+               ACTIVE: "ac_over"
+       };
+
+       var listItems,
+               active = -1,
+               data,
+               term = "",
+               needsInit = true,
+               element,
+               list;
+
+       // Create results
+       function init() {
+               if (!needsInit)
+                       return;
+               element = $("<div/>")
+               .hide()
+               .addClass(options.resultsClass)
+               .css("position", "absolute")
+               .appendTo(document.body);
+
+               list = $("<ul/>").appendTo(element).mouseover( function(event) {
+                       if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
+                   active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
+                           $(target(event)).addClass(CLASSES.ACTIVE);
+               }
+               }).click(function(event) {
+                       $(target(event)).addClass(CLASSES.ACTIVE);
+                       select();
+                       // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
+                       input.focus();
+                       return false;
+               }).mousedown(function() {
+                       config.mouseDownOnSelect = true;
+               }).mouseup(function() {
+                       config.mouseDownOnSelect = false;
+               });
+
+               if( options.width > 0 )
+                       element.css("width", options.width);
+
+               needsInit = false;
+       }
+
+       function target(event) {
+               var element = event.target;
+               while(element && element.tagName != "LI")
+                       element = element.parentNode;
+               // more fun with IE, sometimes event.target is empty, just ignore it then
+               if(!element)
+                       return [];
+               return element;
+       }
+
+       function moveSelect(step) {
+               listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
+               movePosition(step);
+        var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
+        if(options.scroll) {
+            var offset = 0;
+            listItems.slice(0, active).each(function() {
+                               offset += this.offsetHeight;
+                       });
+            if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
+                list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
+            } else if(offset < list.scrollTop()) {
+                list.scrollTop(offset);
+            }
+        }
+       };
+
+       function movePosition(step) {
+               active += step;
+               if (active < 0) {
+                       active = listItems.size() - 1;
+               } else if (active >= listItems.size()) {
+                       active = 0;
+               }
+       }
+
+       function limitNumberOfItems(available) {
+               return options.max && options.max < available
+                       ? options.max
+                       : available;
+       }
+
+       function fillList() {
+               list.empty();
+               var max = limitNumberOfItems(data.length);
+               for (var i=0; i < max; i++) {
+                       if (!data[i])
+                               continue;
+                       var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
+                       if ( formatted === false )
+                               continue;
+                       var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
+                       $.data(li, "ac_data", data[i]);
+               }
+               listItems = list.find("li");
+               if ( options.selectFirst ) {
+                       listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
+                       active = 0;
+               }
+               // apply bgiframe if available
+               if ( $.fn.bgiframe )
+                       list.bgiframe();
+       }
+
+       return {
+               display: function(d, q) {
+                       init();
+                       data = d;
+                       term = q;
+                       fillList();
+               },
+               next: function() {
+                       moveSelect(1);
+               },
+               prev: function() {
+                       moveSelect(-1);
+               },
+               pageUp: function() {
+                       if (active != 0 && active - 8 < 0) {
+                               moveSelect( -active );
+                       } else {
+                               moveSelect(-8);
+                       }
+               },
+               pageDown: function() {
+                       if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
+                               moveSelect( listItems.size() - 1 - active );
+                       } else {
+                               moveSelect(8);
+                       }
+               },
+               hide: function() {
+                       element && element.hide();
+                       listItems && listItems.removeClass(CLASSES.ACTIVE);
+                       active = -1;
+               },
+               visible : function() {
+                       return element && element.is(":visible");
+               },
+               current: function() {
+                       return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
+               },
+               show: function() {
+                       var offset = $(input).offset();
+                       element.css({
+                               width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
+                               top: offset.top + input.offsetHeight,
+                               left: offset.left
+                       }).show();
+            if(options.scroll) {
+                list.scrollTop(0);
+                list.css({
+                                       maxHeight: options.scrollHeight,
+                                       overflow: 'auto'
+                               });
+
+                if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
+                                       var listHeight = 0;
+                                       listItems.each(function() {
+                                               listHeight += this.offsetHeight;
+                                       });
+                                       var scrollbarsVisible = listHeight > options.scrollHeight;
+                    list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
+                                       if (!scrollbarsVisible) {
+                                               // IE doesn't recalculate width when scrollbar disappears
+                                               listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
+                                       }
+                }
+
+            }
+               },
+               selected: function() {
+                       var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
+                       return selected && selected.length && $.data(selected[0], "ac_data");
+               },
+               emptyList: function (){
+                       list && list.empty();
+               },
+               unbind: function() {
+                       element && element.remove();
+               }
+       };
+};
+
+$.fn.selection = function(start, end) {
+       if (start !== undefined) {
+               return this.each(function() {
+                       if( this.createTextRange ){
+                               var selRange = this.createTextRange();
+                               if (end === undefined || start == end) {
+                                       selRange.move("character", start);
+                                       selRange.select();
+                               } else {
+                                       selRange.collapse(true);
+                                       selRange.moveStart("character", start);
+                                       selRange.moveEnd("character", end);
+                                       selRange.select();
+                               }
+                       } else if( this.setSelectionRange ){
+                               this.setSelectionRange(start, end);
+                       } else if( this.selectionStart ){
+                               this.selectionStart = start;
+                               this.selectionEnd = end;
+                       }
+               });
+       }
+       var field = this[0];
+       if ( field.createTextRange ) {
+               var range = document.selection.createRange(),
+                       orig = field.value,
+                       teststring = "<->",
+                       textLength = range.text.length;
+               range.text = teststring;
+               var caretAt = field.value.indexOf(teststring);
+               field.value = orig;
+               this.selection(caretAt, caretAt + textLength);
+               return {
+                       start: caretAt,
+                       end: caretAt + textLength
+               }
+       } else if( field.selectionStart !== undefined ){
+               return {
+                       start: field.selectionStart,
+                       end: field.selectionEnd
+               }
+       }
+};
+
+})(jQuery);
\ No newline at end of file
diff --git a/redakcja/static/js/jquery.blockui.js b/redakcja/static/js/jquery.blockui.js
new file mode 100644 (file)
index 0000000..5491667
--- /dev/null
@@ -0,0 +1,477 @@
+/*!
+ * jQuery blockUI plugin
+ * Version 2.31 (06-JAN-2010)
+ * @requires jQuery v1.2.3 or later
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007-2008 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
+ */
+
+;(function($) {
+
+if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
+       alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
+       return;
+}
+
+$.fn._fadeIn = $.fn.fadeIn;
+
+var noOp = function() {};
+
+// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
+// retarded userAgent strings on Vista)
+var mode = document.documentMode || 0;
+var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
+var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
+
+// global $ methods for blocking/unblocking the entire page
+$.blockUI   = function(opts) { install(window, opts); };
+$.unblockUI = function(opts) { remove(window, opts); };
+
+// convenience method for quick growl-like notifications  (http://www.google.com/search?q=growl)
+$.growlUI = function(title, message, timeout, onClose) {
+       var $m = $('<div class="growlUI"></div>');
+       if (title) $m.append('<h1>'+title+'</h1>');
+       if (message) $m.append('<h2>'+message+'</h2>');
+       if (timeout == undefined) timeout = 3000;
+       $.blockUI({
+               message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
+               timeout: timeout, showOverlay: false,
+               onUnblock: onClose,
+               css: $.blockUI.defaults.growlCSS
+       });
+};
+
+// plugin method for blocking element content
+$.fn.block = function(opts) {
+       return this.unblock({ fadeOut: 0 }).each(function() {
+               if ($.css(this,'position') == 'static')
+                       this.style.position = 'relative';
+               if ($.browser.msie)
+                       this.style.zoom = 1; // force 'hasLayout'
+               install(this, opts);
+       });
+};
+
+// plugin method for unblocking element content
+$.fn.unblock = function(opts) {
+       return this.each(function() {
+               remove(this, opts);
+       });
+};
+
+$.blockUI.version = 2.31; // 2nd generation blocking at no extra cost!
+
+// override these in your code to change the default behavior and style
+$.blockUI.defaults = {
+       // message displayed when blocking (use null for no message)
+       message:  '<h1>Please wait...</h1>',
+
+       title: null,      // title string; only used when theme == true
+       draggable: true,  // only used when theme == true (requires jquery-ui.js to be loaded)
+
+       theme: false, // set to true to use with jQuery UI themes
+
+       // styles for the message when blocking; if you wish to disable
+       // these and use an external stylesheet then do this in your code:
+       // $.blockUI.defaults.css = {};
+       css: {
+               padding:        0,
+               margin:         0,
+               width:          '30%',
+               top:            '40%',
+               left:           '35%',
+               textAlign:      'center',
+               color:          '#000',
+               border:         '3px solid #aaa',
+               backgroundColor:'#fff',
+               cursor:         'wait'
+       },
+
+       // minimal style set used when themes are used
+       themedCSS: {
+               width:  '30%',
+               top:    '40%',
+               left:   '35%'
+       },
+
+       // styles for the overlay
+       overlayCSS:  {
+               backgroundColor: '#000',
+               opacity:                 0.6,
+               cursor:                  'wait'
+       },
+
+       // styles applied when using $.growlUI
+       growlCSS: {
+               width:          '350px',
+               top:            '10px',
+               left:           '',
+               right:          '10px',
+               border:         'none',
+               padding:        '5px',
+               opacity:        0.6,
+               cursor:         'default',
+               color:          '#fff',
+               backgroundColor: '#000',
+               '-webkit-border-radius': '10px',
+               '-moz-border-radius':    '10px'
+       },
+
+       // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
+       // (hat tip to Jorge H. N. de Vasconcelos)
+       iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
+
+       // force usage of iframe in non-IE browsers (handy for blocking applets)
+       forceIframe: false,
+
+       // z-index for the blocking overlay
+       baseZ: 1000,
+
+       // set these to true to have the message automatically centered
+       centerX: true, // <-- only effects element blocking (page block controlled via css above)
+       centerY: true,
+
+       // allow body element to be stetched in ie6; this makes blocking look better
+       // on "short" pages.  disable if you wish to prevent changes to the body height
+       allowBodyStretch: true,
+
+       // enable if you want key and mouse events to be disabled for content that is blocked
+       bindEvents: true,
+
+       // be default blockUI will supress tab navigation from leaving blocking content
+       // (if bindEvents is true)
+       constrainTabKey: true,
+
+       // fadeIn time in millis; set to 0 to disable fadeIn on block
+       fadeIn:  200,
+
+       // fadeOut time in millis; set to 0 to disable fadeOut on unblock
+       fadeOut:  400,
+
+       // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
+       timeout: 0,
+
+       // disable if you don't want to show the overlay
+       showOverlay: true,
+
+       // if true, focus will be placed in the first available input field when
+       // page blocking
+       focusInput: true,
+
+       // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
+       applyPlatformOpacityRules: true,
+
+       // callback method invoked when fadeIn has completed and blocking message is visible
+       onBlock: null,
+
+       // callback method invoked when unblocking has completed; the callback is
+       // passed the element that has been unblocked (which is the window object for page
+       // blocks) and the options that were passed to the unblock call:
+       //       onUnblock(element, options)
+       onUnblock: null,
+
+       // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
+       quirksmodeOffsetHack: 4
+};
+
+// private data and functions follow...
+
+var pageBlock = null;
+var pageBlockEls = [];
+
+function install(el, opts) {
+       var full = (el == window);
+       var msg = opts && opts.message !== undefined ? opts.message : undefined;
+       opts = $.extend({}, $.blockUI.defaults, opts || {});
+       opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
+       var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
+       var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
+       msg = msg === undefined ? opts.message : msg;
+
+       // remove the current block (if there is one)
+       if (full && pageBlock)
+               remove(window, {fadeOut:0});
+
+       // if an existing element is being used as the blocking content then we capture
+       // its current place in the DOM (and current display style) so we can restore
+       // it when we unblock
+       if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
+               var node = msg.jquery ? msg[0] : msg;
+               var data = {};
+               $(el).data('blockUI.history', data);
+               data.el = node;
+               data.parent = node.parentNode;
+               data.display = node.style.display;
+               data.position = node.style.position;
+               if (data.parent)
+                       data.parent.removeChild(node);
+       }
+
+       var z = opts.baseZ;
+
+       // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
+       // layer1 is the iframe layer which is used to supress bleed through of underlying content
+       // layer2 is the overlay layer which has opacity and a wait cursor (by default)
+       // layer3 is the message content that is displayed while blocking
+
+       var lyr1 = ($.browser.msie || opts.forceIframe)
+               ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
+               : $('<div class="blockUI" style="display:none"></div>');
+       var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
+
+       var lyr3;
+       if (opts.theme && full) {
+               var s = '<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">' +
+                                       '<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
+                                       '<div class="ui-widget-content ui-dialog-content"></div>' +
+                               '</div>';
+               lyr3 = $(s);
+       }
+       else {
+               lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>')
+                                       : $('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');
+       }
+
+       // if we have a message, style it
+       if (msg) {
+               if (opts.theme) {
+                       lyr3.css(themedCSS);
+                       lyr3.addClass('ui-widget-content');
+               }
+               else
+                       lyr3.css(css);
+       }
+
+       // style the overlay
+       if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
+               lyr2.css(opts.overlayCSS);
+       lyr2.css('position', full ? 'fixed' : 'absolute');
+
+       // make iframe layer transparent in IE
+       if ($.browser.msie || opts.forceIframe)
+               lyr1.css('opacity',0.0);
+
+       //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
+       var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
+       $.each(layers, function() {
+               this.appendTo($par);
+       });
+
+       if (opts.theme && opts.draggable && $.fn.draggable) {
+               lyr3.draggable({
+                       handle: '.ui-dialog-titlebar',
+                       cancel: 'li'
+               });
+       }
+
+       // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
+       var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
+       if (ie6 || expr) {
+               // give body 100% height
+               if (full && opts.allowBodyStretch && $.boxModel)
+                       $('html,body').css('height','100%');
+
+               // fix ie6 issue when blocked element has a border width
+               if ((ie6 || !$.boxModel) && !full) {
+                       var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
+                       var fixT = t ? '(0 - '+t+')' : 0;
+                       var fixL = l ? '(0 - '+l+')' : 0;
+               }
+
+               // simulate fixed position
+               $.each([lyr1,lyr2,lyr3], function(i,o) {
+                       var s = o[0].style;
+                       s.position = 'absolute';
+                       if (i < 2) {
+                               full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
+                                        : s.setExpression('height','this.parentNode.offsetHeight + "px"');
+                               full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
+                                        : s.setExpression('width','this.parentNode.offsetWidth + "px"');
+                               if (fixL) s.setExpression('left', fixL);
+                               if (fixT) s.setExpression('top', fixT);
+                       }
+                       else if (opts.centerY) {
+                               if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
+                               s.marginTop = 0;
+                       }
+                       else if (!opts.centerY && full) {
+                               var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
+                               var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
+                               s.setExpression('top',expression);
+                       }
+               });
+       }
+
+       // show the message
+       if (msg) {
+               if (opts.theme)
+                       lyr3.find('.ui-widget-content').append(msg);
+               else
+                       lyr3.append(msg);
+               if (msg.jquery || msg.nodeType)
+                       $(msg).show();
+       }
+
+       if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
+               lyr1.show(); // opacity is zero
+       if (opts.fadeIn) {
+               var cb = opts.onBlock ? opts.onBlock : noOp;
+               var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
+               var cb2 = msg ? cb : noOp;
+               if (opts.showOverlay)
+                       lyr2._fadeIn(opts.fadeIn, cb1);
+               if (msg)
+                       lyr3._fadeIn(opts.fadeIn, cb2);
+       }
+       else {
+               if (opts.showOverlay)
+                       lyr2.show();
+               if (msg)
+                       lyr3.show();
+               if (opts.onBlock)
+                       opts.onBlock();
+       }
+
+       // bind key and mouse events
+       bind(1, el, opts);
+
+       if (full) {
+               pageBlock = lyr3[0];
+               pageBlockEls = $(':input:enabled:visible',pageBlock);
+               if (opts.focusInput)
+                       setTimeout(focus, 20);
+       }
+       else
+               center(lyr3[0], opts.centerX, opts.centerY);
+
+       if (opts.timeout) {
+               // auto-unblock
+               var to = setTimeout(function() {
+                       full ? $.unblockUI(opts) : $(el).unblock(opts);
+               }, opts.timeout);
+               $(el).data('blockUI.timeout', to);
+       }
+};
+
+// remove the block
+function remove(el, opts) {
+       var full = (el == window);
+       var $el = $(el);
+       var data = $el.data('blockUI.history');
+       var to = $el.data('blockUI.timeout');
+       if (to) {
+               clearTimeout(to);
+               $el.removeData('blockUI.timeout');
+       }
+       opts = $.extend({}, $.blockUI.defaults, opts || {});
+       bind(0, el, opts); // unbind events
+
+       var els;
+       if (full) // crazy selector to handle odd field errors in ie6/7
+               els = $('body').children().filter('.blockUI').add('body > .blockUI');
+       else
+               els = $('.blockUI', el);
+
+       if (full)
+               pageBlock = pageBlockEls = null;
+
+       if (opts.fadeOut) {
+               els.fadeOut(opts.fadeOut);
+               setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
+       }
+       else
+               reset(els, data, opts, el);
+};
+
+// move blocking element back into the DOM where it started
+function reset(els,data,opts,el) {
+       els.each(function(i,o) {
+               // remove via DOM calls so we don't lose event handlers
+               if (this.parentNode)
+                       this.parentNode.removeChild(this);
+       });
+
+       if (data && data.el) {
+               data.el.style.display = data.display;
+               data.el.style.position = data.position;
+               if (data.parent)
+                       data.parent.appendChild(data.el);
+               $(el).removeData('blockUI.history');
+       }
+
+       if (typeof opts.onUnblock == 'function')
+               opts.onUnblock(el,opts);
+};
+
+// bind/unbind the handler
+function bind(b, el, opts) {
+       var full = el == window, $el = $(el);
+
+       // don't bother unbinding if there is nothing to unbind
+       if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
+               return;
+       if (!full)
+               $el.data('blockUI.isBlocked', b);
+
+       // don't bind events when overlay is not in use or if bindEvents is false
+       if (!opts.bindEvents || (b && !opts.showOverlay))
+               return;
+
+       // bind anchors and inputs for mouse and key events
+       var events = 'mousedown mouseup keydown keypress';
+       b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
+
+// former impl...
+//        var $e = $('a,:input');
+//        b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
+};
+
+// event handler to suppress keyboard/mouse events when blocking
+function handler(e) {
+       // allow tab navigation (conditionally)
+       if (e.keyCode && e.keyCode == 9) {
+               if (pageBlock && e.data.constrainTabKey) {
+                       var els = pageBlockEls;
+                       var fwd = !e.shiftKey && e.target == els[els.length-1];
+                       var back = e.shiftKey && e.target == els[0];
+                       if (fwd || back) {
+                               setTimeout(function(){focus(back)},10);
+                               return false;
+                       }
+               }
+       }
+       // allow events within the message content
+       if ($(e.target).parents('div.blockMsg').length > 0)
+               return true;
+
+       // allow events for content that is not being blocked
+       return $(e.target).parents().children().filter('div.blockUI').length == 0;
+};
+
+function focus(back) {
+       if (!pageBlockEls)
+               return;
+       var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
+       if (e)
+               e.focus();
+};
+
+function center(el, x, y) {
+       var p = el.parentNode, s = el.style;
+       var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
+       var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
+       if (x) s.left = l > 0 ? (l+'px') : '0';
+       if (y) s.top  = t > 0 ? (t+'px') : '0';
+};
+
+function sz(el, p) {
+       return parseInt($.css(el,p))||0;
+};
+
+})(jQuery);
\ No newline at end of file
diff --git a/redakcja/static/js/jquery.elastic.js b/redakcja/static/js/jquery.elastic.js
new file mode 100644 (file)
index 0000000..24e16f4
--- /dev/null
@@ -0,0 +1,6 @@
+(function(jQuery){jQuery.fn.extend({elastic:function(){var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];return this.each(function(){if(this.type!='textarea'){return false;}
+var $textarea=jQuery(this),$twin=jQuery('<div />').css({'position':'absolute','display':'none','word-wrap':'break-word'}),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;if(maxheight<0){maxheight=Number.MAX_VALUE;}
+$twin.appendTo($textarea.parent());var i=mimics.length;while(i--){$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));}
+function setHeightAndOverflow(height,overflow){curratedHeight=Math.floor(parseInt(height,10));if($textarea.height()!=curratedHeight){$textarea.css({'height':curratedHeight+'px','overflow':overflow});}}
+function update(){var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');var twinContent=$twin.html();if(textareaContent+'&nbsp;'!=twinContent){$twin.html(textareaContent+'&nbsp;');if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){var goalheight=$twin.height()+lineHeight;if(goalheight>=maxheight){setHeightAndOverflow(maxheight,'auto');}else if(goalheight<=minheight){setHeightAndOverflow(minheight,'hidden');}else{setHeightAndOverflow(goalheight,'hidden');}}}}
+$textarea.css({'overflow':'hidden'});$textarea.keyup(function(){update();});$textarea.live('input paste',function(e){setTimeout(update,250);});update();});}});})(jQuery);
\ No newline at end of file
diff --git a/redakcja/static/js/lib/codemirror/codemirror.js b/redakcja/static/js/lib/codemirror/codemirror.js
new file mode 100644 (file)
index 0000000..8c62dab
--- /dev/null
@@ -0,0 +1,295 @@
+/* CodeMirror main module
+ *
+ * Implements the CodeMirror constructor and prototype, which take care
+ * of initializing the editor frame, and providing the outside interface.
+ */
+
+// The CodeMirrorConfig object is used to specify a default
+// configuration. If you specify such an object before loading this
+// file, the values you put into it will override the defaults given
+// below. You can also assign to it after loading.
+var CodeMirrorConfig = window.CodeMirrorConfig || {};
+
+var CodeMirror = (function(){
+  function setDefaults(object, defaults) {
+    for (var option in defaults) {
+      if (!object.hasOwnProperty(option))
+        object[option] = defaults[option];
+    }
+  }
+  function forEach(array, action) {
+    for (var i = 0; i < array.length; i++)
+      action(array[i]);
+  }
+
+  // These default options can be overridden by passing a set of
+  // options to a specific CodeMirror constructor. See manual.html for
+  // their meaning.
+  setDefaults(CodeMirrorConfig, {
+    stylesheet: "",
+    path: "",
+    parserfile: [],
+    basefiles: ["util.js", "stringstream.js", "select.js", "undo.js", "editor.js", "tokenize.js"],
+    iframeClass: null,
+    passDelay: 200,
+    passTime: 50,
+    continuousScanning: false,
+    saveFunction: null,
+    onChange: null,
+    undoDepth: 50,
+    undoDelay: 800,
+    disableSpellcheck: true,
+    textWrapping: true,
+    readOnly: false,
+    width: "100%",
+    height: "300px",
+    autoMatchParens: false,
+    parserConfig: null,
+    tabMode: "indent", // or "spaces", "default", "shift"
+    reindentOnLoad: false,
+    activeTokens: null,
+    cursorActivity: null,
+    lineNumbers: false,
+    indentUnit: 2
+  });
+
+  function wrapLineNumberDiv(place) {
+    return function(node) {
+      var container = document.createElement("div"),
+          nums = document.createElement("div"),
+          scroller = document.createElement("div");
+      container.style.position = "relative";
+      nums.style.position = "absolute";
+      nums.style.height = "100%";
+      if (nums.style.setExpression) {
+        try {nums.style.setExpression("height", "this.previousSibling.offsetHeight + 'px'");}
+        catch(e) {} // Seems to throw 'Not Implemented' on some IE8 versions
+      }
+      nums.style.top = "0px";
+      nums.style.overflow = "hidden";
+      place(container);
+      container.appendChild(node);
+      container.appendChild(nums);
+      scroller.className = "CodeMirror-line-numbers";
+      nums.appendChild(scroller);
+    }
+  }
+
+  function applyLineNumbers(frame) {
+    var win = frame.contentWindow, doc = win.document,
+        nums = frame.nextSibling, scroller = nums.firstChild;
+
+    var nextNum = 1;
+
+    function update() {
+      var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
+      for (var n = Math.ceil(diff / 10); n > 0; n--) {
+        var div = document.createElement("div");
+        div.appendChild(document.createTextNode(nextNum++));
+        scroller.appendChild(div);
+      }
+      nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
+    }
+
+    update();
+    win.addEventHandler(win, "scroll", update);
+    win.addEventHandler(win, "resize", update);
+  }
+
+  function CodeMirror(place, options) {
+    // Backward compatibility for deprecated options.
+    if (options.dumbTabs) options.tabMode = "spaces";
+    else if (options.normalTab) options.tabMode = "default";
+
+    // Use passed options, if any, to override defaults.
+    this.options = options = options || {};
+    setDefaults(options, CodeMirrorConfig);
+
+    var frame = this.frame = document.createElement("iframe");
+    if (options.iframeClass) frame.className = options.iframeClass;
+    frame.frameBorder = 0;
+    frame.src = "javascript:false;";
+    frame.style.border = "0";
+    frame.style.width = options.width;
+    frame.style.height = options.height;
+    // display: block occasionally suppresses some Firefox bugs, so we
+    // always add it, redundant as it sounds.
+    frame.style.display = "block";
+
+    if (place.appendChild) {
+      var node = place;
+      place = function(n){node.appendChild(n);};
+    }
+    if (options.lineNumbers) place = wrapLineNumberDiv(place);
+    place(frame);
+
+    // Link back to this object, so that the editor can fetch options
+    // and add a reference to itself.
+    frame.CodeMirror = this;
+    this.win = frame.contentWindow;
+
+    if (typeof options.parserfile == "string")
+      options.parserfile = [options.parserfile];
+    if (typeof options.stylesheet == "string")
+      options.stylesheet = [options.stylesheet];
+
+    var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>"];
+    // Hack to work around a bunch of IE8-specific problems.
+    html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>");
+    forEach(options.stylesheet, function(file) {
+      html.push("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file + "\"/>");
+    });
+    forEach(options.basefiles.concat(options.parserfile), function(file) {
+      html.push("<script type=\"text/javascript\" src=\"" + options.path + file + "\"></script>");
+    });
+    html.push("</head><body style=\"border-width: 0;\" class=\"editbox\" spellcheck=\"" +
+              (options.disableSpellcheck ? "false" : "true") + "\"></body></html>");
+
+    var doc = this.win.document;
+    doc.open();
+    doc.write(html.join(""));
+    doc.close();
+  }
+
+  CodeMirror.prototype = {
+    init: function() {
+      if (this.options.initCallback) this.options.initCallback(this);
+      if (this.options.lineNumbers) applyLineNumbers(this.frame);
+      if (this.options.reindentOnLoad) this.reindent();
+    },
+
+    getCode: function() {return this.editor.getCode();},
+    setCode: function(code) {this.editor.importCode(code);},
+    selection: function() {return this.editor.selectedText();},
+    reindent: function() {this.editor.reindent();},
+    reindentSelection: function() {this.editor.reindentSelection(null);},
+
+    focus: function() {
+      this.win.focus();
+      if (this.editor.selectionSnapshot) // IE hack
+        this.win.select.selectCoords(this.win, this.editor.selectionSnapshot);
+    },
+    replaceSelection: function(text) {
+      this.focus();
+      this.editor.replaceSelection(text);
+      return true;
+    },
+    replaceChars: function(text, start, end) {
+      this.editor.replaceChars(text, start, end);
+    },
+    getSearchCursor: function(string, fromCursor) {
+      return this.editor.getSearchCursor(string, fromCursor);
+    },
+
+    undo: function() {this.editor.history.undo();},
+    redo: function() {this.editor.history.redo();},
+    historySize: function() {return this.editor.history.historySize();},
+    clearHistory: function() {this.editor.history.clear();},
+
+    grabKeys: function(callback, filter) {this.editor.grabKeys(callback, filter);},
+    ungrabKeys: function() {this.editor.ungrabKeys();},
+
+    setParser: function(name) {this.editor.setParser(name);},
+
+    cursorPosition: function(start) {
+      if (this.win.select.ie_selection) this.focus();
+      return this.editor.cursorPosition(start);
+    },
+    firstLine: function() {return this.editor.firstLine();},
+    lastLine: function() {return this.editor.lastLine();},
+    nextLine: function(line) {return this.editor.nextLine(line);},
+    prevLine: function(line) {return this.editor.prevLine(line);},
+    lineContent: function(line) {return this.editor.lineContent(line);},
+    setLineContent: function(line, content) {this.editor.setLineContent(line, content);},
+    insertIntoLine: function(line, position, content) {this.editor.insertIntoLine(line, position, content);},
+    selectLines: function(startLine, startOffset, endLine, endOffset) {
+      this.win.focus();
+      this.editor.selectLines(startLine, startOffset, endLine, endOffset);
+    },
+    nthLine: function(n) {
+      var line = this.firstLine();
+      for (; n > 1 && line !== false; n--)
+        line = this.nextLine(line);
+      return line;
+    },
+    lineNumber: function(line) {
+      var num = 0;
+      while (line !== false) {
+        num++;
+        line = this.prevLine(line);
+      }
+      return num;
+    },
+
+    // Old number-based line interface
+    jumpToLine: function(n) {
+      this.selectLines(this.nthLine(n), 0);
+      this.win.focus();
+    },
+    currentLine: function() {
+      return this.lineNumber(this.cursorPosition().line);
+    }
+  };
+
+  CodeMirror.InvalidLineHandle = {toString: function(){return "CodeMirror.InvalidLineHandle";}};
+
+  CodeMirror.replace = function(element) {
+    if (typeof element == "string")
+      element = document.getElementById(element);
+    return function(newElement) {
+      element.parentNode.replaceChild(newElement, element);
+    };
+  };
+
+  CodeMirror.fromTextArea = function(area, options) {
+    if (typeof area == "string")
+      area = document.getElementById(area);
+
+    options = options || {};
+    if (area.style.width && options.width == null)
+      options.width = area.style.width;
+    if (area.style.height && options.height == null)
+      options.height = area.style.height;
+    if (options.content == null) options.content = area.value;
+
+    if (area.form) {
+      function updateField() {
+        area.value = mirror.getCode();
+      }
+      if (typeof area.form.addEventListener == "function")
+        area.form.addEventListener("submit", updateField, false);
+      else
+        area.form.attachEvent("onsubmit", updateField);
+    }
+
+    function insert(frame) {
+      if (area.nextSibling)
+        area.parentNode.insertBefore(frame, area.nextSibling);
+      else
+        area.parentNode.appendChild(frame);
+    }
+
+    area.style.display = "none";
+    var mirror = new CodeMirror(insert, options);
+    return mirror;
+  };
+
+  CodeMirror.isProbablySupported = function() {
+    // This is rather awful, but can be useful.
+    var match;
+    if (window.opera)
+      return Number(window.opera.version()) >= 9.52;
+    else if (/Apple Computers, Inc/.test(navigator.vendor) && (match = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./)))
+      return Number(match[1]) >= 3;
+    else if (document.selection && window.ActiveXObject && (match = navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/)))
+      return Number(match[1]) >= 6;
+    else if (match = navigator.userAgent.match(/gecko\/(\d{8})/i))
+      return Number(match[1]) >= 20050901;
+    else if (match = navigator.userAgent.match(/AppleWebKit\/(\d+)/))
+      return Number(match[1]) >= 525;
+    else
+      return null;
+  };
+
+  return CodeMirror;
+})();
diff --git a/redakcja/static/js/lib/codemirror/editor.js b/redakcja/static/js/lib/codemirror/editor.js
new file mode 100644 (file)
index 0000000..f5fe841
--- /dev/null
@@ -0,0 +1,1320 @@
+/* The Editor object manages the content of the editable frame. It
+ * catches events, colours nodes, and indents lines. This file also
+ * holds some functions for transforming arbitrary DOM structures into
+ * plain sequences of <span> and <br> elements
+ */
+
+// Make sure a string does not contain two consecutive 'collapseable'
+// whitespace characters.
+function makeWhiteSpace(n) {
+  var buffer = [], nb = true;
+  for (; n > 0; n--) {
+    buffer.push((nb || n == 1) ? nbsp : " ");
+    nb = !nb;
+  }
+  return buffer.join("");
+}
+
+// Create a set of white-space characters that will not be collapsed
+// by the browser, but will not break text-wrapping either.
+function fixSpaces(string) {
+  if (string.charAt(0) == " ") string = nbsp + string.slice(1);
+  return string.replace(/\t/g, function(){return makeWhiteSpace(indentUnit);})
+    .replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);});
+}
+
+function cleanText(text) {
+  return text.replace(/\u00a0/g, " ").replace(/\u200b/g, "");
+}
+
+// Create a SPAN node with the expected properties for document part
+// spans.
+function makePartSpan(value, doc) {
+  var text = value;
+  if (value.nodeType == 3) text = value.nodeValue;
+  else value = doc.createTextNode(text);
+
+  var span = doc.createElement("SPAN");
+  span.isPart = true;
+  span.appendChild(value);
+  span.currentText = text;
+  return span;
+}
+
+// On webkit, when the last BR of the document does not have text
+// behind it, the cursor can not be put on the line after it. This
+// makes pressing enter at the end of the document occasionally do
+// nothing (or at least seem to do nothing). To work around it, this
+// function makes sure the document ends with a span containing a
+// zero-width space character. The traverseDOM iterator filters such
+// character out again, so that the parsers won't see them. This
+// function is called from a few strategic places to make sure the
+// zwsp is restored after the highlighting process eats it.
+var webkitLastLineHack = webkit ?
+  function(container) {
+    var last = container.lastChild;
+    if (!last || !last.isPart || last.textContent != "\u200b")
+      container.appendChild(makePartSpan("\u200b", container.ownerDocument));
+  } : function() {};
+
+var Editor = (function(){
+  // The HTML elements whose content should be suffixed by a newline
+  // when converting them to flat text.
+  var newlineElements = {"P": true, "DIV": true, "LI": true};
+
+  function asEditorLines(string) {
+    var tab = makeWhiteSpace(indentUnit);
+    return map(string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n").split("\n"), fixSpaces);
+  }
+
+  // Helper function for traverseDOM. Flattens an arbitrary DOM node
+  // into an array of textnodes and <br> tags.
+  function simplifyDOM(root, atEnd) {
+    var doc = root.ownerDocument;
+    var result = [];
+    var leaving = true;
+
+    function simplifyNode(node, top) {
+      if (node.nodeType == 3) {
+        var text = node.nodeValue = fixSpaces(node.nodeValue.replace(/[\r\u200b]/g, "").replace(/\n/g, " "));
+        if (text.length) leaving = false;
+        result.push(node);
+      }
+      else if (node.nodeName == "BR" && node.childNodes.length == 0) {
+        leaving = true;
+        result.push(node);
+      }
+      else {
+        forEach(node.childNodes, simplifyNode);
+        if (!leaving && newlineElements.hasOwnProperty(node.nodeName)) {
+          leaving = true;
+          if (!atEnd || !top)
+            result.push(doc.createElement("BR"));
+        }
+      }
+    }
+
+    simplifyNode(root, true);
+    return result;
+  }
+
+  // Creates a MochiKit-style iterator that goes over a series of DOM
+  // nodes. The values it yields are strings, the textual content of
+  // the nodes. It makes sure that all nodes up to and including the
+  // one whose text is being yielded have been 'normalized' to be just
+  // <span> and <br> elements.
+  // See the story.html file for some short remarks about the use of
+  // continuation-passing style in this iterator.
+  function traverseDOM(start){
+    function yield(value, c){cc = c; return value;}
+    function push(fun, arg, c){return function(){return fun(arg, c);};}
+    function stop(){cc = stop; throw StopIteration;};
+    var cc = push(scanNode, start, stop);
+    var owner = start.ownerDocument;
+    var nodeQueue = [];
+
+    // Create a function that can be used to insert nodes after the
+    // one given as argument.
+    function pointAt(node){
+      var parent = node.parentNode;
+      var next = node.nextSibling;
+      return function(newnode) {
+        parent.insertBefore(newnode, next);
+      };
+    }
+    var point = null;
+
+    // Insert a normalized node at the current point. If it is a text
+    // node, wrap it in a <span>, and give that span a currentText
+    // property -- this is used to cache the nodeValue, because
+    // directly accessing nodeValue is horribly slow on some browsers.
+    // The dirty property is used by the highlighter to determine
+    // which parts of the document have to be re-highlighted.
+    function insertPart(part){
+      var text = "\n";
+      if (part.nodeType == 3) {
+        select.snapshotChanged();
+        part = makePartSpan(part, owner);
+        text = part.currentText;
+      }
+      part.dirty = true;
+      nodeQueue.push(part);
+      point(part);
+      return text;
+    }
+
+    // Extract the text and newlines from a DOM node, insert them into
+    // the document, and yield the textual content. Used to replace
+    // non-normalized nodes.
+    function writeNode(node, c, end) {
+      var toYield = [];
+      forEach(simplifyDOM(node, end), function(part) {
+        toYield.push(insertPart(part));
+      });
+      return yield(toYield.join(""), c);
+    }
+
+    // Check whether a node is a normalized <span> element.
+    function partNode(node){
+      if (node.isPart && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
+        node.currentText = node.firstChild.nodeValue;
+        return !/[\n\t\r]/.test(node.currentText);
+      }
+      return false;
+    }
+
+    // Handle a node. Add its successor to the continuation if there
+    // is one, find out whether the node is normalized. If it is,
+    // yield its content, otherwise, normalize it (writeNode will take
+    // care of yielding).
+    function scanNode(node, c){
+      if (node.nextSibling)
+        c = push(scanNode, node.nextSibling, c);
+
+      if (partNode(node)){
+        nodeQueue.push(node);
+        return yield(node.currentText, c);
+      }
+      else if (node.nodeName == "BR") {
+        nodeQueue.push(node);
+        return yield("\n", c);
+      }
+      else {
+        var end = !node.nextSibling;
+        point = pointAt(node);
+        removeElement(node);
+        return writeNode(node, c, end);
+      }
+    }
+
+    // MochiKit iterators are objects with a next function that
+    // returns the next value or throws StopIteration when there are
+    // no more values.
+    return {next: function(){return cc();}, nodes: nodeQueue};
+  }
+
+  // Determine the text size of a processed node.
+  function nodeSize(node) {
+    if (node.nodeName == "BR")
+      return 1;
+    else
+      return node.currentText.length;
+  }
+
+  // Search backwards through the top-level nodes until the next BR or
+  // the start of the frame.
+  function startOfLine(node) {
+    while (node && node.nodeName != "BR") node = node.previousSibling;
+    return node;
+  }
+  function endOfLine(node, container) {
+    if (!node) node = container.firstChild;
+    else if (node.nodeName == "BR") node = node.nextSibling;
+
+    while (node && node.nodeName != "BR") node = node.nextSibling;
+    return node;
+  }
+
+  function time() {return new Date().getTime();}
+
+  // Client interface for searching the content of the editor. Create
+  // these by calling CodeMirror.getSearchCursor. To use, call
+  // findNext on the resulting object -- this returns a boolean
+  // indicating whether anything was found, and can be called again to
+  // skip to the next find. Use the select and replace methods to
+  // actually do something with the found locations.
+  function SearchCursor(editor, string, fromCursor) {
+    this.editor = editor;
+    this.history = editor.history;
+    this.history.commit();
+
+    // Are we currently at an occurrence of the search string?
+    this.atOccurrence = false;
+    // The object stores a set of nodes coming after its current
+    // position, so that when the current point is taken out of the
+    // DOM tree, we can still try to continue.
+    this.fallbackSize = 15;
+    var cursor;
+    // Start from the cursor when specified and a cursor can be found.
+    if (fromCursor && (cursor = select.cursorPos(this.editor.container))) {
+      this.line = cursor.node;
+      this.offset = cursor.offset;
+    }
+    else {
+      this.line = null;
+      this.offset = 0;
+    }
+    this.valid = !!string;
+
+    // Create a matcher function based on the kind of string we have.
+    var target = string.split("\n"), self = this;
+    this.matches = (target.length == 1) ?
+      // For one-line strings, searching can be done simply by calling
+      // indexOf on the current line.
+      function() {
+        var match = cleanText(self.history.textAfter(self.line).slice(self.offset)).indexOf(string);
+        if (match > -1)
+          return {from: {node: self.line, offset: self.offset + match},
+                  to: {node: self.line, offset: self.offset + match + string.length}};
+      } :
+      // Multi-line strings require internal iteration over lines, and
+      // some clunky checks to make sure the first match ends at the
+      // end of the line and the last match starts at the start.
+      function() {
+        var firstLine = cleanText(self.history.textAfter(self.line).slice(self.offset));
+        var match = firstLine.lastIndexOf(target[0]);
+        if (match == -1 || match != firstLine.length - target[0].length)
+          return false;
+        var startOffset = self.offset + match;
+
+        var line = self.history.nodeAfter(self.line);
+        for (var i = 1; i < target.length - 1; i++) {
+          if (cleanText(self.history.textAfter(line)) != target[i])
+            return false;
+          line = self.history.nodeAfter(line);
+        }
+
+        if (cleanText(self.history.textAfter(line)).indexOf(target[target.length - 1]) != 0)
+          return false;
+
+        return {from: {node: self.line, offset: startOffset},
+                to: {node: line, offset: target[target.length - 1].length}};
+      };
+  }
+
+  SearchCursor.prototype = {
+    findNext: function() {
+      if (!this.valid) return false;
+      this.atOccurrence = false;
+      var self = this;
+
+      // Go back to the start of the document if the current line is
+      // no longer in the DOM tree.
+      if (this.line && !this.line.parentNode) {
+        this.line = null;
+        this.offset = 0;
+      }
+
+      // Set the cursor's position one character after the given
+      // position.
+      function saveAfter(pos) {
+        if (self.history.textAfter(pos.node).length > pos.offset) {
+          self.line = pos.node;
+          self.offset = pos.offset + 1;
+        }
+        else {
+          self.line = self.history.nodeAfter(pos.node);
+          self.offset = 0;
+        }
+      }
+
+      while (true) {
+        var match = this.matches();
+        // Found the search string.
+        if (match) {
+          this.atOccurrence = match;
+          saveAfter(match.from);
+          return true;
+        }
+        this.line = this.history.nodeAfter(this.line);
+        this.offset = 0;
+        // End of document.
+        if (!this.line) {
+          this.valid = false;
+          return false;
+        }
+      }
+    },
+
+    select: function() {
+      if (this.atOccurrence) {
+        select.setCursorPos(this.editor.container, this.atOccurrence.from, this.atOccurrence.to);
+        select.scrollToCursor(this.editor.container);
+      }
+    },
+
+    replace: function(string) {
+      if (this.atOccurrence) {
+        var end = this.editor.replaceRange(this.atOccurrence.from, this.atOccurrence.to, string);
+        this.line = end.node;
+        this.offset = end.offset;
+        this.atOccurrence = false;
+      }
+    }
+  };
+
+  // The Editor object is the main inside-the-iframe interface.
+  function Editor(options) {
+    this.options = options;
+    window.indentUnit = options.indentUnit;
+    this.parent = parent;
+    this.doc = document;
+    var container = this.container = this.doc.body;
+    this.win = window;
+    this.history = new History(container, options.undoDepth, options.undoDelay,
+                               this, options.onChange);
+    var self = this;
+
+    if (!Editor.Parser)
+      throw "No parser loaded.";
+    if (options.parserConfig && Editor.Parser.configure)
+      Editor.Parser.configure(options.parserConfig);
+
+    if (!options.readOnly)
+      select.setCursorPos(container, {node: null, offset: 0});
+
+    this.dirty = [];
+    if (options.content)
+      this.importCode(options.content);
+    else // FF acts weird when the editable document is completely empty
+      container.appendChild(this.doc.createElement("BR"));
+
+    if (!options.readOnly) {
+      if (options.continuousScanning !== false) {
+        this.scanner = this.documentScanner(options.passTime);
+        this.delayScanning();
+      }
+
+      function setEditable() {
+        // In IE, designMode frames can not run any scripts, so we use
+        // contentEditable instead.
+        if (document.body.contentEditable != undefined && internetExplorer)
+          document.body.contentEditable = "true";
+        else
+          document.designMode = "on";
+
+        document.documentElement.style.borderWidth = "0";
+        if (!options.textWrapping)
+          container.style.whiteSpace = "nowrap";
+      }
+
+      // If setting the frame editable fails, try again when the user
+      // focus it (happens when the frame is not visible on
+      // initialisation, in Firefox).
+      try {
+        setEditable();
+      }
+      catch(e) {
+        var focusEvent = addEventHandler(document, "focus", function() {
+          focusEvent();
+          setEditable();
+        }, true);
+      }
+
+      addEventHandler(document, "keydown", method(this, "keyDown"));
+      addEventHandler(document, "keypress", method(this, "keyPress"));
+      addEventHandler(document, "keyup", method(this, "keyUp"));
+
+      function cursorActivity() {self.cursorActivity(false);}
+      addEventHandler(document.body, "mouseup", cursorActivity);
+      addEventHandler(document.body, "cut", cursorActivity);
+
+      addEventHandler(document.body, "paste", function(event) {
+        cursorActivity();
+        var text = null;
+        try {
+          var clipboardData = event.clipboardData || window.clipboardData;
+          if (clipboardData) text = clipboardData.getData('Text');
+        }
+        catch(e) {}
+        if (text !== null) {
+          self.replaceSelection(text);
+          event.stop();
+        }
+      });
+
+      addEventHandler(document.body, "beforepaste", method(this, "reroutePasteEvent"));
+
+      if (this.options.autoMatchParens)
+        addEventHandler(document.body, "click", method(this, "scheduleParenBlink"));
+    }
+    else if (!options.textWrapping) {
+      container.style.whiteSpace = "nowrap";
+    }
+  }
+
+  function isSafeKey(code) {
+    return (code >= 16 && code <= 18) || // shift, control, alt
+           (code >= 33 && code <= 40); // arrows, home, end
+  }
+
+  Editor.prototype = {
+    // Import a piece of code into the editor.
+    importCode: function(code) {
+      this.history.push(null, null, asEditorLines(code));
+      this.history.reset();
+    },
+
+    // Extract the code from the editor.
+    getCode: function() {
+      if (!this.container.firstChild)
+        return "";
+
+      var accum = [];
+      select.markSelection(this.win);
+      forEach(traverseDOM(this.container.firstChild), method(accum, "push"));
+      webkitLastLineHack(this.container);
+      select.selectMarked();
+      return cleanText(accum.join(""));
+    },
+
+    checkLine: function(node) {
+      if (node === false || !(node == null || node.parentNode == this.container))
+        throw parent.CodeMirror.InvalidLineHandle;
+    },
+
+    cursorPosition: function(start) {
+      if (start == null) start = true;
+      var pos = select.cursorPos(this.container, start);
+      if (pos) return {line: pos.node, character: pos.offset};
+      else return {line: null, character: 0};
+    },
+
+    firstLine: function() {
+      return null;
+    },
+
+    lastLine: function() {
+      if (this.container.lastChild) return startOfLine(this.container.lastChild);
+      else return null;
+    },
+
+    nextLine: function(line) {
+      this.checkLine(line);
+      var end = endOfLine(line, this.container);
+      return end || false;
+    },
+
+    prevLine: function(line) {
+      this.checkLine(line);
+      if (line == null) return false;
+      return startOfLine(line.previousSibling);
+    },
+
+    selectLines: function(startLine, startOffset, endLine, endOffset) {
+      this.checkLine(startLine);
+      var start = {node: startLine, offset: startOffset}, end = null;
+      if (endOffset !== undefined) {
+        this.checkLine(endLine);
+        end = {node: endLine, offset: endOffset};
+      }
+      select.setCursorPos(this.container, start, end);
+      select.scrollToCursor(this.container);
+    },
+
+    lineContent: function(line) {
+      this.checkLine(line);
+      var accum = [];
+      for (line = line ? line.nextSibling : this.container.firstChild;
+           line && line.nodeName != "BR"; line = line.nextSibling)
+        accum.push(nodeText(line));
+      return cleanText(accum.join(""));
+    },
+
+    setLineContent: function(line, content) {
+      this.history.commit();
+      this.replaceRange({node: line, offset: 0},
+                        {node: line, offset: this.history.textAfter(line).length},
+                        content);
+      this.addDirtyNode(line);
+      this.scheduleHighlight();
+    },
+
+    insertIntoLine: function(line, position, content) {
+      var before = null;
+      if (position == "end") {
+        before = endOfLine(line, this.container);
+      }
+      else {
+        for (var cur = line ? line.nextSibling : this.container.firstChild; cur; cur = cur.nextSibling) {
+          if (position == 0) {
+            before = cur;
+            break;
+          }
+          var text = (cur.innerText || cur.textContent || cur.nodeValue || "");
+          if (text.length > position) {
+            before = cur.nextSibling;
+            content = text.slice(0, position) + content + text.slice(position);
+            removeElement(cur);
+            break;
+          }
+          position -= text.length;
+        }
+      }
+
+      var lines = asEditorLines(content), doc = this.container.ownerDocument;
+      for (var i = 0; i < lines.length; i++) {
+        if (i > 0) this.container.insertBefore(doc.createElement("BR"), before);
+        this.container.insertBefore(makePartSpan(lines[i], doc), before);
+      }
+      this.addDirtyNode(line);
+      this.scheduleHighlight();
+    },
+
+    // Retrieve the selected text.
+    selectedText: function() {
+      var h = this.history;
+      h.commit();
+
+      var start = select.cursorPos(this.container, true),
+          end = select.cursorPos(this.container, false);
+      if (!start || !end) return "";
+
+      if (start.node == end.node)
+        return h.textAfter(start.node).slice(start.offset, end.offset);
+
+      var text = [h.textAfter(start.node).slice(start.offset)];
+      for (var pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos))
+        text.push(h.textAfter(pos));
+      text.push(h.textAfter(end.node).slice(0, end.offset));
+      return cleanText(text.join("\n"));
+    },
+
+    // Replace the selection with another p
+    // iece of text.
+    replaceSelection: function(text) {
+      this.history.commit();
+
+      var start = select.cursorPos(this.container, true),
+          end = select.cursorPos(this.container, false);
+      if (!start || !end) return;
+
+      end = this.replaceRange(start, end, text);
+      // select.setCursorPos(this.container, end);
+      webkitLastLineHack(this.container);
+    },
+
+    reroutePasteEvent: function() {
+      if (this.capturingPaste || window.opera) return;
+      this.capturingPaste = true;
+      var te = parent.document.createElement("TEXTAREA");
+      te.style.position = "absolute";
+      te.style.left = "-500px";
+      te.style.width = "10px";
+      te.style.top = nodeTop(frameElement) + "px";
+      parent.document.body.appendChild(te);
+      parent.focus();
+      te.focus();
+
+      var self = this;
+      this.parent.setTimeout(function() {
+        self.capturingPaste = false;
+        self.win.focus();
+        if (self.selectionSnapshot) // IE hack
+          self.win.select.selectCoords(self.win, self.selectionSnapshot);
+        var text = te.value;
+        if (text) self.replaceSelection(text);
+        removeElement(te);
+      }, 10);
+    },
+
+    replaceRange: function(from, to, text) {
+      var lines = asEditorLines(text);
+      lines[0] = this.history.textAfter(from.node).slice(0, from.offset) + lines[0];
+      var lastLine = lines[lines.length - 1];
+      lines[lines.length - 1] = lastLine + this.history.textAfter(to.node).slice(to.offset);
+      var end = this.history.nodeAfter(to.node);
+      this.history.push(from.node, end, lines);
+      return {node: this.history.nodeBefore(end),
+              offset: lastLine.length};
+    },
+
+    getSearchCursor: function(string, fromCursor) {
+      return new SearchCursor(this, string, fromCursor);
+    },
+
+    // Re-indent the whole buffer
+    reindent: function() {
+      if (this.container.firstChild)
+        this.indentRegion(null, this.container.lastChild);
+    },
+
+    reindentSelection: function(direction) {
+      if (!select.somethingSelected(this.win)) {
+        this.indentAtCursor(direction);
+      }
+      else {
+        var start = select.selectionTopNode(this.container, true),
+            end = select.selectionTopNode(this.container, false);
+        if (start === false || end === false) return;
+        this.indentRegion(start, end, direction);
+      }
+    },
+
+    grabKeys: function(eventHandler, filter) {
+      this.frozen = eventHandler;
+      this.keyFilter = filter;
+    },
+    ungrabKeys: function() {
+      this.frozen = "leave";
+      this.keyFilter = null;
+    },
+
+    setParser: function(name) {
+      Editor.Parser = window[name];
+      if (this.container.firstChild) {
+        forEach(this.container.childNodes, function(n) {
+          if (n.nodeType != 3) n.dirty = true;
+        });
+        this.addDirtyNode(this.firstChild);
+        this.scheduleHighlight();
+      }
+    },
+
+    // Intercept enter and tab, and assign their new functions.
+    keyDown: function(event) {
+      if (this.frozen == "leave") this.frozen = null;
+      if (this.frozen && (!this.keyFilter || this.keyFilter(event))) {
+        event.stop();
+        this.frozen(event);
+        return;
+      }
+
+      var code = event.keyCode;
+      // Don't scan when the user is typing.
+      this.delayScanning();
+      // Schedule a paren-highlight event, if configured.
+      if (this.options.autoMatchParens)
+        this.scheduleParenBlink();
+
+      // The various checks for !altKey are there because AltGr sets both
+      // ctrlKey and altKey to true, and should not be recognised as
+      // Control.
+      if (code == 13) { // enter
+        if (event.ctrlKey && !event.altKey) {
+          this.reparseBuffer();
+        }
+        else {
+          select.insertNewlineAtCursor(this.win);
+          this.indentAtCursor();
+          select.scrollToCursor(this.container);
+        }
+        event.stop();
+      }
+      else if (code == 9 && this.options.tabMode != "default") { // tab
+        this.handleTab(!event.ctrlKey && !event.shiftKey);
+        event.stop();
+      }
+      else if (code == 32 && event.shiftKey && this.options.tabMode == "default") { // space
+        this.handleTab(true);
+        event.stop();
+      }
+      else if (code == 36 && !event.shiftKey && !event.ctrlKey) { // home
+        if (this.home())
+          event.stop();
+      }
+      else if ((code == 219 || code == 221) && event.ctrlKey && !event.altKey) { // [, ]
+        this.blinkParens(event.shiftKey);
+        event.stop();
+      }
+      else if (event.metaKey && !event.shiftKey && (code == 37 || code == 39)) { // Meta-left/right
+        var cursor = select.selectionTopNode(this.container);
+        if (cursor === false || !this.container.firstChild) return;
+
+        if (code == 37) select.focusAfterNode(startOfLine(cursor), this.container);
+        else {
+          var end = endOfLine(cursor, this.container);
+          select.focusAfterNode(end ? end.previousSibling : this.container.lastChild, this.container);
+        }
+        event.stop();
+      }
+      else if ((event.ctrlKey || event.metaKey) && !event.altKey) {
+        if ((event.shiftKey && code == 90) || code == 89) { // shift-Z, Y
+          select.scrollToNode(this.history.redo());
+          event.stop();
+        }
+        else if (code == 90 || (safari && code == 8)) { // Z, backspace
+          select.scrollToNode(this.history.undo());
+          event.stop();
+        }
+        else if (code == 83 && this.options.saveFunction) { // S
+          this.options.saveFunction();
+          event.stop();
+        }
+      }
+    },
+
+    // Check for characters that should re-indent the current line,
+    // and prevent Opera from handling enter and tab anyway.
+    keyPress: function(event) {
+      var electric = Editor.Parser.electricChars, self = this;
+      // Hack for Opera, and Firefox on OS X, in which stopping a
+      // keydown event does not prevent the associated keypress event
+      // from happening, so we have to cancel enter and tab again
+      // here.
+      if ((this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode))) ||
+          event.code == 13 || (event.code == 9 && this.options.tabMode != "default") ||
+          (event.keyCode == 32 && event.shiftKey && this.options.tabMode == "default"))
+        event.stop();
+      else if (electric && electric.indexOf(event.character) != -1)
+        this.parent.setTimeout(function(){self.indentAtCursor(null);}, 0);
+      else if ((event.character == "v" || event.character == "V")
+               && (event.ctrlKey || event.metaKey) && !event.altKey) // ctrl-V
+        this.reroutePasteEvent();
+    },
+
+    // Mark the node at the cursor dirty when a non-safe key is
+    // released.
+    keyUp: function(event) {
+      this.cursorActivity(isSafeKey(event.keyCode));
+    },
+
+    // Indent the line following a given <br>, or null for the first
+    // line. If given a <br> element, this must have been highlighted
+    // so that it has an indentation method. Returns the whitespace
+    // element that has been modified or created (if any).
+    indentLineAfter: function(start, direction) {
+      // whiteSpace is the whitespace span at the start of the line,
+      // or null if there is no such node.
+      var whiteSpace = start ? start.nextSibling : this.container.firstChild;
+      if (whiteSpace && !hasClass(whiteSpace, "whitespace"))
+        whiteSpace = null;
+
+      // Sometimes the start of the line can influence the correct
+      // indentation, so we retrieve it.
+      var firstText = whiteSpace ? whiteSpace.nextSibling : (start ? start.nextSibling : this.container.firstChild);
+      var nextChars = (start && firstText && firstText.currentText) ? firstText.currentText : "";
+
+      // Ask the lexical context for the correct indentation, and
+      // compute how much this differs from the current indentation.
+      var newIndent = 0, curIndent = whiteSpace ? whiteSpace.currentText.length : 0;
+      if (direction != null && this.options.tabMode == "shift")
+        newIndent = direction ? curIndent + indentUnit : Math.max(0, curIndent - indentUnit)
+      else if (start)
+        newIndent = start.indentation(nextChars, curIndent, direction);
+      else if (Editor.Parser.firstIndentation)
+        newIndent = Editor.Parser.firstIndentation(nextChars, curIndent, direction);
+      var indentDiff = newIndent - curIndent;
+
+      // If there is too much, this is just a matter of shrinking a span.
+      if (indentDiff < 0) {
+        if (newIndent == 0) {
+          if (firstText) select.snapshotMove(whiteSpace.firstChild, firstText.firstChild, 0);
+          removeElement(whiteSpace);
+          whiteSpace = null;
+        }
+        else {
+          select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true);
+          whiteSpace.currentText = makeWhiteSpace(newIndent);
+          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
+        }
+      }
+      // Not enough...
+      else if (indentDiff > 0) {
+        // If there is whitespace, we grow it.
+        if (whiteSpace) {
+          whiteSpace.currentText = makeWhiteSpace(newIndent);
+          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
+        }
+        // Otherwise, we have to add a new whitespace node.
+        else {
+          whiteSpace = makePartSpan(makeWhiteSpace(newIndent), this.doc);
+          whiteSpace.className = "whitespace";
+          if (start) insertAfter(whiteSpace, start);
+          else this.container.insertBefore(whiteSpace, this.container.firstChild);
+        }
+        if (firstText) select.snapshotMove(firstText.firstChild, whiteSpace.firstChild, curIndent, false, true);
+      }
+      if (indentDiff != 0) this.addDirtyNode(start);
+      return whiteSpace;
+    },
+
+    // Re-highlight the selected part of the document.
+    highlightAtCursor: function() {
+      var pos = select.selectionTopNode(this.container, true);
+      var to = select.selectionTopNode(this.container, false);
+      if (pos === false || to === false) return;
+
+      select.markSelection(this.win);
+      if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false)
+        return false;
+      select.selectMarked();
+      return true;
+    },
+
+    // When tab is pressed with text selected, the whole selection is
+    // re-indented, when nothing is selected, the line with the cursor
+    // is re-indented.
+    handleTab: function(direction) {
+      if (this.options.tabMode == "spaces")
+        select.insertTabAtCursor(this.win);
+      else
+        this.reindentSelection(direction);
+    },
+
+    home: function() {
+      var cur = select.selectionTopNode(this.container, true), start = cur;
+      if (cur === false || !(!cur || cur.isPart || cur.nodeName == "BR") || !this.container.firstChild)
+        return false;
+
+      while (cur && cur.nodeName != "BR") cur = cur.previousSibling;
+      var next = cur ? cur.nextSibling : this.container.firstChild;
+      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
+        select.focusAfterNode(next, this.container);
+      else
+        select.focusAfterNode(cur, this.container);
+
+      select.scrollToCursor(this.container);
+      return true;
+    },
+
+    // Delay (or initiate) the next paren blink event.
+    scheduleParenBlink: function() {
+      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
+      var self = this;
+      this.parenEvent = this.parent.setTimeout(function(){self.blinkParens();}, 300);
+    },
+
+    // Take the token before the cursor. If it contains a character in
+    // '()[]{}', search for the matching paren/brace/bracket, and
+    // highlight them in green for a moment, or red if no proper match
+    // was found.
+    blinkParens: function(jump) {
+      if (!window.select) return;
+      // Clear the event property.
+      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
+      this.parenEvent = null;
+
+      // Extract a 'paren' from a piece of text.
+      function paren(node) {
+        if (node.currentText) {
+          var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);
+          return match && match[1];
+        }
+      }
+      // Determine the direction a paren is facing.
+      function forward(ch) {
+        return /[\(\[\{]/.test(ch);
+      }
+
+      var ch, self = this, cursor = select.selectionTopNode(this.container, true);
+      if (!cursor || !this.highlightAtCursor()) return;
+      cursor = select.selectionTopNode(this.container, true);
+      if (!(cursor && ((ch = paren(cursor)) || (cursor = cursor.nextSibling) && (ch = paren(cursor)))))
+        return;
+      // We only look for tokens with the same className.
+      var className = cursor.className, dir = forward(ch), match = matching[ch];
+
+      // Since parts of the document might not have been properly
+      // highlighted, and it is hard to know in advance which part we
+      // have to scan, we just try, and when we find dirty nodes we
+      // abort, parse them, and re-try.
+      function tryFindMatch() {
+        var stack = [], ch, ok = true;;
+        for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) {
+          if (runner.className == className && runner.nodeName == "SPAN" && (ch = paren(runner))) {
+            if (forward(ch) == dir)
+              stack.push(ch);
+            else if (!stack.length)
+              ok = false;
+            else if (stack.pop() != matching[ch])
+              ok = false;
+            if (!stack.length) break;
+          }
+          else if (runner.dirty || runner.nodeName != "SPAN" && runner.nodeName != "BR") {
+            return {node: runner, status: "dirty"};
+          }
+        }
+        return {node: runner, status: runner && ok};
+      }
+      // Temporarily give the relevant nodes a colour.
+      function blink(node, ok) {
+        node.style.fontWeight = "bold";
+        node.style.color = ok ? "#8F8" : "#F88";
+        self.parent.setTimeout(function() {node.style.fontWeight = ""; node.style.color = "";}, 500);
+      }
+
+      while (true) {
+        var found = tryFindMatch();
+        if (found.status == "dirty") {
+          this.highlight(found.node, endOfLine(found.node));
+          // Needed because in some corner cases a highlight does not
+          // reach a node.
+          found.node.dirty = false;
+          continue;
+        }
+        else {
+          blink(cursor, found.status);
+          if (found.node) {
+            blink(found.node, found.status);
+            if (jump) select.focusAfterNode(found.node.previousSibling, this.container);
+          }
+          break;
+        }
+      }
+    },
+
+    // Adjust the amount of whitespace at the start of the line that
+    // the cursor is on so that it is indented properly.
+    indentAtCursor: function(direction) {
+      if (!this.container.firstChild) return;
+      // The line has to have up-to-date lexical information, so we
+      // highlight it first.
+      if (!this.highlightAtCursor()) return;
+      var cursor = select.selectionTopNode(this.container, false);
+      // If we couldn't determine the place of the cursor,
+      // there's nothing to indent.
+      if (cursor === false)
+        return;
+      var lineStart = startOfLine(cursor);
+      var whiteSpace = this.indentLineAfter(lineStart, direction);
+      if (cursor == lineStart && whiteSpace)
+          cursor = whiteSpace;
+      // This means the indentation has probably messed up the cursor.
+      if (cursor == whiteSpace)
+        select.focusAfterNode(cursor, this.container);
+    },
+
+    // Indent all lines whose start falls inside of the current
+    // selection.
+    indentRegion: function(start, end, direction) {
+      var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
+      if (end.nodeName != "BR") end = endOfLine(end, this.container);
+
+      do {
+        var next = endOfLine(current, this.container);
+        if (current) this.highlight(before, next, true);
+        this.indentLineAfter(current, direction);
+        before = current;
+        current = next;
+      } while (current != end);
+      select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0});
+    },
+
+    // Find the node that the cursor is in, mark it as dirty, and make
+    // sure a highlight pass is scheduled.
+    cursorActivity: function(safe) {
+      if (internetExplorer) {
+        this.container.createTextRange().execCommand("unlink");
+        this.selectionSnapshot = select.selectionCoords(this.win);
+      }
+
+      var activity = this.options.cursorActivity;
+      if (!safe || activity) {
+        var cursor = select.selectionTopNode(this.container, false);
+        if (cursor === false || !this.container.firstChild) return;
+        cursor = cursor || this.container.firstChild;
+        if (activity) activity(cursor);
+        if (!safe) {
+          this.scheduleHighlight();
+          this.addDirtyNode(cursor);
+        }
+      }
+    },
+
+    reparseBuffer: function() {
+      forEach(this.container.childNodes, function(node) {node.dirty = true;});
+      if (this.container.firstChild)
+        this.addDirtyNode(this.container.firstChild);
+    },
+
+    // Add a node to the set of dirty nodes, if it isn't already in
+    // there.
+    addDirtyNode: function(node) {
+      node = node || this.container.firstChild;
+      if (!node) return;
+
+      for (var i = 0; i < this.dirty.length; i++)
+        if (this.dirty[i] == node) return;
+
+      if (node.nodeType != 3)
+        node.dirty = true;
+      this.dirty.push(node);
+    },
+
+    // Cause a highlight pass to happen in options.passDelay
+    // milliseconds. Clear the existing timeout, if one exists. This
+    // way, the passes do not happen while the user is typing, and
+    // should as unobtrusive as possible.
+    scheduleHighlight: function() {
+      // Timeouts are routed through the parent window, because on
+      // some browsers designMode windows do not fire timeouts.
+      var self = this;
+      this.parent.clearTimeout(this.highlightTimeout);
+      this.highlightTimeout = this.parent.setTimeout(function(){self.highlightDirty();}, this.options.passDelay);
+    },
+
+    // Fetch one dirty node, and remove it from the dirty set.
+    getDirtyNode: function() {
+      while (this.dirty.length > 0) {
+        var found = this.dirty.pop();
+        // IE8 sometimes throws an unexplainable 'invalid argument'
+        // exception for found.parentNode
+        try {
+          // If the node has been coloured in the meantime, or is no
+          // longer in the document, it should not be returned.
+          while (found && found.parentNode != this.container)
+            found = found.parentNode
+          if (found && (found.dirty || found.nodeType == 3))
+            return found;
+        } catch (e) {}
+      }
+      return null;
+    },
+
+    // Pick dirty nodes, and highlight them, until options.passTime
+    // milliseconds have gone by. The highlight method will continue
+    // to next lines as long as it finds dirty nodes. It returns
+    // information about the place where it stopped. If there are
+    // dirty nodes left after this function has spent all its lines,
+    // it shedules another highlight to finish the job.
+    highlightDirty: function(force) {
+      // Prevent FF from raising an error when it is firing timeouts
+      // on a page that's no longer loaded.
+      if (!window.select) return;
+
+      if (!this.options.readOnly) select.markSelection(this.win);
+      var start, endTime = force ? null : time() + this.options.passTime;
+      while ((time() < endTime || force) && (start = this.getDirtyNode())) {
+        var result = this.highlight(start, endTime);
+        if (result && result.node && result.dirty)
+          this.addDirtyNode(result.node);
+      }
+      if (!this.options.readOnly) select.selectMarked();
+      if (start) this.scheduleHighlight();
+      return this.dirty.length == 0;
+    },
+
+    // Creates a function that, when called through a timeout, will
+    // continuously re-parse the document.
+    documentScanner: function(passTime) {
+      var self = this, pos = null;
+      return function() {
+        // FF timeout weirdness workaround.
+        if (!window.select) return;
+        // If the current node is no longer in the document... oh
+        // well, we start over.
+        if (pos && pos.parentNode != self.container)
+          pos = null;
+        select.markSelection(self.win);
+        var result = self.highlight(pos, time() + passTime, true);
+        select.selectMarked();
+        var newPos = result ? (result.node && result.node.nextSibling) : null;
+        pos = (pos == newPos) ? null : newPos;
+        self.delayScanning();
+      };
+    },
+
+    // Starts the continuous scanning process for this document after
+    // a given interval.
+    delayScanning: function() {
+      if (this.scanner) {
+        this.parent.clearTimeout(this.documentScan);
+        this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
+      }
+    },
+
+    // The function that does the actual highlighting/colouring (with
+    // help from the parser and the DOM normalizer). Its interface is
+    // rather overcomplicated, because it is used in different
+    // situations: ensuring that a certain line is highlighted, or
+    // highlighting up to X milliseconds starting from a certain
+    // point. The 'from' argument gives the node at which it should
+    // start. If this is null, it will start at the beginning of the
+    // document. When a timestamp is given with the 'target' argument,
+    // it will stop highlighting at that time. If this argument holds
+    // a DOM node, it will highlight until it reaches that node. If at
+    // any time it comes across two 'clean' lines (no dirty nodes), it
+    // will stop, except when 'cleanLines' is true. maxBacktrack is
+    // the maximum number of lines to backtrack to find an existing
+    // parser instance. This is used to give up in situations where a
+    // highlight would take too long and freeze the browser interface.
+    highlight: function(from, target, cleanLines, maxBacktrack){
+      var container = this.container, self = this, active = this.options.activeTokens;
+      var endTime = (typeof target == "number" ? target : null);
+
+      if (!container.firstChild)
+        return;
+      // Backtrack to the first node before from that has a partial
+      // parse stored.
+      while (from && (!from.parserFromHere || from.dirty)) {
+        if (maxBacktrack != null && from.nodeName == "BR" && (--maxBacktrack) < 0)
+          return false;
+        from = from.previousSibling;
+      }
+      // If we are at the end of the document, do nothing.
+      if (from && !from.nextSibling)
+        return;
+
+      // Check whether a part (<span> node) and the corresponding token
+      // match.
+      function correctPart(token, part){
+        return !part.reduced && part.currentText == token.value && part.className == token.style;
+      }
+      // Shorten the text associated with a part by chopping off
+      // characters from the front. Note that only the currentText
+      // property gets changed. For efficiency reasons, we leave the
+      // nodeValue alone -- we set the reduced flag to indicate that
+      // this part must be replaced.
+      function shortenPart(part, minus){
+        part.currentText = part.currentText.substring(minus);
+        part.reduced = true;
+      }
+      // Create a part corresponding to a given token.
+      function tokenPart(token){
+        var part = makePartSpan(token.value, self.doc);
+        part.className = token.style;
+        return part;
+      }
+
+      function maybeTouch(node) {
+        if (node) {
+          var old = node.oldNextSibling;
+          if (lineDirty || old === undefined || node.nextSibling != old)
+            self.history.touch(node);
+          node.oldNextSibling = node.nextSibling;
+        }
+        else {
+          var old = self.container.oldFirstChild;
+          if (lineDirty || old === undefined || self.container.firstChild != old)
+            self.history.touch(null);
+          self.container.oldFirstChild = self.container.firstChild;
+        }
+      }
+
+      // Get the token stream. If from is null, we start with a new
+      // parser from the start of the frame, otherwise a partial parse
+      // is resumed.
+      var traversal = traverseDOM(from ? from.nextSibling : container.firstChild),
+          stream = stringStream(traversal),
+          parsed = from ? from.parserFromHere(stream) : Editor.Parser.make(stream);
+
+      // parts is an interface to make it possible to 'delay' fetching
+      // the next DOM node until we are completely done with the one
+      // before it. This is necessary because often the next node is
+      // not yet available when we want to proceed past the current
+      // one.
+      var parts = {
+        current: null,
+        // Fetch current node.
+        get: function(){
+          if (!this.current)
+            this.current = traversal.nodes.shift();
+          return this.current;
+        },
+        // Advance to the next part (do not fetch it yet).
+        next: function(){
+          this.current = null;
+        },
+        // Remove the current part from the DOM tree, and move to the
+        // next.
+        remove: function(){
+          container.removeChild(this.get());
+          this.current = null;
+        },
+        // Advance to the next part that is not empty, discarding empty
+        // parts.
+        getNonEmpty: function(){
+          var part = this.get();
+          // Allow empty nodes when they are alone on a line, needed
+          // for the FF cursor bug workaround (see select.js,
+          // insertNewlineAtCursor).
+          while (part && part.nodeName == "SPAN" && part.currentText == "") {
+            var old = part;
+            this.remove();
+            part = this.get();
+            // Adjust selection information, if any. See select.js for details.
+            select.snapshotMove(old.firstChild, part && (part.firstChild || part), 0);
+          }
+          return part;
+        }
+      };
+
+      var lineDirty = false, prevLineDirty = true, lineNodes = 0;
+
+      // This forEach loops over the tokens from the parsed stream, and
+      // at the same time uses the parts object to proceed through the
+      // corresponding DOM nodes.
+      forEach(parsed, function(token){
+        var part = parts.getNonEmpty();
+
+        if (token.value == "\n"){
+          // The idea of the two streams actually staying synchronized
+          // is such a long shot that we explicitly check.
+          if (part.nodeName != "BR")
+            throw "Parser out of sync. Expected BR.";
+
+          if (part.dirty || !part.indentation) lineDirty = true;
+          maybeTouch(from);
+          from = part;
+
+          // Every <br> gets a copy of the parser state and a lexical
+          // context assigned to it. The first is used to be able to
+          // later resume parsing from this point, the second is used
+          // for indentation.
+          part.parserFromHere = parsed.copy();
+          part.indentation = token.indentation;
+          part.dirty = false;
+
+          // If the target argument wasn't an integer, go at least
+          // until that node.
+          if (endTime == null && part == target) throw StopIteration;
+
+          // A clean line with more than one node means we are done.
+          // Throwing a StopIteration is the way to break out of a
+          // MochiKit forEach loop.
+          if ((endTime != null && time() >= endTime) || (!lineDirty && !prevLineDirty && lineNodes > 1 && !cleanLines))
+            throw StopIteration;
+          prevLineDirty = lineDirty; lineDirty = false; lineNodes = 0;
+          parts.next();
+        }
+        else {
+          if (part.nodeName != "SPAN")
+            throw "Parser out of sync. Expected SPAN.";
+          if (part.dirty)
+            lineDirty = true;
+          lineNodes++;
+
+          // If the part matches the token, we can leave it alone.
+          if (correctPart(token, part)){
+            part.dirty = false;
+            parts.next();
+          }
+          // Otherwise, we have to fix it.
+          else {
+            lineDirty = true;
+            // Insert the correct part.
+            var newPart = tokenPart(token);
+            container.insertBefore(newPart, part);
+            if (active) active(newPart, token, self);
+            var tokensize = token.value.length;
+            var offset = 0;
+            // Eat up parts until the text for this token has been
+            // removed, adjusting the stored selection info (see
+            // select.js) in the process.
+            while (tokensize > 0) {
+              part = parts.get();
+              var partsize = part.currentText.length;
+              select.snapshotReplaceNode(part.firstChild, newPart.firstChild, tokensize, offset);
+              if (partsize > tokensize){
+                shortenPart(part, tokensize);
+                tokensize = 0;
+              }
+              else {
+                tokensize -= partsize;
+                offset += partsize;
+                parts.remove();
+              }
+            }
+          }
+        }
+      });
+      maybeTouch(from);
+      webkitLastLineHack(this.container);
+
+      // The function returns some status information that is used by
+      // hightlightDirty to determine whether and where it has to
+      // continue.
+      return {node: parts.getNonEmpty(),
+              dirty: lineDirty};
+    }
+  };
+
+  return Editor;
+})();
+
+addEventHandler(window, "load", function() {
+  var CodeMirror = window.frameElement.CodeMirror;
+  CodeMirror.editor = new Editor(CodeMirror.options);
+  this.parent.setTimeout(method(CodeMirror, "init"), 0);
+});
diff --git a/redakcja/static/js/lib/codemirror/parsexml.js b/redakcja/static/js/lib/codemirror/parsexml.js
new file mode 100644 (file)
index 0000000..87fbf0c
--- /dev/null
@@ -0,0 +1,292 @@
+/* This file defines an XML parser, with a few kludges to make it
+ * useable for HTML. autoSelfClosers defines a set of tag names that
+ * are expected to not have a closing tag, and doNotIndent specifies
+ * the tags inside of which no indentation should happen (see Config
+ * object). These can be disabled by passing the editor an object like
+ * {useHTMLKludges: false} as parserConfig option.
+ */
+
+var XMLParser = Editor.Parser = (function() {
+  var Kludges = {
+    autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true,
+                      "meta": true, "col": true, "frame": true, "base": true, "area": true},
+    doNotIndent: {"pre": true, "!cdata": true}
+  };
+  var NoKludges = {autoSelfClosers: {}, doNotIndent: {"!cdata": true}};
+  var UseKludges = Kludges;
+  var alignCDATA = false;
+
+  // Simple stateful tokenizer for XML documents. Returns a
+  // MochiKit-style iterator, with a state property that contains a
+  // function encapsulating the current state. See tokenize.js.
+  var tokenizeXML = (function() {
+    function inText(source, setState) {
+      var ch = source.next();
+      if (ch == "<") {
+        if (source.equals("!")) {
+          source.next();
+          if (source.equals("[")) {
+            if (source.lookAhead("[CDATA[", true)) {
+              setState(inBlock("xml-cdata", "]]>"));
+              return null;
+            }
+            else {
+              return "xml-text";
+            }
+          }
+          else if (source.lookAhead("--", true)) {
+            setState(inBlock("xml-comment", "-->"));
+            return null;
+          }
+          else {
+            return "xml-text";
+          }
+        }
+        else if (source.equals("?")) {
+          source.next();
+          source.nextWhileMatches(/[\w\._\-]/);
+          setState(inBlock("xml-processing", "?>"));
+          return "xml-processing";
+        }
+        else {
+          if (source.equals("/")) source.next();
+          setState(inTag);
+          return "xml-punctuation";
+        }
+      }
+      else if (ch == "&") {
+        while (!source.endOfLine()) {
+          if (source.next() == ";")
+            break;
+        }
+        return "xml-entity";
+      }
+      else {
+        source.nextWhileMatches(/[^&<\n]/);
+        return "xml-text";
+      }
+    }
+
+    function inTag(source, setState) {
+      var ch = source.next();
+      if (ch == ">") {
+        setState(inText);
+        return "xml-punctuation";
+      }
+      else if (/[?\/]/.test(ch) && source.equals(">")) {
+        source.next();
+        setState(inText);
+        return "xml-punctuation";
+      }
+      else if (ch == "=") {
+        return "xml-punctuation";
+      }
+      else if (/[\'\"]/.test(ch)) {
+        setState(inAttribute(ch));
+        return null;
+      }
+      else {
+        source.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);
+        return "xml-name";
+      }
+    }
+
+    function inAttribute(quote) {
+      return function(source, setState) {
+        while (!source.endOfLine()) {
+          if (source.next() == quote) {
+            setState(inTag);
+            break;
+          }
+        }
+        return "xml-attribute";
+      };
+    }
+
+    function inBlock(style, terminator) {
+      return function(source, setState) {
+        while (!source.endOfLine()) {
+          if (source.lookAhead(terminator, true)) {
+            setState(inText);
+            break;
+          }
+          source.next();
+        }
+        return style;
+      };
+    }
+
+    return function(source, startState) {
+      return tokenizer(source, startState || inText);
+    };
+  })();
+
+  // The parser. The structure of this function largely follows that of
+  // parseJavaScript in parsejavascript.js (there is actually a bit more
+  // shared code than I'd like), but it is quite a bit simpler.
+  function parseXML(source) {
+    var tokens = tokenizeXML(source);
+    var cc = [base];
+    var tokenNr = 0, indented = 0;
+    var currentTag = null, context = null;
+    var consume, marked;
+
+    function push(fs) {
+      for (var i = fs.length - 1; i >= 0; i--)
+        cc.push(fs[i]);
+    }
+    function cont() {
+      push(arguments);
+      consume = true;
+    }
+    function pass() {
+      push(arguments);
+      consume = false;
+    }
+
+    function mark(style) {
+      marked = style;
+    }
+    function expect(text) {
+      return function(style, content) {
+        if (content == text) cont();
+        else mark("xml-error") || cont(arguments.callee);
+      };
+    }
+
+    function pushContext(tagname, startOfLine) {
+      var noIndent = UseKludges.doNotIndent.hasOwnProperty(tagname) || (context && context.noIndent);
+      context = {prev: context, name: tagname, indent: indented, startOfLine: startOfLine, noIndent: noIndent};
+    }
+    function popContext() {
+      context = context.prev;
+    }
+    function computeIndentation(baseContext) {
+      return function(nextChars, current) {
+        var context = baseContext;
+        if (context && context.noIndent)
+          return current;
+        if (alignCDATA && /<!\[CDATA\[/.test(nextChars))
+          return 0;
+        if (context && /^<\//.test(nextChars))
+          context = context.prev;
+        while (context && !context.startOfLine)
+          context = context.prev;
+        if (context)
+          return context.indent + indentUnit;
+        else
+          return 0;
+      };
+    }
+
+    function base() {
+      return pass(element, base);
+    }
+    var harmlessTokens = {"xml-text": true, "xml-entity": true, "xml-comment": true, "xml-processing": true};
+    function element(style, content) {
+      if (content == "<") cont(tagname, attributes, endtag(tokenNr == 1));
+      else if (content == "</") cont(closetagname, expect(">"));
+      else if (style == "xml-cdata") {
+        if (!context || context.name != "!cdata") pushContext("!cdata");
+        if (/\]\]>$/.test(content)) popContext();
+        cont();
+      }
+      else if (harmlessTokens.hasOwnProperty(style)) cont();
+      else mark("xml-error") || cont();
+    }
+    function tagname(style, content) {
+      if (style == "xml-name") {
+        currentTag = content.toLowerCase();
+        mark("xml-tagname");
+        cont();
+      }
+      else {
+        currentTag = null;
+        pass();
+      }
+    }
+    function closetagname(style, content) {
+      if (style == "xml-name" && context && content.toLowerCase() == context.name) {
+        popContext();
+        mark("xml-tagname");
+      }
+      else {
+        mark("xml-error");
+      }
+      cont();
+    }
+    function endtag(startOfLine) {
+      return function(style, content) {
+        if (content == "/>" || (content == ">" && UseKludges.autoSelfClosers.hasOwnProperty(currentTag))) cont();
+        else if (content == ">") pushContext(currentTag, startOfLine) || cont();
+        else mark("xml-error") || cont(arguments.callee);
+      };
+    }
+    function attributes(style) {
+      if (style == "xml-name") mark("xml-attname") || cont(attribute, attributes);
+      else pass();
+    }
+    function attribute(style, content) {
+      if (content == "=") cont(value);
+      else if (content == ">" || content == "/>") pass(endtag);
+      else pass();
+    }
+    function value(style) {
+      if (style == "xml-attribute") cont(value);
+      else pass();
+    }
+
+    return {
+      indentation: function() {return indented;},
+
+      next: function(){
+        var token = tokens.next();
+        if (token.style == "whitespace" && tokenNr == 0)
+          indented = token.value.length;
+        else
+          tokenNr++;
+        if (token.content == "\n") {
+          indented = tokenNr = 0;
+          token.indentation = computeIndentation(context);
+        }
+
+        if (token.style == "whitespace" || token.type == "xml-comment")
+          return token;
+
+        while(true){
+          consume = marked = false;
+          cc.pop()(token.style, token.content);
+          if (consume){
+            if (marked)
+              token.style = marked;
+            return token;
+          }
+        }
+      },
+
+      copy: function(){
+        var _cc = cc.concat([]), _tokenState = tokens.state, _context = context;
+        var parser = this;
+
+        return function(input){
+          cc = _cc.concat([]);
+          tokenNr = indented = 0;
+          context = _context;
+          tokens = tokenizeXML(input, _tokenState);
+          return parser;
+        };
+      }
+    };
+  }
+
+  return {
+    make: parseXML,
+    electricChars: "/",
+    configure: function(config) {
+      if (config.useHTMLKludges != null)
+        UseKludges = config.useHTMLKludges ? Kludges : NoKludges;
+      if (config.alignCDATA)
+        alignCDATA = config.alignCDATA;
+    }
+  };
+})();
diff --git a/redakcja/static/js/lib/codemirror/select.js b/redakcja/static/js/lib/codemirror/select.js
new file mode 100644 (file)
index 0000000..d513ba5
--- /dev/null
@@ -0,0 +1,619 @@
+/* Functionality for finding, storing, and restoring selections
+ *
+ * This does not provide a generic API, just the minimal functionality
+ * required by the CodeMirror system.
+ */
+
+// Namespace object.
+var select = {};
+
+(function() {
+  select.ie_selection = document.selection && document.selection.createRangeCollection;
+
+  // Find the 'top-level' (defined as 'a direct child of the node
+  // passed as the top argument') node that the given node is
+  // contained in. Return null if the given node is not inside the top
+  // node.
+  function topLevelNodeAt(node, top) {
+    while (node && node.parentNode != top)
+      node = node.parentNode;
+    return node;
+  }
+
+  // Find the top-level node that contains the node before this one.
+  function topLevelNodeBefore(node, top) {
+    while (!node.previousSibling && node.parentNode != top)
+      node = node.parentNode;
+    return topLevelNodeAt(node.previousSibling, top);
+  }
+
+  var fourSpaces = "\u00a0\u00a0\u00a0\u00a0";
+
+  select.scrollToNode = function(element) {
+    if (!element) return;
+    var doc = element.ownerDocument, body = doc.body,
+        win = (doc.defaultView || doc.parentWindow),
+        html = doc.documentElement,
+        atEnd = !element.nextSibling || !element.nextSibling.nextSibling
+                || !element.nextSibling.nextSibling.nextSibling;
+    // In Opera (and recent Webkit versions), BR elements *always*
+    // have a scrollTop property of zero.
+    var compensateHack = 0;
+    while (element && !element.offsetTop) {
+      compensateHack++;
+      element = element.previousSibling;
+    }
+    // atEnd is another kludge for these browsers -- if the cursor is
+    // at the end of the document, and the node doesn't have an
+    // offset, just scroll to the end.
+    if (compensateHack == 0) atEnd = false;
+
+    var y = compensateHack * (element ? element.offsetHeight : 0), x = 0, pos = element;
+    while (pos && pos.offsetParent) {
+      y += pos.offsetTop;
+      // Don't count X offset for <br> nodes
+      if (pos.nodeName != "BR")
+        x += pos.offsetLeft;
+      pos = pos.offsetParent;
+    }
+
+    var scroll_x = body.scrollLeft || html.scrollLeft || 0,
+        scroll_y = body.scrollTop || html.scrollTop || 0,
+        screen_x = x - scroll_x, screen_y = y - scroll_y, scroll = false;
+
+    if (screen_x < 0 || screen_x > (win.innerWidth || html.clientWidth || 0)) {
+      scroll_x = x;
+      scroll = true;
+    }
+    if (screen_y < 0 || atEnd || screen_y > (win.innerHeight || html.clientHeight || 0) - 50) {
+      scroll_y = atEnd ? 1e10 : y;
+      scroll = true;
+    }
+    if (scroll) win.scrollTo(scroll_x, scroll_y);
+  };
+
+  select.scrollToCursor = function(container) {
+    select.scrollToNode(select.selectionTopNode(container, true) || container.firstChild);
+  };
+
+  // Used to prevent restoring a selection when we do not need to.
+  var currentSelection = null;
+
+  select.snapshotChanged = function() {
+    if (currentSelection) currentSelection.changed = true;
+  };
+
+  // This is called by the code in editor.js whenever it is replacing
+  // a text node. The function sees whether the given oldNode is part
+  // of the current selection, and updates this selection if it is.
+  // Because nodes are often only partially replaced, the length of
+  // the part that gets replaced has to be taken into account -- the
+  // selection might stay in the oldNode if the newNode is smaller
+  // than the selection's offset. The offset argument is needed in
+  // case the selection does move to the new object, and the given
+  // length is not the whole length of the new node (part of it might
+  // have been used to replace another node).
+  select.snapshotReplaceNode = function(from, to, length, offset) {
+    if (!currentSelection) return;
+
+    function replace(point) {
+      if (from == point.node) {
+        currentSelection.changed = true;
+        if (length && point.offset > length) {
+          point.offset -= length;
+        }
+        else {
+          point.node = to;
+          point.offset += (offset || 0);
+        }
+      }
+    }
+    replace(currentSelection.start);
+    replace(currentSelection.end);
+  };
+
+  select.snapshotMove = function(from, to, distance, relative, ifAtStart) {
+    if (!currentSelection) return;
+
+    function move(point) {
+      if (from == point.node && (!ifAtStart || point.offset == 0)) {
+        currentSelection.changed = true;
+        point.node = to;
+        if (relative) point.offset = Math.max(0, point.offset + distance);
+        else point.offset = distance;
+      }
+    }
+    move(currentSelection.start);
+    move(currentSelection.end);
+  };
+
+  // Most functions are defined in two ways, one for the IE selection
+  // model, one for the W3C one.
+  if (select.ie_selection) {
+    function selectionNode(win, start) {
+      var range = win.document.selection.createRange();
+      range.collapse(start);
+
+      function nodeAfter(node) {
+        var found = null;
+        while (!found && node) {
+          found = node.nextSibling;
+          node = node.parentNode;
+        }
+        return nodeAtStartOf(found);
+      }
+
+      function nodeAtStartOf(node) {
+        while (node && node.firstChild) node = node.firstChild;
+        return {node: node, offset: 0};
+      }
+
+      var containing = range.parentElement();
+      if (!isAncestor(win.document.body, containing)) return null;
+      if (!containing.firstChild) return nodeAtStartOf(containing);
+
+      var working = range.duplicate();
+      working.moveToElementText(containing);
+      working.collapse(true);
+      for (var cur = containing.firstChild; cur; cur = cur.nextSibling) {
+        if (cur.nodeType == 3) {
+          var size = cur.nodeValue.length;
+          working.move("character", size);
+        }
+        else {
+          working.moveToElementText(cur);
+          working.collapse(false);
+        }
+
+        var dir = range.compareEndPoints("StartToStart", working);
+        if (dir == 0) return nodeAfter(cur);
+        if (dir == 1) continue;
+        if (cur.nodeType != 3) return nodeAtStartOf(cur);
+
+        working.setEndPoint("StartToEnd", range);
+        return {node: cur, offset: size - working.text.length};
+      }
+      return nodeAfter(containing);
+    }
+
+    select.markSelection = function(win) {
+      currentSelection = null;
+      var sel = win.document.selection;
+      if (!sel) return;
+      var start = selectionNode(win, true),
+          end = selectionNode(win, false);
+      if (!start || !end) return;
+      currentSelection = {start: start, end: end, window: win, changed: false};
+    };
+
+    select.selectMarked = function() {
+      if (!currentSelection || !currentSelection.changed) return;
+      var win = currentSelection.window, doc = win.document;
+
+      function makeRange(point) {
+        var range = doc.body.createTextRange(),
+            node = point.node;
+        if (!node) {
+          range.moveToElementText(currentSelection.window.document.body);
+          range.collapse(false);
+        }
+        else if (node.nodeType == 3) {
+          range.moveToElementText(node.parentNode);
+          var offset = point.offset;
+          while (node.previousSibling) {
+            node = node.previousSibling;
+            offset += (node.innerText || "").length;
+          }
+          range.move("character", offset);
+        }
+        else {
+          range.moveToElementText(node);
+          range.collapse(true);
+        }
+        return range;
+      }
+
+      var start = makeRange(currentSelection.start), end = makeRange(currentSelection.end);
+      start.setEndPoint("StartToEnd", end);
+      start.select();
+    };
+
+    // Get the top-level node that one end of the cursor is inside or
+    // after. Note that this returns false for 'no cursor', and null
+    // for 'start of document'.
+    select.selectionTopNode = function(container, start) {
+      var selection = container.ownerDocument.selection;
+      if (!selection) return false;
+
+      var range = selection.createRange(), range2 = range.duplicate();
+      range.collapse(start);
+      var around = range.parentElement();
+      if (around && isAncestor(container, around)) {
+        // Only use this node if the selection is not at its start.
+        range2.moveToElementText(around);
+        if (range.compareEndPoints("StartToStart", range2) == 1)
+          return topLevelNodeAt(around, container);
+      }
+
+      // Move the start of a range to the start of a node,
+      // compensating for the fact that you can't call
+      // moveToElementText with text nodes.
+      function moveToNodeStart(range, node) {
+        if (node.nodeType == 3) {
+          var count = 0, cur = node.previousSibling;
+          while (cur && cur.nodeType == 3) {
+            count += cur.nodeValue.length;
+            cur = cur.previousSibling;
+          }
+          if (cur) {
+            try{range.moveToElementText(cur);}
+            catch(e){}
+            range.collapse(false);
+          }
+          else range.moveToElementText(node.parentNode);
+          if (count) range.move("character", count);
+        }
+        else range.moveToElementText(node);
+      }
+
+      // Do a binary search through the container object, comparing
+      // the start of each node to the selection
+      var start = 0, end = container.childNodes.length - 1;
+      while (start < end) {
+        var middle = Math.ceil((end + start) / 2), node = container.childNodes[middle];
+        if (!node) return false; // Don't ask. IE6 manages this sometimes.
+        moveToNodeStart(range2, node);
+        if (range.compareEndPoints("StartToStart", range2) == 1)
+          start = middle;
+        else
+          end = middle - 1;
+      }
+      return container.childNodes[start] || null;
+    };
+
+    // Place the cursor after this.start. This is only useful when
+    // manually moving the cursor instead of restoring it to its old
+    // position.
+    select.focusAfterNode = function(node, container) {
+      var range = container.ownerDocument.body.createTextRange();
+      range.moveToElementText(node || container);
+      range.collapse(!node);
+      range.select();
+    };
+
+    select.somethingSelected = function(win) {
+      var sel = win.document.selection;
+      return sel && (sel.createRange().text != "");
+    };
+
+    function insertAtCursor(window, html) {
+      var selection = window.document.selection;
+      if (selection) {
+        var range = selection.createRange();
+        range.pasteHTML(html);
+        range.collapse(false);
+        range.select();
+      }
+    }
+
+    // Used to normalize the effect of the enter key, since browsers
+    // do widely different things when pressing enter in designMode.
+    select.insertNewlineAtCursor = function(window) {
+      insertAtCursor(window, "<br>");
+    };
+
+    select.insertTabAtCursor = function(window) {
+      insertAtCursor(window, fourSpaces);
+    };
+
+    // Get the BR node at the start of the line on which the cursor
+    // currently is, and the offset into the line. Returns null as
+    // node if cursor is on first line.
+    select.cursorPos = function(container, start) {
+      var selection = container.ownerDocument.selection;
+      if (!selection) return null;
+
+      var topNode = select.selectionTopNode(container, start);
+      while (topNode && topNode.nodeName != "BR")
+        topNode = topNode.previousSibling;
+
+      var range = selection.createRange(), range2 = range.duplicate();
+      range.collapse(start);
+      if (topNode) {
+        range2.moveToElementText(topNode);
+        range2.collapse(false);
+      }
+      else {
+        // When nothing is selected, we can get all kinds of funky errors here.
+        try { range2.moveToElementText(container); }
+        catch (e) { return null; }
+        range2.collapse(true);
+      }
+      range.setEndPoint("StartToStart", range2);
+
+      return {node: topNode, offset: range.text.length};
+    };
+
+    select.setCursorPos = function(container, from, to) {
+      function rangeAt(pos) {
+        var range = container.ownerDocument.body.createTextRange();
+        if (!pos.node) {
+          range.moveToElementText(container);
+          range.collapse(true);
+        }
+        else {
+          range.moveToElementText(pos.node);
+          range.collapse(false);
+        }
+        range.move("character", pos.offset);
+        return range;
+      }
+
+      var range = rangeAt(from);
+      if (to && to != from)
+        range.setEndPoint("EndToEnd", rangeAt(to));
+      range.select();
+    }
+
+    // Some hacks for storing and re-storing the selection when the editor loses and regains focus.
+    select.selectionCoords = function (win) {
+      var selection = win.document.selection;
+      if (!selection) return null;
+      var start = selection.createRange(), end = start.duplicate();
+      start.collapse(true);
+      end.collapse(false);
+
+      var body = win.document.body;
+      return {start: {x: start.boundingLeft + body.scrollLeft - 1,
+                      y: start.boundingTop + body.scrollTop},
+              end: {x: end.boundingLeft + body.scrollLeft - 1,
+                    y: end.boundingTop + body.scrollTop}};
+    };
+
+    // Restore a stored selection.
+    select.selectCoords = function(win, coords) {
+      if (!coords) return;
+
+      var range1 = win.document.body.createTextRange(), range2 = range1.duplicate();
+      // This can fail for various hard-to-handle reasons.
+      try {
+        range1.moveToPoint(coords.start.x, coords.start.y);
+        range2.moveToPoint(coords.end.x, coords.end.y);
+        range1.setEndPoint("EndToStart", range2);
+        range1.select();
+      } catch(e) {}
+    };
+  }
+  // W3C model
+  else {
+    // Store start and end nodes, and offsets within these, and refer
+    // back to the selection object from those nodes, so that this
+    // object can be updated when the nodes are replaced before the
+    // selection is restored.
+    select.markSelection = function (win) {
+      var selection = win.getSelection();
+      if (!selection || selection.rangeCount == 0)
+        return (currentSelection = null);
+      var range = selection.getRangeAt(0);
+
+      currentSelection = {
+        start: {node: range.startContainer, offset: range.startOffset},
+        end: {node: range.endContainer, offset: range.endOffset},
+        window: win,
+        changed: false
+      };
+
+      // We want the nodes right at the cursor, not one of their
+      // ancestors with a suitable offset. This goes down the DOM tree
+      // until a 'leaf' is reached (or is it *up* the DOM tree?).
+      function normalize(point){
+        while (point.node.nodeType != 3 && point.node.nodeName != "BR") {
+          var newNode = point.node.childNodes[point.offset] || point.node.nextSibling;
+          point.offset = 0;
+          while (!newNode && point.node.parentNode) {
+            point.node = point.node.parentNode;
+            newNode = point.node.nextSibling;
+          }
+          point.node = newNode;
+          if (!newNode)
+            break;
+        }
+      }
+
+      normalize(currentSelection.start);
+      normalize(currentSelection.end);
+    };
+
+    select.selectMarked = function () {
+      if (!currentSelection || !currentSelection.changed) return;
+      var win = currentSelection.window, range = win.document.createRange();
+
+      function setPoint(point, which) {
+        if (point.node) {
+          // Some magic to generalize the setting of the start and end
+          // of a range.
+          if (point.offset == 0)
+            range["set" + which + "Before"](point.node);
+          else
+            range["set" + which](point.node, point.offset);
+        }
+        else {
+          range.setStartAfter(win.document.body.lastChild || win.document.body);
+        }
+      }
+
+      setPoint(currentSelection.end, "End");
+      setPoint(currentSelection.start, "Start");
+      selectRange(range, win);
+    };
+
+    // Helper for selecting a range object.
+    function selectRange(range, window) {
+      var selection = window.getSelection();
+      selection.removeAllRanges();
+      selection.addRange(range);
+    };
+    function selectionRange(window) {
+      var selection = window.getSelection();
+      if (!selection || selection.rangeCount == 0)
+        return false;
+      else
+        return selection.getRangeAt(0);
+    }
+
+    // Finding the top-level node at the cursor in the W3C is, as you
+    // can see, quite an involved process.
+    select.selectionTopNode = function(container, start) {
+      var range = selectionRange(container.ownerDocument.defaultView);
+      if (!range) return false;
+
+      var node = start ? range.startContainer : range.endContainer;
+      var offset = start ? range.startOffset : range.endOffset;
+      // Work around (yet another) bug in Opera's selection model.
+      if (window.opera && !start && range.endContainer == container && range.endOffset == range.startOffset + 1 &&
+          container.childNodes[range.startOffset] && container.childNodes[range.startOffset].nodeName == "BR")
+        offset--;
+
+      // For text nodes, we look at the node itself if the cursor is
+      // inside, or at the node before it if the cursor is at the
+      // start.
+      if (node.nodeType == 3){
+        if (offset > 0)
+          return topLevelNodeAt(node, container);
+        else
+          return topLevelNodeBefore(node, container);
+      }
+      // Occasionally, browsers will return the HTML node as
+      // selection. If the offset is 0, we take the start of the frame
+      // ('after null'), otherwise, we take the last node.
+      else if (node.nodeName == "HTML") {
+        return (offset == 1 ? null : container.lastChild);
+      }
+      // If the given node is our 'container', we just look up the
+      // correct node by using the offset.
+      else if (node == container) {
+        return (offset == 0) ? null : node.childNodes[offset - 1];
+      }
+      // In any other case, we have a regular node. If the cursor is
+      // at the end of the node, we use the node itself, if it is at
+      // the start, we use the node before it, and in any other
+      // case, we look up the child before the cursor and use that.
+      else {
+        if (offset == node.childNodes.length)
+          return topLevelNodeAt(node, container);
+        else if (offset == 0)
+          return topLevelNodeBefore(node, container);
+        else
+          return topLevelNodeAt(node.childNodes[offset - 1], container);
+      }
+    };
+
+    select.focusAfterNode = function(node, container) {
+      var win = container.ownerDocument.defaultView,
+          range = win.document.createRange();
+      range.setStartBefore(container.firstChild || container);
+      // In Opera, setting the end of a range at the end of a line
+      // (before a BR) will cause the cursor to appear on the next
+      // line, so we set the end inside of the start node when
+      // possible.
+      if (node && !node.firstChild)
+        range.setEndAfter(node);
+      else if (node)
+        range.setEnd(node, node.childNodes.length);
+      else
+        range.setEndBefore(container.firstChild || container);
+      range.collapse(false);
+      selectRange(range, win);
+    };
+
+    select.somethingSelected = function(win) {
+      var range = selectionRange(win);
+      return range && !range.collapsed;
+    };
+
+    function insertNodeAtCursor(window, node) {
+      var range = selectionRange(window);
+      if (!range) return;
+
+      range.deleteContents();
+      range.insertNode(node);
+      webkitLastLineHack(window.document.body);
+      range = window.document.createRange();
+      range.selectNode(node);
+      range.collapse(false);
+      selectRange(range, window);
+    }
+
+    select.insertNewlineAtCursor = function(window) {
+      insertNodeAtCursor(window, window.document.createElement("BR"));
+    };
+
+    select.insertTabAtCursor = function(window) {
+      insertNodeAtCursor(window, window.document.createTextNode(fourSpaces));
+    };
+
+    select.cursorPos = function(container, start) {
+      var range = selectionRange(window);
+      if (!range) return;
+
+      var topNode = select.selectionTopNode(container, start);
+      while (topNode && topNode.nodeName != "BR")
+        topNode = topNode.previousSibling;
+
+      range = range.cloneRange();
+      range.collapse(start);
+      if (topNode)
+        range.setStartAfter(topNode);
+      else
+        range.setStartBefore(container);
+      return {node: topNode, offset: range.toString().length};
+    };
+
+    select.setCursorPos = function(container, from, to) {
+      var win = container.ownerDocument.defaultView,
+          range = win.document.createRange();
+
+      function setPoint(node, offset, side) {
+        if (!node)
+          node = container.firstChild;
+        else
+          node = node.nextSibling;
+
+        if (!node)
+          return;
+
+        if (offset == 0) {
+          range["set" + side + "Before"](node);
+          return true;
+        }
+
+        var backlog = []
+        function decompose(node) {
+          if (node.nodeType == 3)
+            backlog.push(node);
+          else
+            forEach(node.childNodes, decompose);
+        }
+        while (true) {
+          while (node && !backlog.length) {
+            decompose(node);
+            node = node.nextSibling;
+          }
+          var cur = backlog.shift();
+          if (!cur) return false;
+
+          var length = cur.nodeValue.length;
+          if (length >= offset) {
+            range["set" + side](cur, offset);
+            return true;
+          }
+          offset -= length;
+        }
+      }
+
+      to = to || from;
+      if (setPoint(to.node, to.offset, "End") && setPoint(from.node, from.offset, "Start"))
+        selectRange(range, win);
+    };
+  }
+})();
diff --git a/redakcja/static/js/lib/codemirror/stringstream.js b/redakcja/static/js/lib/codemirror/stringstream.js
new file mode 100644 (file)
index 0000000..8c1c042
--- /dev/null
@@ -0,0 +1,140 @@
+/* String streams are the things fed to parsers (which can feed them
+ * to a tokenizer if they want). They provide peek and next methods
+ * for looking at the current character (next 'consumes' this
+ * character, peek does not), and a get method for retrieving all the
+ * text that was consumed since the last time get was called.
+ *
+ * An easy mistake to make is to let a StopIteration exception finish
+ * the token stream while there are still characters pending in the
+ * string stream (hitting the end of the buffer while parsing a
+ * token). To make it easier to detect such errors, the stringstreams
+ * throw an exception when this happens.
+ */
+
+// Make a stringstream stream out of an iterator that returns strings.
+// This is applied to the result of traverseDOM (see codemirror.js),
+// and the resulting stream is fed to the parser.
+window.stringStream = function(source){
+  // String that's currently being iterated over.
+  var current = "";
+  // Position in that string.
+  var pos = 0;
+  // Accumulator for strings that have been iterated over but not
+  // get()-ed yet.
+  var accum = "";
+  // Make sure there are more characters ready, or throw
+  // StopIteration.
+  function ensureChars() {
+    while (pos == current.length) {
+      accum += current;
+      current = ""; // In case source.next() throws
+      pos = 0;
+      try {current = source.next();}
+      catch (e) {
+        if (e != StopIteration) throw e;
+        else return false;
+      }
+    }
+    return true;
+  }
+
+  return {
+    // Return the next character in the stream.
+    peek: function() {
+      if (!ensureChars()) return null;
+      return current.charAt(pos);
+    },
+    // Get the next character, throw StopIteration if at end, check
+    // for unused content.
+    next: function() {
+      if (!ensureChars()) {
+        if (accum.length > 0)
+          throw "End of stringstream reached without emptying buffer ('" + accum + "').";
+        else
+          throw StopIteration;
+      }
+      return current.charAt(pos++);
+    },
+    // Return the characters iterated over since the last call to
+    // .get().
+    get: function() {
+      var temp = accum;
+      accum = "";
+      if (pos > 0){
+        temp += current.slice(0, pos);
+        current = current.slice(pos);
+        pos = 0;
+      }
+      return temp;
+    },
+    // Push a string back into the stream.
+    push: function(str) {
+      current = current.slice(0, pos) + str + current.slice(pos);
+    },
+    lookAhead: function(str, consume, skipSpaces, caseInsensitive) {
+      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
+      str = cased(str);
+      var found = false;
+
+      var _accum = accum, _pos = pos;
+      if (skipSpaces) this.nextWhileMatches(/[\s\u00a0]/);
+
+      while (true) {
+        var end = pos + str.length, left = current.length - pos;
+        if (end <= current.length) {
+          found = str == cased(current.slice(pos, end));
+          pos = end;
+          break;
+        }
+        else if (str.slice(0, left) == cased(current.slice(pos))) {
+          accum += current; current = "";
+          try {current = source.next();}
+          catch (e) {break;}
+          pos = 0;
+          str = str.slice(left);
+        }
+        else {
+          break;
+        }
+      }
+
+      if (!(found && consume)) {
+        current = accum.slice(_accum.length) + current;
+        pos = _pos;
+        accum = _accum;
+      }
+
+      return found;
+    },
+
+    // Utils built on top of the above
+    more: function() {
+      return this.peek() !== null;
+    },
+    applies: function(test) {
+      var next = this.peek();
+      return (next !== null && test(next));
+    },
+    nextWhile: function(test) {
+      var next;
+      while ((next = this.peek()) !== null && test(next))
+        this.next();
+    },
+    matches: function(re) {
+      var next = this.peek();
+      return (next !== null && re.test(next));
+    },
+    nextWhileMatches: function(re) {
+      var next;
+      while ((next = this.peek()) !== null && re.test(next))
+        this.next();
+    },
+    equals: function(ch) {
+      return ch === this.peek();
+    },
+    endOfLine: function() {
+      var next = this.peek();
+      return next == null || next == "\n";
+    }
+  };
+};
diff --git a/redakcja/static/js/lib/codemirror/tokenize.js b/redakcja/static/js/lib/codemirror/tokenize.js
new file mode 100644 (file)
index 0000000..b0c9545
--- /dev/null
@@ -0,0 +1,57 @@
+// A framework for simple tokenizers. Takes care of newlines and
+// white-space, and of getting the text from the source stream into
+// the token object. A state is a function of two arguments -- a
+// string stream and a setState function. The second can be used to
+// change the tokenizer's state, and can be ignored for stateless
+// tokenizers. This function should advance the stream over a token
+// and return a string or object containing information about the next
+// token, or null to pass and have the (new) state be called to finish
+// the token. When a string is given, it is wrapped in a {style, type}
+// object. In the resulting object, the characters consumed are stored
+// under the content property. Any whitespace following them is also
+// automatically consumed, and added to the value property. (Thus,
+// content is the actual meaningful part of the token, while value
+// contains all the text it spans.)
+
+function tokenizer(source, state) {
+  // Newlines are always a separate token.
+  function isWhiteSpace(ch) {
+    // The messy regexp is because IE's regexp matcher is of the
+    // opinion that non-breaking spaces are no whitespace.
+    return ch != "\n" && /^[\s\u00a0]*$/.test(ch);
+  }
+
+  var tokenizer = {
+    state: state,
+
+    take: function(type) {
+      if (typeof(type) == "string")
+        type = {style: type, type: type};
+
+      type.content = (type.content || "") + source.get();
+      if (!/\n$/.test(type.content))
+        source.nextWhile(isWhiteSpace);
+      type.value = type.content + source.get();
+      return type;
+    },
+
+    next: function () {
+      if (!source.more()) throw StopIteration;
+
+      var type;
+      if (source.equals("\n")) {
+        source.next();
+        return this.take("whitespace");
+      }
+
+      if (source.applies(isWhiteSpace))
+        type = "whitespace";
+      else
+        while (!type)
+          type = this.state(source, function(s) {tokenizer.state = s;});
+
+      return this.take(type);
+    }
+  };
+  return tokenizer;
+}
diff --git a/redakcja/static/js/lib/codemirror/undo.js b/redakcja/static/js/lib/codemirror/undo.js
new file mode 100644 (file)
index 0000000..5f717a9
--- /dev/null
@@ -0,0 +1,403 @@
+/**
+ * Storage and control for undo information within a CodeMirror
+ * editor. 'Why on earth is such a complicated mess required for
+ * that?', I hear you ask. The goal, in implementing this, was to make
+ * the complexity of storing and reverting undo information depend
+ * only on the size of the edited or restored content, not on the size
+ * of the whole document. This makes it necessary to use a kind of
+ * 'diff' system, which, when applied to a DOM tree, causes some
+ * complexity and hackery.
+ *
+ * In short, the editor 'touches' BR elements as it parses them, and
+ * the History stores these. When nothing is touched in commitDelay
+ * milliseconds, the changes are committed: It goes over all touched
+ * nodes, throws out the ones that did not change since last commit or
+ * are no longer in the document, and assembles the rest into zero or
+ * more 'chains' -- arrays of adjacent lines. Links back to these
+ * chains are added to the BR nodes, while the chain that previously
+ * spanned these nodes is added to the undo history. Undoing a change
+ * means taking such a chain off the undo history, restoring its
+ * content (text is saved per line) and linking it back into the
+ * document.
+ */
+
+// A history object needs to know about the DOM container holding the
+// document, the maximum amount of undo levels it should store, the
+// delay (of no input) after which it commits a set of changes, and,
+// unfortunately, the 'parent' window -- a window that is not in
+// designMode, and on which setTimeout works in every browser.
+function History(container, maxDepth, commitDelay, editor, onChange) {
+  this.container = container;
+  this.maxDepth = maxDepth; this.commitDelay = commitDelay;
+  this.editor = editor; this.parent = editor.parent;
+  this.onChange = onChange;
+  // This line object represents the initial, empty editor.
+  var initial = {text: "", from: null, to: null};
+  // As the borders between lines are represented by BR elements, the
+  // start of the first line and the end of the last one are
+  // represented by null. Since you can not store any properties
+  // (links to line objects) in null, these properties are used in
+  // those cases.
+  this.first = initial; this.last = initial;
+  // Similarly, a 'historyTouched' property is added to the BR in
+  // front of lines that have already been touched, and 'firstTouched'
+  // is used for the first line.
+  this.firstTouched = false;
+  // History is the set of committed changes, touched is the set of
+  // nodes touched since the last commit.
+  this.history = []; this.redoHistory = []; this.touched = [];
+}
+
+History.prototype = {
+  // Schedule a commit (if no other touches come in for commitDelay
+  // milliseconds).
+  scheduleCommit: function() {
+    var self = this;
+    this.parent.clearTimeout(this.commitTimeout);
+    this.commitTimeout = this.parent.setTimeout(function(){self.tryCommit();}, this.commitDelay);
+  },
+
+  // Mark a node as touched. Null is a valid argument.
+  touch: function(node) {
+    this.setTouched(node);
+    this.scheduleCommit();
+  },
+
+  // Undo the last change.
+  undo: function() {
+    // Make sure pending changes have been committed.
+    this.commit();
+
+    if (this.history.length) {
+      // Take the top diff from the history, apply it, and store its
+      // shadow in the redo history.
+      var item = this.history.pop();
+      this.redoHistory.push(this.updateTo(item, "applyChain"));
+      if (this.onChange) this.onChange();
+      return this.chainNode(item);
+    }
+  },
+
+  // Redo the last undone change.
+  redo: function() {
+    this.commit();
+    if (this.redoHistory.length) {
+      // The inverse of undo, basically.
+      var item = this.redoHistory.pop();
+      this.addUndoLevel(this.updateTo(item, "applyChain"));
+      if (this.onChange) this.onChange();
+      return this.chainNode(item);
+    }
+  },
+
+  clear: function() {
+    this.history = [];
+    this.redoHistory = [];
+  },
+
+  // Ask for the size of the un/redo histories.
+  historySize: function() {
+    return {undo: this.history.length, redo: this.redoHistory.length};
+  },
+
+  // Push a changeset into the document.
+  push: function(from, to, lines) {
+    var chain = [];
+    for (var i = 0; i < lines.length; i++) {
+      var end = (i == lines.length - 1) ? to : this.container.ownerDocument.createElement("BR");
+      chain.push({from: from, to: end, text: cleanText(lines[i])});
+      from = end;
+    }
+    this.pushChains([chain], from == null && to == null);
+  },
+
+  pushChains: function(chains, doNotHighlight) {
+    this.commit(doNotHighlight);
+    this.addUndoLevel(this.updateTo(chains, "applyChain"));
+    this.redoHistory = [];
+  },
+
+  // Retrieve a DOM node from a chain (for scrolling to it after undo/redo).
+  chainNode: function(chains) {
+    for (var i = 0; i < chains.length; i++) {
+      var start = chains[i][0], node = start && (start.from || start.to);
+      if (node) return node;
+    }
+  },
+
+  // Clear the undo history, make the current document the start
+  // position.
+  reset: function() {
+    this.history = []; this.redoHistory = [];
+  },
+
+  textAfter: function(br) {
+    return this.after(br).text;
+  },
+
+  nodeAfter: function(br) {
+    return this.after(br).to;
+  },
+
+  nodeBefore: function(br) {
+    return this.before(br).from;
+  },
+
+  // Commit unless there are pending dirty nodes.
+  tryCommit: function() {
+    if (!window.History) return; // Stop when frame has been unloaded
+    if (this.editor.highlightDirty()) this.commit(true);
+    else this.scheduleCommit();
+  },
+
+  // Check whether the touched nodes hold any changes, if so, commit
+  // them.
+  commit: function(doNotHighlight) {
+    this.parent.clearTimeout(this.commitTimeout);
+    // Make sure there are no pending dirty nodes.
+    if (!doNotHighlight) this.editor.highlightDirty(true);
+    // Build set of chains.
+    var chains = this.touchedChains(), self = this;
+
+    if (chains.length) {
+      this.addUndoLevel(this.updateTo(chains, "linkChain"));
+      this.redoHistory = [];
+      if (this.onChange) this.onChange();
+    }
+  },
+
+  // [ end of public interface ]
+
+  // Update the document with a given set of chains, return its
+  // shadow. updateFunc should be "applyChain" or "linkChain". In the
+  // second case, the chains are taken to correspond the the current
+  // document, and only the state of the line data is updated. In the
+  // first case, the content of the chains is also pushed iinto the
+  // document.
+  updateTo: function(chains, updateFunc) {
+    var shadows = [], dirty = [];
+    for (var i = 0; i < chains.length; i++) {
+      shadows.push(this.shadowChain(chains[i]));
+      dirty.push(this[updateFunc](chains[i]));
+    }
+    if (updateFunc == "applyChain")
+      this.notifyDirty(dirty);
+    return shadows;
+  },
+
+  // Notify the editor that some nodes have changed.
+  notifyDirty: function(nodes) {
+    forEach(nodes, method(this.editor, "addDirtyNode"))
+    this.editor.scheduleHighlight();
+  },
+
+  // Link a chain into the DOM nodes (or the first/last links for null
+  // nodes).
+  linkChain: function(chain) {
+    for (var i = 0; i < chain.length; i++) {
+      var line = chain[i];
+      if (line.from) line.from.historyAfter = line;
+      else this.first = line;
+      if (line.to) line.to.historyBefore = line;
+      else this.last = line;
+    }
+  },
+
+  // Get the line object after/before a given node.
+  after: function(node) {
+    return node ? node.historyAfter : this.first;
+  },
+  before: function(node) {
+    return node ? node.historyBefore : this.last;
+  },
+
+  // Mark a node as touched if it has not already been marked.
+  setTouched: function(node) {
+    if (node) {
+      if (!node.historyTouched) {
+        this.touched.push(node);
+        node.historyTouched = true;
+      }
+    }
+    else {
+      this.firstTouched = true;
+    }
+  },
+
+  // Store a new set of undo info, throw away info if there is more of
+  // it than allowed.
+  addUndoLevel: function(diffs) {
+    this.history.push(diffs);
+    if (this.history.length > this.maxDepth)
+      this.history.shift();
+  },
+
+  // Build chains from a set of touched nodes.
+  touchedChains: function() {
+    var self = this;
+
+    // The temp system is a crummy hack to speed up determining
+    // whether a (currently touched) node has a line object associated
+    // with it. nullTemp is used to store the object for the first
+    // line, other nodes get it stored in their historyTemp property.
+    var nullTemp = null;
+    function temp(node) {return node ? node.historyTemp : nullTemp;}
+    function setTemp(node, line) {
+      if (node) node.historyTemp = line;
+      else nullTemp = line;
+    }
+
+    function buildLine(node) {
+      var text = [];
+      for (var cur = node ? node.nextSibling : self.container.firstChild;
+           cur && cur.nodeName != "BR"; cur = cur.nextSibling)
+        if (cur.currentText) text.push(cur.currentText);
+      return {from: node, to: cur, text: cleanText(text.join(""))};
+    }
+
+    // Filter out unchanged lines and nodes that are no longer in the
+    // document. Build up line objects for remaining nodes.
+    var lines = [];
+    if (self.firstTouched) self.touched.push(null);
+    forEach(self.touched, function(node) {
+      if (node && node.parentNode != self.container) return;
+
+      if (node) node.historyTouched = false;
+      else self.firstTouched = false;
+
+      var line = buildLine(node), shadow = self.after(node);
+      if (!shadow || shadow.text != line.text || shadow.to != line.to) {
+        lines.push(line);
+        setTemp(node, line);
+      }
+    });
+
+    // Get the BR element after/before the given node.
+    function nextBR(node, dir) {
+      var link = dir + "Sibling", search = node[link];
+      while (search && search.nodeName != "BR")
+        search = search[link];
+      return search;
+    }
+
+    // Assemble line objects into chains by scanning the DOM tree
+    // around them.
+    var chains = []; self.touched = [];
+    forEach(lines, function(line) {
+      // Note that this makes the loop skip line objects that have
+      // been pulled into chains by lines before them.
+      if (!temp(line.from)) return;
+
+      var chain = [], curNode = line.from, safe = true;
+      // Put any line objects (referred to by temp info) before this
+      // one on the front of the array.
+      while (true) {
+        var curLine = temp(curNode);
+        if (!curLine) {
+          if (safe) break;
+          else curLine = buildLine(curNode);
+        }
+        chain.unshift(curLine);
+        setTemp(curNode, null);
+        if (!curNode) break;
+        safe = self.after(curNode);
+        curNode = nextBR(curNode, "previous");
+      }
+      curNode = line.to; safe = self.before(line.from);
+      // Add lines after this one at end of array.
+      while (true) {
+        if (!curNode) break;
+        var curLine = temp(curNode);
+        if (!curLine) {
+          if (safe) break;
+          else curLine = buildLine(curNode);
+        }
+        chain.push(curLine);
+        setTemp(curNode, null);
+        safe = self.before(curNode);
+        curNode = nextBR(curNode, "next");
+      }
+      chains.push(chain);
+    });
+
+    return chains;
+  },
+
+  // Find the 'shadow' of a given chain by following the links in the
+  // DOM nodes at its start and end.
+  shadowChain: function(chain) {
+    var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to;
+    while (true) {
+      shadows.push(next);
+      var nextNode = next.to;
+      if (!nextNode || nextNode == end)
+        break;
+      else
+        next = nextNode.historyAfter || this.before(end);
+      // (The this.before(end) is a hack -- FF sometimes removes
+      // properties from BR nodes, in which case the best we can hope
+      // for is to not break.)
+    }
+    return shadows;
+  },
+
+  // Update the DOM tree to contain the lines specified in a given
+  // chain, link this chain into the DOM nodes.
+  applyChain: function(chain) {
+    // Some attempt is made to prevent the cursor from jumping
+    // randomly when an undo or redo happens. It still behaves a bit
+    // strange sometimes.
+    var cursor = select.cursorPos(this.container, false), self = this;
+
+    // Remove all nodes in the DOM tree between from and to (null for
+    // start/end of container).
+    function removeRange(from, to) {
+      var pos = from ? from.nextSibling : self.container.firstChild;
+      while (pos != to) {
+        var temp = pos.nextSibling;
+        removeElement(pos);
+        pos = temp;
+      }
+    }
+
+    var start = chain[0].from, end = chain[chain.length - 1].to;
+    // Clear the space where this change has to be made.
+    removeRange(start, end);
+
+    // Insert the content specified by the chain into the DOM tree.
+    for (var i = 0; i < chain.length; i++) {
+      var line = chain[i];
+      // The start and end of the space are already correct, but BR
+      // tags inside it have to be put back.
+      if (i > 0)
+        self.container.insertBefore(line.from, end);
+
+      // Add the text.
+      var node = makePartSpan(fixSpaces(line.text), this.container.ownerDocument);
+      self.container.insertBefore(node, end);
+      // See if the cursor was on this line. Put it back, adjusting
+      // for changed line length, if it was.
+      if (cursor && cursor.node == line.from) {
+        var cursordiff = 0;
+        var prev = this.after(line.from);
+        if (prev && i == chain.length - 1) {
+          // Only adjust if the cursor is after the unchanged part of
+          // the line.
+          for (var match = 0; match < cursor.offset &&
+               line.text.charAt(match) == prev.text.charAt(match); match++);
+          if (cursor.offset > match)
+            cursordiff = line.text.length - prev.text.length;
+        }
+        select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)});
+      }
+      // Cursor was in removed line, this is last new line.
+      else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) {
+        select.setCursorPos(this.container, {node: line.from, offset: line.text.length});
+      }
+    }
+
+    // Anchor the chain in the DOM tree.
+    this.linkChain(chain);
+    return start;
+  }
+};
diff --git a/redakcja/static/js/lib/codemirror/util.js b/redakcja/static/js/lib/codemirror/util.js
new file mode 100644 (file)
index 0000000..796025e
--- /dev/null
@@ -0,0 +1,125 @@
+/* A few useful utility functions. */
+
+var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent);
+var webkit = /AppleWebKit/.test(navigator.userAgent);
+var safari = /Apple Computers, Inc/.test(navigator.vendor);
+
+// Capture a method on an object.
+function method(obj, name) {
+  return function() {obj[name].apply(obj, arguments);};
+}
+
+// The value used to signal the end of a sequence in iterators.
+var StopIteration = {toString: function() {return "StopIteration"}};
+
+// Apply a function to each element in a sequence.
+function forEach(iter, f) {
+  if (iter.next) {
+    try {while (true) f(iter.next());}
+    catch (e) {if (e != StopIteration) throw e;}
+  }
+  else {
+    for (var i = 0; i < iter.length; i++)
+      f(iter[i]);
+  }
+}
+
+// Map a function over a sequence, producing an array of results.
+function map(iter, f) {
+  var accum = [];
+  forEach(iter, function(val) {accum.push(f(val));});
+  return accum;
+}
+
+// Create a predicate function that tests a string againsts a given
+// regular expression. No longer used but might be used by 3rd party
+// parsers.
+function matcher(regexp){
+  return function(value){return regexp.test(value);};
+}
+
+// Test whether a DOM node has a certain CSS class. Much faster than
+// the MochiKit equivalent, for some reason.
+function hasClass(element, className){
+  var classes = element.className;
+  return classes && new RegExp("(^| )" + className + "($| )").test(classes);
+}
+
+// Insert a DOM node after another node.
+function insertAfter(newNode, oldNode) {
+  var parent = oldNode.parentNode;
+  parent.insertBefore(newNode, oldNode.nextSibling);
+  return newNode;
+}
+
+function removeElement(node) {
+  if (node.parentNode)
+    node.parentNode.removeChild(node);
+}
+
+function clearElement(node) {
+  while (node.firstChild)
+    node.removeChild(node.firstChild);
+}
+
+// Check whether a node is contained in another one.
+function isAncestor(node, child) {
+  while (child = child.parentNode) {
+    if (node == child)
+      return true;
+  }
+  return false;
+}
+
+// The non-breaking space character.
+var nbsp = "\u00a0";
+var matching = {"{": "}", "[": "]", "(": ")",
+                "}": "{", "]": "[", ")": "("};
+
+// Standardize a few unportable event properties.
+function normalizeEvent(event) {
+  if (!event.stopPropagation) {
+    event.stopPropagation = function() {this.cancelBubble = true;};
+    event.preventDefault = function() {this.returnValue = false;};
+  }
+  if (!event.stop) {
+    event.stop = function() {
+      this.stopPropagation();
+      this.preventDefault();
+    };
+  }
+
+  if (event.type == "keypress") {
+    event.code = (event.charCode == null) ? event.keyCode : event.charCode;
+    event.character = String.fromCharCode(event.code);
+  }
+  return event;
+}
+
+// Portably register event handlers.
+function addEventHandler(node, type, handler, removeFunc) {
+  function wrapHandler(event) {
+    handler(normalizeEvent(event || window.event));
+  }
+  if (typeof node.addEventListener == "function") {
+    node.addEventListener(type, wrapHandler, false);
+    if (removeFunc) return function() {node.removeEventListener(type, wrapHandler, false);};
+  }
+  else {
+    node.attachEvent("on" + type, wrapHandler);
+    if (removeFunc) return function() {node.detachEvent("on" + type, wrapHandler);};
+  }
+}
+
+function nodeText(node) {
+  return node.textContent || node.innerText || node.nodeValue || "";
+}
+
+function nodeTop(node) {
+  var top = 0;
+  while (node.offsetParent) {
+    top += node.offsetTop;
+    node = node.offsetParent;
+  }
+  return top;
+}
diff --git a/redakcja/static/js/slugify.js b/redakcja/static/js/slugify.js
new file mode 100644 (file)
index 0000000..9e17ba7
--- /dev/null
@@ -0,0 +1,126 @@
+(function() {
+    var ALL_DOWNCODE_MAPS = new Array()
+
+    ALL_DOWNCODE_MAPS[0] = {
+        // LATIN_MAP
+        'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç':
+        'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I',
+        'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö':
+        'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U',
+        'Ý': 'Y', 'Þ': 'TH', 'ß': 'ss', 'à':'a', 'á':'a', 'â': 'a', 'ã': 'a', 'ä':
+        'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e',
+        'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó':
+        'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u',
+        'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y'
+    }
+    ALL_DOWNCODE_MAPS[1] = {
+        // LATIN_SYMBOLS_MAP
+        '©':'(c)'
+    }
+    ALL_DOWNCODE_MAPS[2] = {
+        // GREEK_MAP
+        'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h', 'θ':'8',
+        'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'3', 'ο':'o', 'π':'p',
+        'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w',
+        'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w', 'ς':'s',
+        'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i',
+        'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H', 'Θ':'8',
+        'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'3', 'Ο':'O', 'Π':'P',
+        'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'PS', 'Ω':'W',
+        'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W', 'Ϊ':'I',
+        'Ϋ':'Y'
+    }
+    ALL_DOWNCODE_MAPS[3] = {
+        // TURKISH_MAP
+        'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
+        'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
+    }
+    ALL_DOWNCODE_MAPS[4] = {
+        // RUSSIAN_MAP
+        'а':'a', 'б':'b', 'в':'v', 'г':'g', 'д':'d', 'е':'e', 'ё':'yo', 'ж':'zh',
+        'з':'z', 'и':'i', 'й':'j', 'к':'k', 'л':'l', 'м':'m', 'н':'n', 'о':'o',
+        'п':'p', 'р':'r', 'с':'s', 'т':'t', 'у':'u', 'ф':'f', 'х':'h', 'ц':'c',
+        'ч':'ch', 'ш':'sh', 'щ':'sh', 'ъ':'', 'ы':'y', 'ь':'', 'э':'e', 'ю':'yu',
+        'я':'ya',
+        'А':'A', 'Б':'B', 'В':'V', 'Г':'G', 'Д':'D', 'Е':'E', 'Ё':'Yo', 'Ж':'Zh',
+        'З':'Z', 'И':'I', 'Й':'J', 'К':'K', 'Л':'L', 'М':'M', 'Н':'N', 'О':'O',
+        'П':'P', 'Р':'R', 'С':'S', 'Т':'T', 'У':'U', 'Ф':'F', 'Х':'H', 'Ц':'C',
+        'Ч':'Ch', 'Ш':'Sh', 'Щ':'Sh', 'Ъ':'', 'Ы':'Y', 'Ь':'', 'Э':'E', 'Ю':'Yu',
+        'Я':'Ya'
+    }
+    ALL_DOWNCODE_MAPS[5] = {
+        // UKRAINIAN_MAP
+        'Є':'Ye', 'І':'I', 'Ї':'Yi', 'Ґ':'G', 'є':'ye', 'і':'i', 'ї':'yi', 'ґ':'g'
+    }
+    ALL_DOWNCODE_MAPS[6] = {
+        // CZECH_MAP
+        'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
+        'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
+        'Ů':'U', 'Ž':'Z'
+    }
+
+    ALL_DOWNCODE_MAPS[7] = {
+        // POLISH_MAP
+        'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
+        'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'e', 'Ł':'L', 'Ń':'N', 'Ó':'o', 'Ś':'S',
+        'Ź':'Z', 'Ż':'Z'
+    }
+
+    ALL_DOWNCODE_MAPS[8] = {
+        // LATVIAN_MAP
+        'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
+        'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
+        'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
+    }
+
+    var Downcoder = new Object();
+
+    Downcoder.Initialize = function() {
+        if (Downcoder.map) // already made
+            return ;
+        Downcoder.map ={}
+        Downcoder.chars = '';
+        for(var i in ALL_DOWNCODE_MAPS) {
+            var lookup = ALL_DOWNCODE_MAPS[i]
+            for (var c in lookup) {
+                Downcoder.map[c] = lookup[c];
+                Downcoder.chars += c;
+            }
+         }
+        Downcoder.regex = new RegExp('[' + Downcoder.chars + ']|[^' + Downcoder.chars + ']+','g');
+    }
+
+    downcode = function(slug) {
+        Downcoder.Initialize();
+        var downcoded =""
+        var pieces = slug.match(Downcoder.regex);
+        if(pieces) {
+            for (var i = 0 ; i < pieces.length ; i++) {
+                if (pieces[i].length == 1) {
+                    var mapped = Downcoder.map[pieces[i]];
+                    if (mapped != null) {
+                        downcoded+=mapped;
+                        continue;
+                    }
+                }
+                downcoded+=pieces[i];
+            }
+        } else {
+            downcoded = slug;
+        }
+        return downcoded;
+    }
+
+    slugify = function(s) {
+        s = downcode(s);
+        // if downcode doesn't hit, the char will be stripped here
+        s = s.replace(/[^-\w\s]/g, '');  // remove unneeded chars
+        s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
+        s = s.replace(/[-\s]+/g, '-');   // convert spaces to hyphens
+        s = s.toLowerCase();             // convert to lowercase
+
+        return s;
+    }
+})();
+
+
diff --git a/redakcja/static/js/wiki/base.js b/redakcja/static/js/wiki/base.js
new file mode 100644 (file)
index 0000000..523ad96
--- /dev/null
@@ -0,0 +1,338 @@
+(function($)
+{
+       var noop = function() { };
+
+       $.wiki = {
+               perspectives: {},
+               cls: {},
+               state: {
+                       "version": 1,
+                       "perspectives": {
+                               "ScanGalleryPerspective": {
+                                       "show": true,
+                                       "page": 1
+                               },
+                               "CodeMirrorPerspective": {}
+                               /*
+                               "VisualPerspective": {},
+                               "HistoryPerspective": {},
+                               "SummaryPerspective": {}
+                               */
+                       }
+               }
+       };
+
+       $.wiki.loadConfig = function() {
+               if(!window.localStorage)
+                       return;
+
+               try {
+                       var value = window.localStorage.getItem(CurrentDocument.id) || "{}";
+                       var config = JSON.parse(value);
+
+                       if (config.version == $.wiki.state.version) {
+                               $.wiki.state.perspectives = $.extend($.wiki.state.perspectives, config.perspectives);
+                       }
+               } catch(e) {
+                       console.log("Failed to load config, using default.");
+               }
+
+               console.log("Loaded:", $.wiki.state, $.wiki.state.version);
+       };
+
+       $(window).bind('unload', function() {
+               if(window.localStorage)
+                       window.localStorage.setItem(CurrentDocument.id, JSON.stringify($.wiki.state));
+       })
+
+
+       $.wiki.activePerspective = function() {
+               return this.perspectives[$("#tabs li.active").attr('id')];
+       };
+
+       $.wiki.exitContext = function() {
+               var ap = this.activePerspective();
+               if(ap) ap.onExit();
+               return ap;
+       };
+
+       $.wiki.enterContext = function(ap) {
+               if(ap) ap.onEnter();
+       };
+
+       $.wiki.isDirty = function() {
+               var ap = this.activePerspective();
+               return (!!CurrentDocument && CurrentDocument.has_local_changes) || ap.dirty();
+       };
+
+       $.wiki.newTab = function(doc, title, klass) {
+               var base_id = 'id' + Math.floor(Math.random()* 5000000000);
+               var id = (''+klass)+'_' + base_id;
+               var $tab = $('<li id="'+id+'" data-ui-related="'+base_id+'" data-ui-jsclass="'+klass+'" >'
+                               + title + '<img src="/static/icons/close.png" class="tabclose"></li>');
+               var $view = $('<div class="editor '+klass+'" id="'+base_id+'"> </div>');
+
+               this.perspectives[id] = new $.wiki[klass]({
+                       doc: doc,
+                       id: id,
+                       base_id: base_id,
+               });
+
+               $('#tabs').append($tab);
+               $view.hide().appendTo('#editor');
+               return {
+                       tab: $tab[0],
+                       view: $view[0],
+               };
+       };
+
+       $.wiki.initTab = function(options) {
+               var klass = $(options.tab).attr('data-ui-jsclass');
+
+               return new $.wiki[klass]({
+                       doc: options.doc,
+                       id: $(options.tab).attr('id'),
+                       callback: function() {
+                               $.wiki.perspectives[this.perspective_id] = this;
+                               if(options.callback)
+                                       options.callback.call(this);
+                       }
+               });
+       };
+
+       $.wiki.perspectiveForTab = function(tab) { // element or id
+               return this.perspectives[ $(tab).attr('id')];
+       }
+
+       $.wiki.switchToTab = function(tab){
+               var self = this;
+               var $tab = $(tab);
+
+               if($tab.length != 1)
+                       $tab = $(DEFAULT_PERSPECTIVE);
+
+               var $old = $('#tabs li').filter('.active');
+
+               $old.each(function(){
+                       $(this).removeClass('active');
+                       self.perspectives[$(this).attr('id')].onExit();
+                       $('#' + $(this).attr('data-ui-related')).hide();
+               });
+
+               /* show new */
+               $tab.addClass('active');
+               $('#' + $tab.attr('data-ui-related')).show();
+
+               console.log($tab);
+               console.log($.wiki.perspectives);
+
+               $.wiki.perspectives[$tab.attr('id')].onEnter();
+       };
+
+       /*
+        * Basic perspective.
+        */
+       $.wiki.Perspective = function(options) {
+               if(!options) return;
+
+               this.doc = options.doc;
+               if (options.id) {
+                       this.perspective_id = options.id;
+               }
+               else {
+                       this.perspective_id = '';
+               }
+
+               if(options.callback)
+                       options.callback.call(this);
+       };
+
+       $.wiki.Perspective.prototype.config = function() {
+               return $.wiki.state.perspectives[this.perspective_id];
+       }
+
+       $.wiki.Perspective.prototype.toString = function() {
+               return this.perspective_id;
+       };
+
+       $.wiki.Perspective.prototype.dirty = function() {
+               return true;
+       };
+
+       $.wiki.Perspective.prototype.onEnter = function () {
+               // called when perspective in initialized
+               if (!this.noupdate_hash_onenter) {
+                       document.location.hash = '#' + this.perspective_id;
+               }
+       };
+
+       $.wiki.Perspective.prototype.onExit = function () {
+               // called when user switches to another perspective
+               if (!this.noupdate_hash_onenter) {
+                       document.location.hash = '';
+               }
+       };
+
+       $.wiki.Perspective.prototype.destroy = function() {
+               // pass
+       };
+
+       $.wiki.Perspective.prototype.freezeState = function () {
+               // free UI state (don't store data here)
+       };
+
+       $.wiki.Perspective.prototype.unfreezeState = function (frozenState) {
+               // restore UI state
+       };
+
+       /*
+        * Stub rendering (used in generating history)
+        */
+       $.wiki.renderStub = function(params)
+       {
+               params = $.extend({ 'filters': {} }, params);
+               var $elem = params.stub.clone();
+               $elem.removeClass('row-stub');
+               params.container.append($elem);
+
+               $('*[data-stub-value]', $elem).each(function() {
+                       var $this = $(this);
+                       var field = $this.attr('data-stub-value');
+
+                       var value = params.data[field];
+
+                       if(params.filters[field])
+                               value = params.filters[field](value);
+
+                       if(value === null || value === undefined) return;
+
+                       if(!$this.attr('data-stub-target')) {
+                               $this.text(value);
+                       }
+                       else {
+                               $this.attr($this.attr('data-stub-target'), value);
+                               $this.removeAttr('data-stub-target');
+                               $this.removeAttr('data-stub-value');
+                       }
+               });
+
+               $elem.show();
+               return $elem;
+       };
+
+       /*
+        * Dialogs
+        */
+       function GenericDialog(element) {
+               if(!element) return;
+
+               var self = this;
+
+               self.$elem = $(element);
+
+               if(!self.$elem.attr('data-ui-initialized')) {
+                       console.log("Initializing dialog", this);
+                       self.initialize();
+                       self.$elem.attr('data-ui-initialized', true);
+               }
+
+               self.show();
+       };
+
+       GenericDialog.prototype = {
+
+               /*
+               * Steps to follow when the dialog in first loaded on page.
+               */
+               initialize: function(){
+                       var self = this;
+
+                       /* bind buttons */
+                       $('button[data-ui-action]', self.$elem).click(function(event) {
+                               event.preventDefault();
+
+                               var action = $(this).attr('data-ui-action');
+                               console.log("Button pressed, action: ", action);
+
+                               try {
+                                       self[action + "Action"].call(self);
+                               } catch(e) {
+                                       console.log("Action failed:", e);
+                                       // always hide on cancel
+                                       if(action == 'cancel')
+                                               self.hide();
+                               }
+                       });
+               },
+
+               /*
+                * Prepare dialog for user. Clear any unnessary data.
+               */
+               show: function() {
+                       $.blockUI({
+                               message: this.$elem,
+                               css: {
+                                       'top': '25%',
+                                       'left': '25%',
+                                       'width': '50%'
+                               }
+                       });
+               },
+
+               hide: function(){
+                       $.unblockUI();
+               },
+
+               cancelAction: function() {
+                       this.hide();
+               },
+
+               doneAction: function() {
+                       this.hide();
+               },
+
+               clearForm: function() {
+                       $("*[data-ui-error-for]", this.$elem).text('');
+               },
+
+               reportErrors: function(errors) {
+                       var global = $("*[data-ui-error-for='__all__']", this.$elem);
+                       var unassigned = [];
+
+                       for (var field_name in errors)
+                       {
+                               var span = $("*[data-ui-error-for='"+field_name+"']", this.$elem);
+
+                               if(!span.length) {
+                                       unassigned.push(field_name);
+                                       continue;
+                               }
+
+                               span.text(errors[field_name].join(' '));
+                       }
+
+                       if(unassigned.length > 0)
+                               global.text( global.text() + 'W formularzu wystąpiły błędy');
+               }
+       };
+
+       $.wiki.cls.GenericDialog = GenericDialog;
+
+       $.wiki.showDialog = function(selector, options) {
+               var elem = $(selector);
+
+               if(elem.length != 1) {
+                       console.log("Failed to show dialog:", selector, elem);
+                       return false;
+               }
+
+               try {
+                   var klass = elem.attr('data-ui-jsclass');
+                       return new $.wiki.cls[klass](elem, options);
+               } catch(e) {
+                       console.log("Failed to show dialog", selector, klass, e);
+                       return false;
+               }
+       };
+
+})(jQuery);
diff --git a/redakcja/static/js/wiki/dialog_addtag.js b/redakcja/static/js/wiki/dialog_addtag.js
new file mode 100644 (file)
index 0000000..1a90ccf
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Dialog for saving document to the server
+ *
+ */
+(function($){
+
+    function AddTagDialog(element, options){
+        if (!options.revision  && options.revision != 0)
+            throw "AddTagDialog needs a revision number.";
+
+        this.ctx = $.wiki.exitContext();
+        this.clearForm();
+
+        /* fill out hidden fields */
+        this.$form = $('form', element);
+
+        $("input[name='addtag-id']", this.$form).val(CurrentDocument.id);
+        $("input[name='addtag-revision']", this.$form).val(options.revision);
+
+        $.wiki.cls.GenericDialog.call(this, element);
+    };
+
+    AddTagDialog.prototype = $.extend(new $.wiki.cls.GenericDialog(), {
+        cancelAction: function(){
+            $.wiki.enterContext(this.ctx);
+            this.hide();
+        },
+
+        saveAction: function(){
+            var self = this;
+
+            self.$elem.block({
+                message: "Dodawanie tagu",
+                fadeIn: 0,
+            });
+
+            CurrentDocument.setTag({
+                form: self.$form,
+                success: function(doc, changed, info){
+                    self.$elem.block({
+                        message: info,
+                        timeout: 2000,
+                        fadeOut: 0,
+                        onUnblock: function(){
+                            self.hide();
+                            $.wiki.enterContext(self.ctx);
+                        }
+                    });
+                },
+                failure: function(doc, info){
+                    console.log("Failure", info);
+                    self.reportErrors(info);
+                    self.$elem.unblock();
+                }
+            });
+        }
+    });
+
+    /* make it global */
+    $.wiki.cls.AddTagDialog = AddTagDialog;
+})(jQuery);
diff --git a/redakcja/static/js/wiki/dialog_save.js b/redakcja/static/js/wiki/dialog_save.js
new file mode 100644 (file)
index 0000000..916f326
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Dialog for saving document to the server
+ *
+ */
+(function($) {
+
+       function SaveDialog(element) {
+               this.ctx = $.wiki.exitContext();
+               this.clearForm();
+
+               /* fill out hidden fields */
+               this.$form = $('form', element);
+
+               $("input[name='textsave-id']", this.$form).val(CurrentDocument.id);
+               $("input[name='textsave-parent_revision']", this.$form).val(CurrentDocument.revision);
+
+               $.wiki.cls.GenericDialog.call(this, element);
+       };
+
+       SaveDialog.prototype = new $.wiki.cls.GenericDialog();
+
+       SaveDialog.prototype.cancelAction = function() {
+               $.wiki.enterContext(this.ctx);
+               this.hide();
+       };
+
+       SaveDialog.prototype.saveAction = function() {
+                       var self = this;
+
+                       self.$elem.block({
+                               message: "Zapisywanie...",
+                               fadeIn: 0,
+                       });
+
+                       try {
+
+                               CurrentDocument.save({
+                                       form: self.$form,
+                                       success: function(doc, changed, info){
+                                               self.$elem.block({
+                                                       message: info,
+                                                       timeout: 2000,
+                                                       fadeOut: 0,
+                                                       onUnblock: function() {
+                                                               self.hide();
+                                                               $.wiki.enterContext(self.ctx);
+                                                       }
+                                               });
+                                       },
+                                       failure: function(doc, info) {
+                                               console.log("Failure", info);
+                                               self.reportErrors(info);
+                                               self.$elem.unblock();
+                                       }
+                               });
+                       } catch(e) {
+                               console.log('Exception:', e)
+                               self.$elem.unblock();
+                       }
+       }; /* end of save dialog */
+
+       /* make it global */
+       $.wiki.cls.SaveDialog = SaveDialog;
+})(jQuery);
diff --git a/redakcja/static/js/wiki/loader.js b/redakcja/static/js/wiki/loader.js
new file mode 100644 (file)
index 0000000..a441402
--- /dev/null
@@ -0,0 +1,146 @@
+if (!window.console) {
+    window.console = {
+        log: function(){
+        }
+    }
+}
+
+var DEFAULT_PERSPECTIVE = "#SummaryPerspective";
+
+THEMES = [
+       'Alkohol', 'Ambicja', 'Anioł', 'Antysemityzm', 'Arkadia', 'Artysta', 'Bezdomność', 'Bezpieczeństwo', 'Bieda', 'Bijatyka', 'Błazen', 'Błądzenie', 'Błoto', 'Bogactwo', 'Bóg', 'Brat', 'Bunt', 'Buntownik', 'Burza', 'Car', 'Carpe diem', 'Ciemność', 'Cień', 'Cisza', 'Chciwość', 'Chleb', 'Chłop', 'Choroba', 'Chrystus', 'Chrzest', 'Ciało', 'Cierpienie', 'Cmentarz', 'Cnota', 'Córka', 'Cud', 'Czarownika', 'Czary', 'Czas', 'Czyn', 'Czyściec', 'Dama', 'Danse macabre', 'Deszcz', 'Diabeł', 'Dobro', 'Dom', 'Dorosłość', 'Drzewo', 'Duch', 'Dusza', 'Duma', 'Dworek', 'Dworzanin', 'Dwór', 'Dzieciństwo', 'Dziecko', 'Dziedzictwo', 'Dziewictwo', 'Dźwięk', 'Egzorcyzm', 'Elita', 'Emigrant', 'Fałsz', 'Filozof', 'Fircyk', 'Flirt', 'Głupiec', 'Głupota', 'Głód', 'Gospodarz', 'Gospodyni', 'Gość', 'Gotycyzm', 'Góra', 'Gra', 'Grób', 'Grzech', 'Grzeczność', 'Gwiazda', 'Handel', 'Hańba', 'Historia', 'Honor', 'Idealista', 'Imię', 'Interes', 'Jabłka', 'Jedzenie', 'Jesień', 'Kaleka', 'Kara', 'Karczma', 'Klęska', 'Kłamstwo', 'Kłótnia', 'Kobieta', 'Kobieta demoniczna', 'Kobieta "upadła"', 'Kochanek', 'Kochanek romantyczny', 'Kolonializm', 'Kondycja ludzka', 'Konflikt', 'Konflikt wewnętrzny', 'Koniec świata', 'Koń', 'Korzyść', 'Kot', 'Kradzież', 'Krew', 'Król', 'Krzywda', 'Ksiądz', 'Książka', 'Księżyc', 'Kuchnia', 'Kuszenie', 'Kwiaty', 'Labirynt', 'Las', 'Lato', 'Lekarz', 'Lenistwo', 'List', 'Liberat', 'Los', 'Lud', 'Lustro', 'Łzy', 'Małżeństwo', 'Marzenie', 'Maska', 'Maszyna', 'Matka', 'Matka Boska', 'Mądrość', 'Mąż', 'Melancholia', 'Mędrzec', 'Mężczyzna', 'Miasto', 'Mieszczanin', 'Miłosierdzie', 'Miłość', 'Miłość niespełniona', 'Miłość platoniczna', 'Miłość romantyczna', 'Miłość silniejsza niż śmierć', 'Miłość spełniona', 'Miłość tragiczna', 'Mizoginia', 'Młodość', 'Moda', 'Modlitwa', 'Morderstwo', 'Morze', 'Motyl', 'Mucha', 'Muzyka', 'Narodziny', 'Naród', 'Natura', 'Nauczyciel', 'Nauczycielka', 'Nauka', 'Niebezpieczeństwo', 'Niedziela', 'Niemiec', 'Nienawiść', 'Nieśmiertelność', 'Niewola', 'Noc', 'Nuda', 'Obcy', 'Obłok', 'Obowiązek', 'Obraz świata', 'Obrzędy', 'Obyczaje', 'Obywatel', 'Odrodzenie przez grób', 'Odwaga', 'Ofiara', 'Ogień', 'Ogród', 'Ojciec', 'Ojczyzna', 'Oko', 'Okręt', 'Okrucieństwo', 'Omen', 'Opieka', 'Organizm', 'Otchłań', 'Pająk', 'Pamięć', 'Pan', 'Panna młoda', 'Państwo', 'Patriota', 'Piekło', 'Pielgrzym', 'Pieniądz', 'Pies', 'Piętno', 'Pijaństwo', 'Piwnica', 'Plotka', 'Pobożność', 'Pocałunek', 'Pochlebstwo', 'Poeta', 'Poetka', 'Poezja', 'Podróż', 'Podstęp', 'Pogrzeb', 'Pojedynek', 'Pokora', 'Pokusa', 'Polak', 'Polityka', 'Polowanie', 'Polska', 'Portret', 'Porwanie', 'Poświęcenie', 'Potwór', 'Powstanie', 'Powstaniec', 'Pozory', 'Pozycja społeczna', 'Pożar', 'Pożądanie', 'Praca', 'Praca u podstaw', 'Praca organiczna', 'Prawda', 'Prawnik', 'Prometeusz', 'Proroctwo', 'Prorok', 'Próżność', 'Przebranie', 'Przeczucie', 'Przedmurze chrześcijaństwa', 'Przekleństwo', 'Przekupstwo', 'Przemiana', 'Przemijanie', 'Przemoc', 'Przestrzeń', 'Przyjaźń', 'Przyroda nieożywiona', 'Przysięga', 'Przywódca', 'Ptak', 'Pustynia', 'Pycha', 'Raj', 'Realista', 'Religia', 'Rewolucja', 'Robak', 'Robotnik', 'Rodzina', 'Rosja', 'Rosjanin', 'Rośliny', 'Rozczarowanie', 'Rozpacz', 'Rozstanie', 'Rozum', 'Ruiny', 'Rycerz', 'Rzeka', 'Salon', 'Samobójstwo', 'Samolubstwo', 'Samotnik', 'Samotność', 'Sarmata', 'Sąsiad', 'Sąd', 'Sąd Ostateczny', 'Sen', 'Serce', 'Sędzia', 'Sielanka', 'Sierota', 'Siła', 'Siostra', 'Sława', 'Słońce', 'Słowo', 'Sługa', 'Służalczość', 'Skąpiec', 'Sobowtór', 'Społecznik', 'Spowiedź', 'Sprawiedliwość', 'Starość', 'Strach', 'Strój', 'Stworzenie', 'Sumienie', 'Swaty', 'Syberia', 'Syn', 'Syn marnotrawny', 'Syzyf', 'Szaleniec', 'Szaleństwo', 'Szantaż', 'Szatan', 'Szczęście', 'Szkoła', 'Szlachcic', 'Szpieg', 'Sztuka', 'Ślub', 'Śmiech', 'Śmierć', 'Śmierć bohaterska', 'Śpiew', 'Światło', 'Świętoszek', 'Święty', 'Świt', 'Tajemnica', 'Taniec', 'Tchórzostwo', 'Teatr', 'Testament', 'Tęsknota', 'Theatrum mundi', 'Tłum', 'Trucizna', 'Trup', 'Twórczość', 'Uczeń', 'Uczta', 'Uroda', 'Umiarkowanie', 'Upadek', 'Upiór', 'Urzędnik', 'Vanitas', 'Walka', 'Walka klas', 'Wampir', 'Warszawa', 'Wąż', 'Wdowa', 'Wdowiec', 'Wesele', 'Wiatr', 'Wierność', 'Wierzenia', 'Wieś', 'Wiedza', 'Wieża Babel', 'Więzienie', 'Więzień', 'Wina', 'Wino', 'Wiosna', 'Wizja', 'Władza', 'Własność', 'Woda', 'Wojna', 'Wojna pokoleń', 'Wolność', 'Wróg', 'Wspomnienia', 'Współpraca', 'Wygnanie', 'Wyrzuty sumienia', 'Wyspa', 'Wzrok', 'Zabawa', 'Zabobony', 'Zamek', 'Zaręczyny', 'Zaświaty', 'Zazdrość', 'Zbawienie', 'Zbrodnia', 'Zbrodniarz', 'Zdrada', 'Zdrowie', 'Zemsta', 'Zesłaniec', 'Ziarno', 'Ziemia', 'Zima', 'Zło', 'Złodziej', 'Złoty wiek', 'Zmartwychwstanie', 'Zwątpienie', 'Zwierzęta', 'Zwycięstwo', 'Żałoba', 'Żebrak', 'Żołnierz', 'Żona', 'Życie jako wędrówka', 'Życie snem', 'Żyd', 'Żywioły', 'Oświadczyny'
+];
+
+$(function()
+{
+       var tabs = $('ol#tabs li');
+       var gallery = null;
+       CurrentDocument = new $.wikiapi.WikiDocument("document-meta");
+
+       $.blockUI.defaults.baseZ = 10000;
+
+    function initialize()
+       {
+               gallery = new $.wiki.ScanGalleryPerspective({
+                       doc: CurrentDocument, id: "ScanGalleryPerspective"
+               });
+
+               $(document).keydown(function(event) {
+                       console.log("Received key:", event);
+               });
+
+               /* The save button */
+        $('#save-button').click(function(event){
+            event.preventDefault();
+                       $.wiki.showDialog('#save_dialog');
+        });
+
+               $('.editor').hide();
+
+               /*
+                * TABS
+                */
+        $('#tabs li').live('click', function(event, callback) {
+                       $.wiki.switchToTab(this);
+        });
+
+               $('#tabs li > .tabclose').live('click', function(event, callback) {
+                       var $tab = $(this).parent();
+
+                       if($tab.is('.active'))
+                               $.wiki.switchToTab(DEFAULT_PERSPECTIVE);
+
+                       var p = $.wiki.perspectiveForTab($tab);
+                       p.destroy();
+
+                       return false;
+        });
+
+
+        $(window).resize(function(){
+            $('iframe').height($(window).height() - $('#tabs').outerHeight() - $('#source-editor .toolbar').outerHeight());
+        });
+
+        $(window).resize();
+
+        $('.vsplitbar').toggle(
+                       function() {
+                               $.wiki.state.perspectives.ScanGalleryPerspective.show = true;
+                               $('#side-gallery').show();
+                               $('.vsplitbar').css('right', 480).addClass('.active');
+                               $('#editor .editor').css('right', 510);
+                               $(window).resize();
+                               gallery.onEnter();
+                       },
+                       function() {
+                               $.wiki.state.perspectives.ScanGalleryPerspective.show = false;
+                               $('#side-gallery').hide();
+                               $('.vsplitbar').css('right', 0).removeClass('active');
+                               $('#editor .editor').css('right', 30);
+                               $(window).resize();
+                               gallery.onExit();
+                       }
+               );
+
+               if($.wiki.state.perspectives.ScanGalleryPerspective.show)
+                       $('.vsplitbar').trigger('click');
+
+        window.onbeforeunload = function(e) {
+            if($.wiki.isDirty()) {
+                               e.returnValue = "Na stronie mogą być nie zapisane zmiany.";
+                               return "Na stronie mogą być nie zapisane zmiany.";
+                       };
+        };
+
+               console.log("Fetching document's text");
+
+               $(document).bind('wlapi_document_changed', function(event, doc) {
+                       try {
+                               $('#document-revision').text(doc.revision);
+                       } catch(e) {
+                               console.log("Failed handler", e);
+                       }
+               });
+
+               CurrentDocument.fetch({
+                       success: function(){
+                               console.log("Fetch success");
+                               $('#loading-overlay').fadeOut();
+                               var active_tab = document.location.hash || DEFAULT_PERSPECTIVE;
+
+                               if(active_tab == "#ScanGalleryPerspective")
+                                       active_tab = DEFAULT_PERSPECTIVE;
+
+                               console.log("Initial tab is:", active_tab)
+                               $.wiki.switchToTab(active_tab);
+                       },
+                       failure: function() {
+                               $('#loading-overlay').fadeOut();
+                               alert("FAILURE");
+                       }
+               });
+    }; /* end of initialize() */
+
+
+       /* Load configuration */
+       $.wiki.loadConfig();
+
+       var initAll = function(a, f) {
+               if (a.length == 0) return f();
+
+               $.wiki.initTab({
+                       tab: a.pop(),
+                       doc: CurrentDocument,
+                       callback: function(){
+                               initAll(a, f);
+                       }
+               });
+       };
+
+
+       /*
+        * Initialize all perspectives
+        */
+       initAll( $.makeArray($('ol#tabs li')), initialize);
+       console.log(location.hash);
+});
diff --git a/redakcja/static/js/wiki/loader_readonly.js b/redakcja/static/js/wiki/loader_readonly.js
new file mode 100644 (file)
index 0000000..c22e9d7
--- /dev/null
@@ -0,0 +1,92 @@
+if (!window.console) {
+    window.console = {
+        log: function(){
+        }
+    }
+}
+
+
+DEFAULT_PERSPECTIVE = "#VisualPerspective";
+
+$(function()
+{
+       var tabs = $('ol#tabs li');
+       var gallery = null;
+
+       CurrentDocument = new $.wikiapi.WikiDocument("document-meta");
+       $.blockUI.defaults.baseZ = 10000;
+
+       function initialize()
+       {
+               $('.editor').hide();
+
+               /*
+                * TABS
+                */
+        $('#tabs li').live('click', function(event, callback) {
+                       $.wiki.switchToTab(this);
+        });
+
+               $('#tabs li > .tabclose').live('click', function(event, callback) {
+                       var $tab = $(this).parent();
+
+                       if($tab.is('.active'))
+                               $.wiki.switchToTab(DEFAULT_PERSPECTIVE);
+
+                       var p = $.wiki.perspectiveForTab($tab);
+                       p.destroy();
+                       return false;
+        });
+
+        $(window).resize(function(){
+            $('iframe').height($(window).height() - $('#tabs').outerHeight() - $('#source-editor .toolbar').outerHeight());
+        });
+
+               $(document).bind('wlapi_document_changed', function(event, doc) {
+                       try {
+                               $('#document-revision').text(doc.revision);
+                       } catch(e) {
+                               console.log("Failed handler", e);
+                       }
+               });
+
+               CurrentDocument.fetch({
+                       success: function(){
+                               console.log("Fetch success");
+                               $('#loading-overlay').fadeOut();
+                               var active_tab = document.location.hash || DEFAULT_PERSPECTIVE;
+
+                               $(window).resize();
+
+                               console.log("Initial tab is:", active_tab)
+                               $.wiki.switchToTab(active_tab);
+                       },
+                       failure: function() {
+                               $('#loading-overlay').fadeOut();
+                               alert("FAILURE");
+                       }
+               });
+    }; /* end of initialize() */
+
+       /* Load configuration */
+       $.wiki.loadConfig();
+
+       var initAll = function(a, f) {
+               if (a.length == 0) return f();
+
+               $.wiki.initTab({
+                       tab: a.pop(),
+                       doc: CurrentDocument,
+                       callback: function(){
+                               initAll(a, f);
+                       }
+               });
+       };
+
+
+       /*
+        * Initialize all perspectives
+        */
+       initAll( $.makeArray($('ol#tabs li')), initialize);
+       console.log(location.hash);
+});
\ No newline at end of file
diff --git a/redakcja/static/js/wiki/view_column_diff.js b/redakcja/static/js/wiki/view_column_diff.js
new file mode 100644 (file)
index 0000000..a212f81
--- /dev/null
@@ -0,0 +1,34 @@
+(function($){
+
+       function DiffPerspective(options) {
+               var old_callback = options.callback || function() {};
+               var self = this;
+
+        options.callback = function(){
+                       self.base_id = options.base_id;
+                       old_callback.call(this);
+               };
+
+               $.wiki.Perspective.call(this, options);
+    };
+
+    DiffPerspective.prototype = new $.wiki.Perspective();
+
+    DiffPerspective.prototype.freezeState = function(){
+        // must
+    };
+
+       DiffPerspective.prototype.destroy = function() {
+               $('#' + this.base_id).remove();
+               $('#' + this.perspective_id).remove();
+       };
+
+       DiffPerspective.prototype.onEnter = function(success, failure){
+               $.wiki.Perspective.prototype.onEnter.call(this);
+               console.log("Entered diff view");
+       };
+
+       $.wiki.DiffPerspective = DiffPerspective;
+
+})(jQuery);
+
diff --git a/redakcja/static/js/wiki/view_editor_source.js b/redakcja/static/js/wiki/view_editor_source.js
new file mode 100644 (file)
index 0000000..a0a2e69
--- /dev/null
@@ -0,0 +1,124 @@
+/* COMMENT */
+(function($) {
+
+       function CodeMirrorPerspective(options)
+       {
+               var old_callback = options.callback;
+        options.callback = function(){
+                       var self = this;
+
+                       this.codemirror = CodeMirror.fromTextArea('codemirror_placeholder', {
+                               parserfile: 'parsexml.js',
+                               path: STATIC_URL + "js/lib/codemirror/",
+                               stylesheet: STATIC_URL + "css/xmlcolors_15032010.css",
+                               parserConfig: {
+                                       useHTMLKludges: false
+                               },
+                               iframeClass: 'xml-iframe',
+                               textWrapping: true,
+                               lineNumbers: true,
+                               width: "100%",
+                               tabMode: 'spaces',
+                               indentUnit: 0,
+                               readOnly: CurrentDocument.readonly || false,
+                               initCallback: function(){
+
+                                       self.codemirror.grabKeys(function(event) {
+                                               if (event.button) {
+                                                       $(event.button).trigger('click');
+                                                       event.button = null;
+                                               }
+                                       }, function(event) {
+                                               /* CM reports characters 2 times - as event and as code */
+                                               if((typeof event) != "object")
+                                                       return false;
+
+                                               if(!event.altKey)
+                                                       return false;
+
+                                               var c = String.fromCharCode(event.keyCode).toLowerCase();
+                                               var button = $("#source-editor button[data-ui-accesskey='"+c+"']");
+                                               if(button.length == 0)
+                                                       return false;
+
+                                               /* it doesn't matter which button we pick - all do the same */
+                                               event.button = button[0];
+                                               return true;
+                                       });
+
+                                       $('#source-editor .toolbar button').click(function(event){
+                                               event.preventDefault();
+                                               var params = eval("(" + $(this).attr('data-ui-action-params') + ")");
+                                               scriptletCenter.callInteractive({
+                                                       action: $(this).attr('data-ui-action'),
+                                                       context: self.codemirror,
+                                                       extra: params
+                                               });
+                                       });
+
+                                       $('.toolbar select').change(function(event){
+                                               var slug = $(this).val();
+
+                                               $('.toolbar-buttons-container').hide().filter('[data-group=' + slug + ']').show();
+                                               $(window).resize();
+                                       });
+
+                                       $('.toolbar-buttons-container').hide();
+                                       $('.toolbar select').change();
+
+                                       console.log("Initialized CodeMirror");
+
+                                       // textarea is no longer needed
+                                       $('codemirror_placeholder').remove();
+
+                                       old_callback.call(self);
+                               }
+                       });
+               };
+
+               $.wiki.Perspective.call(this, options);
+       };
+
+
+       CodeMirrorPerspective.prototype = new $.wiki.Perspective();
+
+       CodeMirrorPerspective.prototype.freezeState = function() {
+               this.config().position = this.codemirror.win.scrollY || 0;
+       };
+
+       CodeMirrorPerspective.prototype.unfreezeState = function () {
+               this.codemirror.win.scroll(0, this.config().position || 0);
+       };
+
+       CodeMirrorPerspective.prototype.onEnter = function(success, failure) {
+               $.wiki.Perspective.prototype.onEnter.call(this);
+
+               console.log('Entering', this.doc);
+               this.codemirror.setCode(this.doc.text);
+
+               /* fix line numbers bar */
+               var $nums = $('.CodeMirror-line-numbers');
+           var barWidth = $nums.width();
+
+               $(this.codemirror.frame.contentDocument.body).css('padding-left', barWidth);
+               // $nums.css('left', -barWidth);
+
+               $(window).resize();
+               this.unfreezeState(this._uistate);
+
+               if(success) success();
+       }
+
+       CodeMirrorPerspective.prototype.onExit = function(success, failure) {
+               this.freezeState();
+
+               $.wiki.Perspective.prototype.onExit.call(this);
+               console.log('Exiting', this.doc);
+               this.doc.setText(this.codemirror.getCode());
+
+               if(success) success();
+       }
+
+       $.wiki.CodeMirrorPerspective = CodeMirrorPerspective;
+
+})(jQuery);
diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js
new file mode 100644 (file)
index 0000000..2ae1a8d
--- /dev/null
@@ -0,0 +1,425 @@
+(function($){
+
+    /* Show theme to the user */
+    function selectTheme(themeId){
+        var selection = window.getSelection();
+        selection.removeAllRanges();
+
+        var range = document.createRange();
+        var s = $(".motyw[theme-class='" + themeId + "']")[0];
+        var e = $(".end[theme-class='" + themeId + "']")[0];
+
+        if (s && e) {
+            range.setStartAfter(s);
+            range.setEndBefore(e);
+            selection.addRange(range);
+        }
+    };
+
+    /* Verify insertion port for annotation or theme */
+    function verifyTagInsertPoint(node){
+        if (node.nodeType == 3) { // Text Node
+            node = node.parentNode;
+        }
+
+        if (node.nodeType != 1) {
+            return false;
+        }
+
+        node = $(node);
+        var xtype = node.attr('x-node');
+
+        if (!xtype || (xtype.search(':') >= 0) ||
+        xtype == 'motyw' ||
+        xtype == 'begin' ||
+        xtype == 'end') {
+            return false;
+        }
+
+        // don't allow themes inside annotations
+        if (node.is('*[x-annotation-box] *'))
+            return false;
+
+        return true;
+    }
+
+    /* Convert HTML frament to plaintext */
+    var ANNOT_ALLOWED = ['wyroznienie', 'slowo_obce', 'osoba'];
+
+    function html2plainText(fragment){
+        var text = "";
+
+        $(fragment.childNodes).each(function(){
+            if (this.nodeType == 3) // textNode
+                text += this.nodeValue;
+            else
+                if (this.nodeType == 1 &&
+                $.inArray($(this).attr('x-node'), ANNOT_ALLOWED) != -1) {
+                    text += html2plainText(this);
+                }
+        });
+
+        return text;
+    }
+
+
+    /* Insert annotation using current selection */
+    function addAnnotation(){
+        var selection = window.getSelection();
+        var n = selection.rangeCount;
+
+        if (n == 0) {
+            window.alert("Nie zaznaczono żadnego obszaru");
+            return false;
+        }
+
+        // for now allow only 1 range
+        if (n > 1) {
+            window.alert("Zaznacz jeden obszar");
+            return false;
+        }
+
+        // remember the selected range
+        var range = selection.getRangeAt(0);
+
+        if (!verifyTagInsertPoint(range.endContainer)) {
+            window.alert("Nie można wstawić w to miejsce przypisu.");
+            return false;
+        }
+
+        // BUG #273 - selected text can contain themes, which should be omited from
+        // defining term
+        var text = html2plainText(range.cloneContents());
+
+        var tag = $('<span></span>');
+        range.collapse(false);
+        range.insertNode(tag[0]);
+
+        xml2html({
+            xml: '<pr><slowo_obce>' + text + '</slowo_obce> --- </pr>',
+            success: function(text){
+                var t = $(text);
+                tag.replaceWith(t);
+                openForEdit(t);
+            },
+            error: function(){
+                tag.remove();
+                alert('Błąd przy dodawaniu przypisu:' + errors);
+            }
+        })
+    }
+
+
+    /* Insert theme using current selection */
+
+    function addTheme(){
+        var selection = window.getSelection();
+        var n = selection.rangeCount;
+
+        if (n == 0) {
+            window.alert("Nie zaznaczono żadnego obszaru");
+            return false;
+        }
+
+        // for now allow only 1 range
+        if (n > 1) {
+            window.alert("Zaznacz jeden obszar.");
+            return false;
+        }
+
+
+        // remember the selected range
+        var range = selection.getRangeAt(0);
+
+
+        if ($(range.startContainer).is('.html-editarea') ||
+        $(range.endContainer).is('.html-editarea')) {
+            window.alert("Motywy można oznaczać tylko na tekście nie otwartym do edycji. \n Zamknij edytowany fragment i spróbuj ponownie.");
+            return false;
+        }
+
+        // verify if the start/end points make even sense -
+        // they must be inside a x-node (otherwise they will be discarded)
+        // and the x-node must be a main text
+        if (!verifyTagInsertPoint(range.startContainer)) {
+            window.alert("Motyw nie może się zaczynać w tym miejscu.");
+            return false;
+        }
+
+        if (!verifyTagInsertPoint(range.endContainer)) {
+            window.alert("Motyw nie może się kończyć w tym miejscu.");
+            return false;
+        }
+
+        var date = (new Date()).getTime();
+        var random = Math.floor(4000000000 * Math.random());
+        var id = ('' + date) + '-' + ('' + random);
+
+        var spoint = document.createRange();
+        var epoint = document.createRange();
+
+        spoint.setStart(range.startContainer, range.startOffset);
+        epoint.setStart(range.endContainer, range.endOffset);
+
+        var mtag, btag, etag, errors;
+
+        // insert theme-ref
+
+        xml2html({
+            xml: '<end id="e' + id + '" />',
+            success: function(text){
+                etag = $('<span></span>');
+                epoint.insertNode(etag[0]);
+                etag.replaceWith(text);
+                xml2html({
+                    xml: '<motyw id="m' + id + '"></motyw>',
+                    success: function(text){
+                        mtag = $('<span></span>');
+                        spoint.insertNode(mtag[0]);
+                        mtag.replaceWith(text);
+                        xml2html({
+                            xml: '<begin id="b' + id + '" />',
+                            success: function(text){
+                                btag = $('<span></span>');
+                                spoint.insertNode(btag[0])
+                                btag.replaceWith(text);
+                                selection.removeAllRanges();
+                                openForEdit($('.motyw[theme-class=' + id + ']'));
+                            }
+                        });
+                    }
+                });
+            }
+        });
+    }
+
+    /* open edition window for selected fragment */
+    function openForEdit($origin){
+        var $box = null
+
+        // annotations overlay their sub box - not their own box //
+        if ($origin.is(".annotation-inline-box")) {
+            $box = $("*[x-annotation-box]", $origin);
+        }
+        else {
+            $box = $origin;
+        }
+
+        var x = $box[0].offsetLeft;
+        var y = $box[0].offsetTop;
+        var w = $box.outerWidth();
+        var h = $box.innerHeight();
+
+        if ($origin.is(".annotation-inline-box")) {
+            w = Math.max(w, 400);
+            h = Math.max(h, 60);
+        }
+
+        // start edition on this node
+        var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><textarea></textarea></div>').css({
+            position: 'absolute',
+            height: h,
+            left: x,
+            top: y,
+            width: w
+        }).appendTo($box[0].offsetParent || $box.parent()).show();
+
+        if ($origin.is('.motyw')) {
+            $('textarea', $overlay).autocomplete(THEMES, {
+                autoFill: true,
+                multiple: true,
+                selectFirst: true
+            });
+        }
+
+        if ($origin.is('.motyw')) {
+            $('.delete-button', $overlay).click(function(){
+                if (window.confirm("Czy jesteś pewien, że chcesz usunąć ten motyw ?")) {
+                    $('[theme-class=' + $origin.attr('theme-class') + ']').remove();
+                    $overlay.remove();
+                    $(document).unbind('click.blur-overlay');
+                    return false;
+                };
+                            });
+        }
+        else {
+            $('.delete-button', $overlay).hide();
+        }
+
+
+        var serializer = new XMLSerializer();
+
+        html2text({
+            element: $box[0],
+            stripOuter: true,
+            success: function(text){
+                $('textarea', $overlay).val($.trim(text));
+
+                setTimeout(function(){
+                    $('textarea', $overlay).elastic().focus();
+                }, 50);
+
+                function save(argument){
+                    var nodeName = $box.attr('x-node') || 'pe';
+                    var insertedText = $('textarea', $overlay).val();
+
+                    if ($origin.is('.motyw')) {
+                        insertedText = insertedText.replace(/,\s*$/, '');
+                    }
+
+                    xml2html({
+                        xml: '<' + nodeName + '>' + insertedText + '</' + nodeName + '>',
+                        success: function(element){
+                            $origin.html($(element).html());
+                            $overlay.remove();
+                        },
+                        error: function(text){
+                            $overlay.remove();
+                            alert('Błąd! ' + text);
+                        }
+                    })
+                }
+
+                $('.accept-button', $overlay).click(function(){
+                    save();
+                });
+
+                $(document).bind('click.blur-overlay', function(event){
+                    if ($(event.target).parents('.html-editarea').length > 0) {
+                        return;
+                    }
+                    save();
+
+                    $(document).unbind('click.blur-overlay');
+                });
+
+            },
+            error: function(text){
+                alert('Błąd! ' + text);
+            }
+        });
+    }
+
+    function VisualPerspective(options){
+
+        var old_callback = options.callback;
+
+        options.callback = function(){
+            var element = $("#html-view");
+            var button = $('<button class="edit-button">Edytuj</button>');
+
+            if (!CurrentDocument.readonly) {
+                $('#html-view').bind('mousemove', function(event){
+                    var editable = $(event.target).closest('*[x-editable]');
+                    $('.active', element).not(editable).removeClass('active').children('.edit-button').remove();
+
+                    if (!editable.hasClass('active')) {
+                        editable.addClass('active').append(button);
+                    }
+                    if (editable.is('.annotation-inline-box')) {
+                        $('*[x-annotation-box]', editable).css({
+                            position: 'absolute',
+                            left: event.clientX - editable.offset().left + 5,
+                            top: event.clientY - editable.offset().top + 5
+                        }).show();
+                    }
+                    else {
+                        $('*[x-annotation-box]').hide();
+                    }
+                });
+
+                $('#insert-annotation-button').click(function(){
+                    addAnnotation();
+                    return false;
+                });
+
+                $('#insert-theme-button').click(function(){
+                    addTheme();
+                    return false;
+                });
+
+                $('.edit-button').live('click', function(event){
+                    event.preventDefault();
+                    openForEdit($(this).parent());
+                });
+
+            }
+
+            $('.motyw').live('click', function(){
+                selectTheme($(this).attr('theme-class'));
+            });
+
+            old_callback.call(this);
+        };
+
+        $.wiki.Perspective.call(this, options);
+    };
+
+    VisualPerspective.prototype = new $.wiki.Perspective();
+
+    VisualPerspective.prototype.freezeState = function(){
+
+    };
+
+    VisualPerspective.prototype.onEnter = function(success, failure){
+        $.wiki.Perspective.prototype.onEnter.call(this);
+
+        $.blockUI({
+            message: 'Uaktualnianie widoku...'
+        });
+
+        function _finalize(callback){
+            $.unblockUI();
+            if (callback)
+                callback();
+        }
+
+        xml2html({
+            xml: this.doc.text,
+            success: function(element){
+                $('#html-view').html(element);
+                _finalize(success);
+            },
+            error: function(text){
+                var message = $('<pre></pre>');
+                message.text(text);
+                $('#html-view').html('<p class="error">Wystąpił błąd:</p><pre>' +
+                message.html() +
+                '</pre>');
+                _finalize(failure);
+            }
+        });
+    };
+
+    VisualPerspective.prototype.onExit = function(success, failure){
+        var self = this;
+
+        $.blockUI({
+            message: 'Zapisywanie widoku...'
+        });
+
+        function _finalize(callback){
+            $.unblockUI();
+            if (callback)
+                callback();
+        }
+
+        if ($('#html-view .error').length > 0)
+            return _finalize(failure);
+
+        html2text({
+            element: $('#html-view div').get(0),
+            success: function(text){
+                self.doc.setText(text);
+                _finalize(success);
+            },
+            error: function(text){
+                $('#source-editor').html('<p>Wystąpił błąd:</p><pre>' + text + '</pre>');
+                _finalize(failure);
+            }
+        });
+    };
+
+    $.wiki.VisualPerspective = VisualPerspective;
+
+})(jQuery);
diff --git a/redakcja/static/js/wiki/view_gallery.js b/redakcja/static/js/wiki/view_gallery.js
new file mode 100644 (file)
index 0000000..aa39e15
--- /dev/null
@@ -0,0 +1,251 @@
+(function($){
+
+    function normalizeNumber(pageNumber, pageCount){
+        // Numer strony musi być pomiędzy 1 a najwyższym numerem
+        var pageNumber = parseInt(pageNumber, 10);
+
+        if (!pageNumber ||
+        pageNumber == NaN ||
+        pageNumber == Infinity ||
+        pageNumber == -Infinity ||
+        pageNumber < 1)
+            return 1;
+
+        if (pageNumber > pageCount)
+            return pageCount;
+
+        return pageNumber;
+    }
+
+    function bounds(galleryWidth, galleryHeight, imageWidth, imageHeight){
+        return {
+            maxX: 0,
+            maxY: 0,
+            minX: galleryWidth - imageWidth,
+            minY: galleryHeight - imageHeight
+        }
+    };
+
+    function normalizePosition(x, y, galleryWidth, galleryHeight, imageWidth, imageHeight){
+        var b = bounds(galleryWidth, galleryHeight, imageWidth, imageHeight);
+        return {
+            x: Math.min(b.maxX, Math.max(b.minX, x)),
+            y: Math.min(b.maxY, Math.max(b.minY, y))
+        }
+    };
+
+    function fixImageSize(){
+
+    }
+
+    /*
+     * Perspective
+     */
+    function ScanGalleryPerspective(options){
+        var old_callback = options.callback || function() { };
+
+               this.noupdate_hash_onenter = true;
+
+        options.callback = function(){
+            var self = this;
+
+            this.dimensions = {};
+            this.zoomFactor = 1;
+            this.$element = $("#side-gallery");
+            this.$numberInput = $('.page-number', this.$element);
+
+            // ...
+            var origin = {};
+            var imageOrigin = {};
+
+            this.$image = $('.gallery-image img', this.$element).attr('unselectable', 'on');
+
+            // button handlers
+            this.$numberInput.change(function(event){
+                event.preventDefault();
+                self.setPage($(this).val());
+            });
+
+            $('.previous-page', this.$element).click(function(){
+                self.setPage(parseInt(self.$numberInput.val(),10) - 1);
+            });
+
+            $('.next-page', this.$element).click(function(){
+                self.setPage(parseInt(self.$numberInput.val(),10) + 1);
+            });
+
+            $('.zoom-in', this.$element).click(function(){
+                self.alterZoom(0.2);
+            });
+
+            $('.zoom-out', this.$element).click(function(){
+                self.alterZoom((-0.2));
+            });
+
+            $(window).resize(function(){
+                self.dimensions.galleryWidth = self.$image.parent().width();
+                self.dimensions.galleryHeight = self.$image.parent().height();
+            });
+
+            $('.gallery-image img', this.$element).load(function(){
+                console.log("Image loaded.")
+                self._resizeImage();
+            }).bind('mousedown', function() {
+                               self.imageMoveStart.apply(self, arguments);
+                       });
+
+
+
+                       old_callback.call(this);
+        };
+
+        $.wiki.Perspective.call(this, options);
+    };
+
+    ScanGalleryPerspective.prototype = new $.wiki.Perspective();
+
+    ScanGalleryPerspective.prototype._resizeImage = function(){
+        var $img = this.$image;
+
+        $img.css({
+            width: null,
+            height: null
+        });
+
+        this.dimensions = {
+            width: $img.width() * this.zoomFactor,
+            height: $img.height() * this.zoomFactor,
+            originWidth: $img.width(),
+            originHeight: $img.height(),
+                   galleryWidth: $img.parent().width(),
+            galleryHeight: $img.parent().height()
+        };
+
+        if (!(this.dimensions.width && this.dimensions.height)) {
+            setTimeout(function(){
+                $img.load();
+            }, 100);
+        }
+
+        var position = normalizePosition($img.position().left, $img.position().top, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
+
+        $img.css({
+            left: position.x,
+            top: position.y,
+            width: $img.width() * this.zoomFactor,
+            height: $img.height() * this.zoomFactor
+        });
+    };
+
+    ScanGalleryPerspective.prototype.setPage = function(newPage){
+        newPage = normalizeNumber(newPage, this.doc.galleryImages.length);
+        this.$numberInput.val(newPage);
+               this.config().page = newPage;
+        $('.gallery-image img', this.$element).attr('src', this.doc.galleryImages[newPage - 1]);
+    };
+
+    ScanGalleryPerspective.prototype.alterZoom = function(delta){
+        var zoomFactor = this.zoomFactor + delta;
+        if (zoomFactor < 0.2)
+            zoomFactor = 0.2;
+        if (zoomFactor > 2)
+            zoomFactor = 2;
+        this.setZoom(zoomFactor);
+    };
+
+    ScanGalleryPerspective.prototype.setZoom = function(factor){
+        this.zoomFactor = factor;
+
+        this.dimensions.width = this.dimensions.originWidth * this.zoomFactor;
+        this.dimensions.height = this.dimensions.originHeight * this.zoomFactor;
+
+        // var position = normalizePosition(this.$image.position().left, this.$image.position().top, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
+
+               this._resizeImage();
+        /* this.$image.css({
+            width: this.dimensions.width,
+            height: this.dimensions.height,
+            left: position.x,
+            top: position.y
+        });*/
+    };
+
+       /*
+        * Movement
+        */
+       ScanGalleryPerspective.prototype.imageMoved = function(event){
+               event.preventDefault();
+
+               // origin is where the drag started
+               // imageOrigin is where the drag started on the image
+
+               var newX = event.clientX - this.origin.x + this.imageOrigin.left;
+               var newY = event.clientY - this.origin.y + this.imageOrigin.top;
+
+               var position = normalizePosition(newX, newY, this.dimensions.galleryWidth, this.dimensions.galleryHeight, this.dimensions.width, this.dimensions.height);
+
+               this.$image.css({
+                       left: position.x,
+                       top: position.y,
+               });
+
+               return false;
+       };
+
+       ScanGalleryPerspective.prototype.imageMoveStart = function(event){
+               event.preventDefault();
+
+               var self = this;
+
+               this.origin = {
+                       x: event.clientX,
+                       y: event.clientY
+               };
+
+               this.imageOrigin = self.$image.position();
+               $(document).bind('mousemove.gallery', function(){
+                       self.imageMoved.apply(self, arguments);
+               }).bind('mouseup.gallery', function() {
+                       self.imageMoveStop.apply(self, arguments);
+               });
+
+               return false;
+       };
+
+       ScanGalleryPerspective.prototype.imageMoveStop = function(event){
+               $(document).unbind('mousemove.gallery').unbind('mouseup.gallery');
+       };
+
+    /*
+     * Loading gallery
+     */
+    ScanGalleryPerspective.prototype.onEnter = function(success, failure){
+        var self = this;
+
+        $.wiki.Perspective.prototype.onEnter.call(this);
+
+        this.doc.refreshGallery({
+            success: function(doc, data){
+                self.$image.show();
+                               console.log("gconfig:", self.config().page );
+                               self.setPage( self.config().page );
+
+                $('.error_message', self.$element).hide();
+                if(success) success();
+            },
+            failure: function(doc, message){
+                self.$image.hide();
+                $('.error_message', self.$element).show().html(message);
+                if(failure) failure();
+            }
+        });
+
+    };
+
+       ScanGalleryPerspective.prototype.onExit = function(success, failure) {
+
+       };
+
+    $.wiki.ScanGalleryPerspective = ScanGalleryPerspective;
+
+})(jQuery);
\ No newline at end of file
diff --git a/redakcja/static/js/wiki/view_history.js b/redakcja/static/js/wiki/view_history.js
new file mode 100644 (file)
index 0000000..b4a9dd8
--- /dev/null
@@ -0,0 +1,158 @@
+(function($){
+
+    function HistoryPerspective(options) {
+               var old_callback = options.callback || function() {};
+
+               options.callback = function() {
+                       var self = this;
+
+                       // first time page is rendered
+               $('#make-diff-button').click(function() {
+                               self.makeDiff();
+                       });
+
+                       $('#tag-changeset-button').click(function() {
+                               self.showTagForm();
+                       });
+
+                       $('#open-preview-button').click(function(event) {
+                               var selected = $('#changes-list .entry.selected');
+
+                               if (selected.length != 1) {
+                           window.alert("Wybierz dokładnie *jedną* wersję.");
+                       return;
+                       }
+
+                               var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
+                               window.open($(this).attr('data-basehref') + "?revision=" + version);
+
+                               event.preventDefault();
+                       });
+
+               $('#changes-list .entry').live('click', function(){
+               var $this = $(this);
+               if ($this.hasClass('selected'))
+                       return $this.removeClass('selected');
+
+               if ($("#changes-list .entry.selected").length < 2)
+                       return $this.addClass('selected');
+               });
+
+           $('#changes-list span.tag').live('click', function(event){
+                   return false;
+               });
+
+               old_callback.call(this);
+               }
+
+               $.wiki.Perspective.call(this, options);
+    };
+
+    HistoryPerspective.prototype = new $.wiki.Perspective();
+
+    HistoryPerspective.prototype.freezeState = function(){
+        // must
+    };
+
+    HistoryPerspective.prototype.onEnter = function(success, failure){
+        $.wiki.Perspective.prototype.onEnter.call(this);
+
+        $.blockUI({
+            message: 'Odświeżanie historii...'
+        });
+
+        function _finalize(s){
+            $.unblockUI();
+
+            if (s) {
+                if (success)
+                    success();
+            }
+            else {
+                if (failure)
+                    failure();
+            }
+        }
+
+        function _failure(doc, message){
+            $('#history-view .message-box').html('Nie udało się odświeżyć historii:' + message).show();
+            _finalize(false);
+        };
+
+        function _success(doc, data){
+            $('#history-view .message-box').hide();
+            var changes_list = $('#changes-list');
+            var $stub = $('#history-view .row-stub');
+            changes_list.html('');
+
+                       var tags = $('select#id_addtag-tag option');
+
+            $.each(data, function(){
+                $.wiki.renderStub({
+                                       container: changes_list,
+                                       stub: $stub,
+                                       data: this,
+                                       filters: {
+                                               tag: function(value) {
+                                                       return tags.filter("*[value='"+value+"']").text();
+                                               }
+                                       }
+                               });
+            });
+
+            _finalize(true);
+        };
+
+        return this.doc.fetchHistory({
+            success: _success,
+            failure: _failure
+        });
+    };
+
+       HistoryPerspective.prototype.showTagForm = function(){
+               var selected = $('#changes-list .entry.selected');
+
+               if (selected.length != 1) {
+            window.alert("Musisz zaznaczyć dokładnie jedną wersję.");
+            return;
+        }
+
+               var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
+               $.wiki.showDialog('#add_tag_dialog', {'revision': version});
+       };
+
+       HistoryPerspective.prototype.makeDiff = function() {
+        var changelist = $('#changes-list');
+        var selected = $('.entry.selected', changelist);
+
+        if (selected.length != 2) {
+            window.alert("Musisz zaznaczyć dokładnie dwie wersje do porównania.");
+            return;
+        }
+
+        $.blockUI({
+            message: 'Wczytywanie porównania...'
+        });
+
+               var rev_from = $("*[data-stub-value='version']", selected[1]).text();
+               var rev_to =  $("*[data-stub-value='version']", selected[0]).text();
+
+        return this.doc.fetchDiff({
+            from: rev_from,
+                       to: rev_to,
+            success: function(doc, data){
+                var result = $.wiki.newTab(doc, ''+rev_from +' -> ' + rev_to, 'DiffPerspective');
+
+                               $(result.view).html(data);
+                               $.wiki.switchToTab(result.tab);
+                               $.unblockUI();
+            },
+            failure: function(doc){
+                $.unblockUI();
+            }
+        });
+    };
+
+    $.wiki.HistoryPerspective = HistoryPerspective;
+
+})(jQuery);
diff --git a/redakcja/static/js/wiki/view_summary.js b/redakcja/static/js/wiki/view_summary.js
new file mode 100644 (file)
index 0000000..811096d
--- /dev/null
@@ -0,0 +1,45 @@
+(function($){
+
+       function SummaryPerspective(options) {
+               var old_callback = options.callback;
+               var self = this;
+
+        options.callback = function(){
+                       $('#publish_button').click(function() {
+                               $.blockUI({message: "Oczekiwanie na odpowiedź serwera..."});
+                               self.doc.publish({
+                                       success: function(doc, data) {
+                                               $.blockUI({message: "Udało się.", timeout: 2000});
+                                       },
+                                       failure: function(doc, message) {
+                                               $.blockUI({
+                                                       message: message,
+                                                       timeout: 5000
+                                               });
+                                       }
+
+                               });
+                       });
+
+                       old_callback.call(this);
+               };
+
+               $.wiki.Perspective.call(this, options);
+    };
+
+    SummaryPerspective.prototype = new $.wiki.Perspective();
+
+    SummaryPerspective.prototype.freezeState = function(){
+        // must
+    };
+
+       SummaryPerspective.prototype.onEnter = function(success, failure){
+               $.wiki.Perspective.prototype.onEnter.call(this);
+
+               console.log("Entered summery view");
+       };
+
+       $.wiki.SummaryPerspective = SummaryPerspective;
+
+})(jQuery);
+
diff --git a/redakcja/static/js/wiki/wikiapi.js b/redakcja/static/js/wiki/wikiapi.js
new file mode 100644 (file)
index 0000000..27ab97e
--- /dev/null
@@ -0,0 +1,316 @@
+(function($) {
+       $.wikiapi = {};
+       var noop = function() {
+       };
+       var noops = {
+               success: noop,
+               failure: noop
+       };
+       /*
+        * Return absolute reverse path of given named view.
+        * (at least he have it hard-coded in one place)
+        *
+        * TODO: think of a way, not to hard-code it here ;)
+        *
+        */
+       function reverse() {
+               var vname = arguments[0];
+               var base_path = "/documents";
+
+               if (vname == "ajax_document_text") {
+                       var path = "/" + arguments[1] + "/text";
+
+               if (arguments[2] !== undefined)
+                               path += "/" + arguments[2];
+
+                       return base_path + path;
+               }
+
+               if (vname == "ajax_document_history") {
+
+                       return base_path + "/" + arguments[1] + "/history";
+               }
+
+               if (vname == "ajax_document_gallery") {
+
+                       return base_path + "/gallery/" + arguments[1];
+               }
+
+               if (vname == "ajax_document_diff")
+                       return base_path + "/" + arguments[1] + "/diff";
+
+               if (vname == "ajax_document_addtag")
+                       return base_path + "/" + arguments[1] + "/tags";
+
+               if (vname == "ajax_publish")
+                       return base_path + "/" + arguments[1] + "/publish";
+
+               console.log("Couldn't reverse match:", vname);
+               return "/404.html";
+       };
+
+       /*
+        * Document Abstraction
+        */
+       function WikiDocument(element_id) {
+               var meta = $('#' + element_id);
+               this.id = meta.attr('data-document-name');
+
+               this.revision = $("*[data-key='revision']", meta).text();
+               this.readonly = !!$("*[data-key='readonly']", meta).text();
+
+               this.galleryLink = $("*[data-key='gallery']", meta).text();
+               this.galleryImages = [];
+               this.text = null;
+               this.has_local_changes = false;
+               this._lock = -1;
+               this._context_lock = -1;
+               this._lock_count = 0;
+       };
+
+       WikiDocument.prototype.triggerDocumentChanged = function() {
+               $(document).trigger('wlapi_document_changed', this);
+       };
+       /*
+        * Fetch text of this document.
+        */
+       WikiDocument.prototype.fetch = function(params) {
+               params = $.extend({}, noops, params);
+               var self = this;
+               $.ajax({
+                       method: "GET",
+                       url: reverse("ajax_document_text", self.id),
+                       data: {"revision": self.revision},
+                       dataType: 'json',
+                       success: function(data) {
+                               var changed = false;
+
+                               if (self.text === null || self.revision !== data.revision) {
+                                       self.text = data.text;
+                                       self.revision = data.revision;
+                                       self.gallery = data.gallery;
+                                       changed = true;
+                                       self.triggerDocumentChanged();
+                               };
+
+                               self.has_local_changes = false;
+                               params['success'](self, changed);
+                       },
+                       error: function() {
+                               params['failure'](self, "Nie udało się wczytać treści dokumentu.");
+                       }
+               });
+       };
+       /*
+        * Fetch history of this document.
+        *
+        * from - First revision to fetch (default = 0)
+        * upto - Last revision to fetch (default = tip)
+        *
+        */
+       WikiDocument.prototype.fetchHistory = function(params) {
+               /* this doesn't modify anything, so no locks */
+               params = $.extend({}, noops, params);
+               var self = this;
+               $.ajax({
+                       method: "GET",
+                       url: reverse("ajax_document_history", self.id),
+                       dataType: 'json',
+                       data: {
+                               "from": params['from'],
+                               "upto": params['upto']
+                       },
+                       success: function(data) {
+                               params['success'](self, data);
+                       },
+                       error: function() {
+                               params['failure'](self, "Nie udało się wczytać historii dokumentu.");
+                       }
+               });
+       };
+       WikiDocument.prototype.fetchDiff = function(params) {
+               /* this doesn't modify anything, so no locks */
+               var self = this;
+               params = $.extend({
+                       'from': self.revision,
+                       'to': self.revision
+               }, noops, params);
+               $.ajax({
+                       method: "GET",
+                       url: reverse("ajax_document_diff", self.id),
+                       dataType: 'html',
+                       data: {
+                               "from": params['from'],
+                               "to": params['to']
+                       },
+                       success: function(data) {
+                               params['success'](self, data);
+                       },
+                       error: function() {
+                               params['failure'](self, "Nie udało się wczytać porównania wersji.");
+                       }
+               });
+       };
+
+       /*
+        * Fetch gallery
+        */
+       WikiDocument.prototype.refreshGallery = function(params) {
+               params = $.extend({}, noops, params);
+               var self = this;
+               $.ajax({
+                       method: "GET",
+                       url: reverse("ajax_document_gallery", self.galleryLink),
+                       dataType: 'json',
+                       // data: {},
+                       success: function(data) {
+                               self.galleryImages = data;
+                               params['success'](self, data);
+                       },
+                       error: function() {
+                               self.galleryImages = [];
+                               params['failure'](self, "<p>Nie udało się wczytać gallerii pod nazwą: '" + self.galleryLink + "'.</p>");
+                       }
+               });
+       };
+
+       /*
+        * Set document's text
+        */
+       WikiDocument.prototype.setText = function(text) {
+               this.text = text;
+               this.has_local_changes = true;
+       };
+
+       /*
+        * Set document's gallery link
+        */
+       WikiDocument.prototype.setGalleryLink = function(gallery) {
+               this.galleryLink = gallery;
+               this.has_local_changes = true;
+       };
+
+       /*
+        * Save text back to the server
+        */
+       WikiDocument.prototype.save = function(params) {
+               params = $.extend({}, noops, params);
+               var self = this;
+
+               if (!self.has_local_changes) {
+                       console.log("Abort: no changes.");
+                       return params['success'](self, false, "Nie ma zmian do zapisania.");
+               };
+
+               // Serialize form to dictionary
+               var data = {};
+               $.each(params['form'].serializeArray(), function() {
+                       data[this.name] = this.value;
+               });
+
+               var metaComment = '<!--';
+               metaComment += '\n\tgallery:' + self.galleryLink;
+               metaComment += '\n-->\n'
+
+               data['textsave-text'] = metaComment + self.text;
+
+               $.ajax({
+                       url: reverse("ajax_document_text", self.id),
+                       type: "POST",
+                       dataType: "json",
+                       data: data,
+                       success: function(data) {
+                               var changed = false;
+
+                               if (data.text) {
+                                       self.text = data.text;
+                                       self.revision = data.revision;
+                                       self.gallery = data.gallery;
+                                       changed = true;
+                                       self.triggerDocumentChanged();
+                               };
+
+                               params['success'](self, changed, ((changed && "Udało się zapisać :)") || "Twoja wersja i serwera jest identyczna"));
+                       },
+                       error: function(xhr) {
+                               try {
+                                       params['failure'](self, $.parseJSON(xhr.responseText));
+                               }
+                               catch (e) {
+                                       params['failure'](self, {
+                                               "__message": "<p>Nie udało się zapisać - błąd serwera.</p>"
+                                       });
+                               };
+
+                       }
+               });
+       }; /* end of save() */
+
+       WikiDocument.prototype.publish = function(params) {
+               params = $.extend({}, noops, params);
+               var self = this;
+               $.ajax({
+                       url: reverse("ajax_publish", self.id),
+                       type: "POST",
+                       dataType: "json",
+                       success: function(data) {
+                               params.success(self, data);
+                       },
+                       error: function(xhr) {
+                               if (xhr.status == 403 || xhr.status == 401) {
+                                       params.failure(self, "Nie masz uprawnień lub nie jesteś zalogowany.");
+                               }
+                               else {
+                                       try {
+                                               params.failure(self, xhr.responseText);
+                                       }
+                                       catch (e) {
+                                               params.failure(self, "Nie udało się - błąd serwera.");
+                                       };
+                               };
+
+                       }
+               });
+       };
+       WikiDocument.prototype.setTag = function(params) {
+               params = $.extend({}, noops, params);
+               var self = this;
+               var data = {
+                       "addtag-id": self.id,
+               };
+
+               /* unpack form */
+               $.each(params.form.serializeArray(), function() {
+                       data[this.name] = this.value;
+               });
+
+               $.ajax({
+                       url: reverse("ajax_document_addtag", self.id),
+                       type: "POST",
+                       dataType: "json",
+                       data: data,
+                       success: function(data) {
+                               params.success(self, data.message);
+                       },
+                       error: function(xhr) {
+                               if (xhr.status == 403 || xhr.status == 401) {
+                                       params.failure(self, {
+                                               "__all__": ["Nie masz uprawnień lub nie jesteś zalogowany."]
+                                       });
+                               }
+                               else {
+                                       try {
+                                               params.failure(self, $.parseJSON(xhr.responseText));
+                                       }
+                                       catch (e) {
+                                               params.failure(self, {
+                                                       "__all__": ["Nie udało się - błąd serwera."]
+                                               });
+                                       };
+                               };
+                       }
+               });
+       };
+
+       $.wikiapi.WikiDocument = WikiDocument;
+})(jQuery);
diff --git a/redakcja/static/js/wiki/xslt.js b/redakcja/static/js/wiki/xslt.js
new file mode 100644 (file)
index 0000000..dda12a1
--- /dev/null
@@ -0,0 +1,378 @@
+/*
+ *
+ * XSLT STUFF
+ *
+ */
+function createXSLT(xsl) {
+    var p = new XSLTProcessor();
+    p.importStylesheet(xsl);
+    return p;
+}
+
+var xml2htmlStylesheet = null;
+
+// Wykonuje block z załadowanymi arkuszami stylów
+function withStylesheets(code_block, onError)
+{
+    if (!xml2htmlStylesheet) {
+       $.blockUI({message: 'Ładowanie arkuszy stylów...'});
+       $.ajax({
+               url: STATIC_URL + 'xsl/wl2html_client.xsl',
+               dataType: 'xml',
+               success: function(data) {
+               xml2htmlStylesheet = createXSLT(data);
+                $.unblockUI();
+                               code_block();
+
+            },
+                       error: onError
+        })
+    }
+       else {
+               code_block();
+       }
+}
+
+
+function xml2html(options) {
+    withStylesheets(function() {
+        var xml = options.xml.replace(/\/\s+/g, '<br />');
+        var parser = new DOMParser();
+        var serializer = new XMLSerializer();
+        var doc = parser.parseFromString(xml, 'text/xml');
+        var error = $('parsererror', doc);
+
+        if (error.length == 0) {
+            doc = xml2htmlStylesheet.transformToFragment(doc, document);
+                       console.log(doc.firstChild);
+
+                       if(doc.firstChild === null) {
+                               options.error("Błąd w przetwarzaniu XML.");
+                               return;
+                       }
+
+            error = $('parsererror', doc);
+        }
+
+        if (error.length > 0 && options.error) {
+            options.error(error.text());
+        } else {
+            options.success(doc.firstChild);
+        }
+    }, function() { options.error && options.error('Nie udało się załadować XSLT'); });
+}
+
+/* USEFULL CONSTANTS */
+const ELEMENT_NODE                                      = 1;
+const ATTRIBUTE_NODE                 = 2;
+const TEXT_NODE                      = 3;
+const CDATA_SECTION_NODE             = 4;
+const ENTITY_REFERENCE_NODE          = 5;
+const ENTITY_NODE                    = 6;
+const PROCESSING_INSTRUCTION_NODE    = 7;
+const COMMENT_NODE                   = 8;
+const DOCUMENT_NODE                  = 9;
+const DOCUMENT_TYPE_NODE             = 10;
+const DOCUMENT_FRAGMENT_NODE         = 11;
+const NOTATION_NODE                  = 12;
+const XATTR_RE = /^x-attr-name-(.*)$/;
+
+const ELEM_START = 1;
+const ELEM_END = 2;
+const NS_END = 3;
+
+const NAMESPACES = {
+       // namespaces not listed here will be assigned random names
+       "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
+       "http://purl.org/dc/elements/1.1/": "dc",
+       "http://www.w3.org/XML/1998/namespace": "xml"
+};
+
+/*
+ * PADDING for pretty-printing
+ */
+const PADDING = {
+    dramat_wierszowany_l: 4,
+    dramat_wierszowany_lp: 4,
+    dramat_wspolczesny: 4,
+    wywiad: 4,
+    opowiadanie: 4,
+    powiesc: 4,
+    liryka_l: 4,
+    liryka_lp: 4,
+    naglowek_czesc: 4,
+    naglowek_akt: 4,
+    naglowek_rozdzial: 4,
+    naglowek_osoba: 4,
+    lista_osob: 4,
+
+    akap: 3,
+    akap_cd: 3,
+    akap_dialog: 3,
+    strofa: 3,
+    motto: 3,
+    miejsce_czas: 3,
+
+    autor_utworu: 2,
+    nazwa_utworu: 2,
+    dzielo_nadrzedne: 2,
+
+    didaskalia: 2,
+    motto_podpis: 2,
+    naglowek_listy: 2,
+    kwestia: 1,
+    lista_osoba: 1,
+
+       "podpis": 1,
+       "wers": 0,
+       "wers_cd": 0,
+       "wers_akap": 0,
+       "wers_wciety": 0,
+
+       "rdf:RDF": 3,
+       "rdf:Description": 1,
+};
+
+function getPadding(name) {
+
+       if(name.match(/^dc:.*$/))
+               return -1;
+
+       if(PADDING[name])
+               return PADDING[name];
+
+       return 0;
+}
+
+function HTMLSerializer() {
+       // empty constructor
+}
+
+
+
+HTMLSerializer.prototype._prepare = function() {
+       this.stack = [];
+
+       // XML namespace is implicit
+       this.nsMap = {"http://www.w3.org/XML/1998/namespace": "xml"};
+
+       this.result = "";
+       this.nsCounter = 1;
+}
+
+HTMLSerializer.prototype._pushElement = function(element) {
+       this.stack.push({
+               "type": ELEM_START,
+               "node": element
+       });
+}
+
+HTMLSerializer.prototype._pushChildren = function(element) {
+       for(var i = element.childNodes.length-1; i >= 0; i--)
+               this._pushElement(element.childNodes.item(i));
+}
+
+HTMLSerializer.prototype._pushTagEnd = function(tagName) {
+       this.stack.push({
+               "type": ELEM_END,
+               "tagName": tagName
+       });
+}
+
+HTMLSerializer.prototype._verseBefore = function(node) {
+       var prev = node.previousSibling;
+
+       while((prev !== null) && (prev.nodeType != ELEMENT_NODE)) {
+               prev = prev.previousSibling;
+       }
+
+       return (prev !== null) && prev.hasAttribute('x-verse');
+}
+
+HTMLSerializer.prototype.serialize = function(rootElement, stripOuter)
+{
+       var self = this;
+       self._prepare();
+
+       if(!stripOuter)
+               self._pushElement(rootElement);
+       else
+               self._pushChildren(rootElement);
+
+       while(self.stack.length > 0) {
+               var token = self.stack.pop();
+
+               if(token.type === ELEM_END) {
+                       self.result += "</" + token.tagName + ">";
+                       for(var padding = getPadding(token.tagName); padding > 0; padding--) {
+                               self.result += "\n";
+                       }
+                       continue;
+               };
+
+               if(token.type === NS_END) {
+                       self._unassignNamespace(token.namespace);
+                       continue;
+               }
+
+
+               switch(token.node.nodeType) {
+                       case ELEMENT_NODE:
+                               if(token.node.hasAttribute('x-pass-thru')) {
+                                       self._pushChildren(token.node);
+                                       break;
+                               }
+
+                               if(!token.node.hasAttribute('x-node'))
+                                       break;
+
+                               var xnode = token.node.getAttribute('x-node');
+
+                               if(xnode === 'wers') {
+                                       /* push children */
+                                       if(self._verseBefore(token.node))
+                                               self.result += '/\n';
+                                       self._pushChildren(token.node);
+                                       break;
+                               };
+
+                               if(xnode === 'out-of-flow-text') {
+                                       self._pushChildren(token.node);
+                                       break;
+                               }
+
+                               if(token.node.hasAttribute('x-verse') && self._verseBefore(token.node)) {
+                                       self.result += '/\n';
+                               };
+
+                               self._serializeElement(token.node);
+                               break;
+                       case TEXT_NODE:
+                               self.result += token.node.nodeValue;
+                               break;
+               };
+       };
+
+       return this.result;
+}
+
+/*
+ * TODO: this doesn't support prefix redefinitions
+ */
+HTMLSerializer.prototype._unassignNamespace = function(nsData) {
+       this.nsMap[nsData.uri] = undefined;
+};
+
+HTMLSerializer.prototype._assignNamespace = function(uri) {
+       if(uri === null) {
+               // default namespace
+               return ({"prefix": "", "uri": "", "fresh": false});
+       }
+
+       if(this.nsMap[uri] === undefined) {
+               // this prefix hasn't been defined yet in current context
+               var prefix = NAMESPACES[uri];
+
+               if (prefix === undefined) { // not predefined
+                       prefix = "ns" + this.nsCounter;
+                       this.nsCounter += 1;
+               }
+
+               this.nsMap[uri] = prefix;
+               return ({
+                       "prefix": prefix,
+                       "uri": uri,
+                       "fresh": true
+               });
+       }
+
+       return ({"prefix": this.nsMap[uri], "uri": uri, "fresh": false});
+};
+
+HTMLSerializer.prototype._join = function(prefix, name) {
+       if(!!prefix)
+               return prefix + ":" + name;
+       return name;
+};
+
+HTMLSerializer.prototype._rjoin = function(prefix, name) {
+       if(!!name)
+               return prefix + ":" + name;
+       return prefix;
+};
+
+HTMLSerializer.prototype._serializeElement = function(node) {
+       var self = this;
+
+       var ns = node.getAttribute('x-ns');
+       var nsPrefix = null;
+       var newNamespaces = [];
+
+       var nsData = self._assignNamespace(node.getAttribute('x-ns'));
+
+       if(nsData.fresh) {
+               newNamespaces.push(nsData);
+               self.stack.push({
+                       "type": NS_END,
+                       "namespace": nsData
+               });
+       }
+
+       var tagName = self._join(nsData.prefix, node.getAttribute('x-node'));
+
+       /* retrieve attributes */
+       var attributeIDs = [];
+       for (var i = 0; i < node.attributes.length; i++) {
+               var attr = node.attributes.item(i);
+
+               // check if name starts with "x-attr-name"
+               var m = attr.name.match(XATTR_RE);
+               if (m !== null)
+                       attributeIDs.push(m[1]);
+       };
+
+       /* print out */
+       if (getPadding(tagName))
+               self.result += '\n';
+
+       self.result += '<' + tagName;
+
+       $.each(attributeIDs, function() {
+               var nsData = self._assignNamespace(node.getAttribute('x-attr-ns-'+this));
+
+               if(nsData.fresh) {
+                       newNamespaces.push(nsData);
+                       self.stack.push({
+                               "type": NS_END,
+                               "namespace": nsData
+                       });
+               };
+
+               self.result += ' ' + self._join(nsData.prefix, node.getAttribute('x-attr-name-'+this));
+               self.result += '="'+node.getAttribute('x-attr-value-'+this) +'"';
+       });
+
+       /* print new namespace declarations */
+       $.each(newNamespaces, function() {
+               self.result += " " + self._rjoin("xmlns", this.prefix);
+               self.result += '="' + this.uri + '"';
+       });
+
+       if (node.childNodes.length > 0) {
+               self.result += ">";
+               self._pushTagEnd(tagName);
+               self._pushChildren(node);
+       }
+       else {
+               self.result += "/>";
+       };
+};
+
+function html2text(params) {
+       try {
+               var s = new HTMLSerializer();
+               params.success( s.serialize(params.element, params.stripOuter) );
+       } catch(e) {
+               params.error("Nie udało się zserializować tekstu:" + e)
+       }
+}
\ No newline at end of file
diff --git a/redakcja/static/xsl/wl2html_client.xsl b/redakcja/static/xsl/wl2html_client.xsl
new file mode 100644 (file)
index 0000000..6dd5080
--- /dev/null
@@ -0,0 +1,810 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"    
+    xmlns="http://www.w3.org/1999/xhtml"    
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <!--
+        Dokument ten opisuje jednoznaczne przekształcenie WLML 0.1 -> XHTML.
+    -->        
+    <xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" indent="no" />
+
+    <!--
+        Base tag for rendering a fragment of text
+    -->
+    <xsl:template match="chunk">        
+        <xsl:apply-templates select="child::node()">            
+            <xsl:with-param name="mixed" select="true()" />
+        </xsl:apply-templates>        
+    </xsl:template>
+    
+    <!--
+        Base tag for rendering the whole text 
+    -->
+
+    <xsl:template match="utwor">
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>    
+    
+    <!-- 
+        Przekształcenia poszczególnych elementów zgodnie z:            
+        http://wiki.wolnepodreczniki.pl/Lektury:Sk%C5%82ad/Tagi_sk%C5%82adu
+    -->
+
+    <!-- TAGI MASTERÓW STYLÓW
+    
+        Tagi rozpoczynające i kończące tekst utworu lirycznego o standardowej szerokości łamu:
+    -->
+
+    <xsl:template match="opowiadanie|powiesc">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="liryka_l|liryka_lp">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="wywiad">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <!-- 
+        *****************************
+        ELEMENTY POZA TEKSTEM GŁÓWNYM
+        *****************************
+    -->
+
+    <!--
+        Autor składanego utworu
+
+        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
+        np. na stronie internetowej) :
+
+        <autor_utworu> imiona-itd.-autora-składanego-utworu </autor_utworu>
+    -->
+    <xsl:template match="autor_utworu">
+        <xsl:param name="mixed" />
+        <h2 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h2>
+    </xsl:template>
+
+    <!-- 
+        Nazwa składanego utworu
+
+        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
+        np. na stronie internetowej
+
+        <nazwa_utworu> tytuł-składanego-utworu </nazwa_utworu>
+    -->
+    <xsl:template match="nazwa_utworu">
+        <xsl:param name="mixed" />
+        <h1 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h1>
+    </xsl:template>
+
+    <!--
+        Nazwa utworu nadrzędnego, w którego skład wchodzi dany utwór
+        <dzielo_nadrzedne> tytuł-dzieła-nadrzędnego </dzielo_nadrzedne>
+
+         Przykład:
+
+         <utwor>
+         <liryka_l>
+            <autor_utworu>Bruno Jasieński</autor_utworu>
+            <dzielo_nadrzedne>But w butonierce</dzielo_nadrzedne>
+            <nazwa_utworu>Deszcz</nazwa_utworu>
+            ....
+    -->
+    <xsl:template match="dzielo_nadrzedne">
+        <xsl:param name="mixed" />
+        <h2 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h2>
+    </xsl:template>
+
+    <!--
+        Podtytuł, czyli wszystkie dopiski do tytułu
+
+        Element strony tytułowej - lub odpowiadającej jej przestrzeni.
+        <podtytul> podtytuł-składanego-utworu </podtytul>
+
+        Przykład:
+        <utwor>
+            <powiesc>
+            <autor_utworu>Daniel Defoe</autor_utworu>
+            <nazwa_utworu>Robinson Crusoe</nazwa_utworu>
+            <podtytul>Jego życia losy, doświadczenia i przypadki</podtytul>
+            ...
+    -->
+    <xsl:template match="podtytul">
+        <xsl:param name="mixed" />
+        <h3 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h3>
+    </xsl:template>
+
+    <!--
+       Tagi obejmujące tekst noty poprzedzającej tekst główny (styl wieloakapitowy):
+
+        <nota><akap> tekst-noty </akap></nota> (styl wieloakapitowy)
+    -->
+
+    <xsl:template match="nota">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <!--
+        Tagi obejmujące tekst dedykacji (styl wieloakapitowy bądź wielostrofowy):
+        <dedykacja> tekst-dedykacji </dedykacja>
+    -->
+    <xsl:template match="dedykacja">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <!--
+        Tagi obejmujące tekst motta (styl wieloakapitowy bądź wielostrofowy):
+        <motto> tekst-motta </motto>
+    -->
+    <xsl:template match="motto">
+        <xsl:param name="mixed" />
+        <div class="motto_container">
+        <div x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>            
+        </div>
+        <xsl:apply-templates select="following-sibling::*[1][self::motto_podpis]" mode="motto">
+            <xsl:with-param name="mixed" select="true()" />
+        </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <!--  
+        Catch stand-alone "motto_podpis" and make then render properly.
+        If not, editing will fail :(.
+        
+        TODO: Make "motto" & "motto_podpis" one block in edit mode (like strofa) 
+    -->
+    <xsl:template match="motto_podpis[not(preceding-sibling::*[1][self::motto])]">
+       <xsl:apply-templates select="." mode="motto">
+            <xsl:with-param name="mixed" select="true()" />
+        </xsl:apply-templates>
+    </xsl:template>        
+        
+    <xsl:template match="motto_podpis" mode="motto">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>    
+    
+    <xsl:template match="motto_podpis" />
+    
+    
+
+    <!--
+        Tagi obejmujące listę osób poprzedzającą tekst dramatu
+          (zwykle składaną na osobnej stronie; to odmiana stylu listy):
+
+        <lista_osob> osoby </lista_osob>
+    -->
+    <xsl:template match="lista_osob">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="naglowek_listy">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+    <xsl:template match="lista_osoba">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+    <!--  Tagi obejmujące inne komentarze wprowadzające
+        przed tekstem dramatu (składane razem z listą osób):
+
+        <miejsce_czas> komentarze-wprowadzające </miejsce_czas>
+    -->
+    <xsl:template match="miejsce_czas">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+
+    <!--
+        ***************************
+        TAGI STYLÓW TEKSTU GŁÓWNEGO
+        ***************************
+    -->
+
+    <!--
+      Tagi nagłówka części/księgi:
+      <naglowek_czesc> nagłówek-części-lub-księgi </naglowek_czesc>
+    -->
+    <xsl:template match="naglowek_czesc">
+        <xsl:param name="mixed" />
+        <h2 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h2>
+    </xsl:template>
+
+    <!--
+      Tagi tytułu rozdziału:
+      <naglowek_rozdzial> nr-i/lub-tytuł </naglowek_rozdzial>
+    -->
+    <xsl:template match="naglowek_rozdzial">
+        <xsl:param name="mixed" />
+        <h3 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h3>
+    </xsl:template>
+
+    <!--
+      Tagi tytułu podrozdziału:
+      <naglowek_podrozdzial> nr-i/lub-podtytuł </naglowek_podrozdzial>
+    -->
+    <xsl:template match="naglowek_podrozdzial">
+        <xsl:param name="mixed" />
+        <h4 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h4>
+    </xsl:template>
+
+    <!--
+       Tagi sródtytułu:
+       <srodtytul> śródtytuł </srodtytul>
+
+       Tagi nagłówków aktów:
+       <naglowek_akt> nagłówek-aktu </naglowek_akt>
+    -->
+
+    <xsl:template match="srodtytul">
+        <xsl:param name="mixed" />
+        <h2 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h2>
+    </xsl:template>
+
+    <xsl:template match="naglowek_akt">
+        <xsl:param name="mixed" />
+        <h2 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h2>
+    </xsl:template>
+
+    <!--
+      Tagi nagłówków scen:
+      <naglowek_scena> nagłówek-sceny </naglowek_scena>
+    -->
+
+    <xsl:template match="naglowek_scena">
+        <xsl:param name="mixed" />
+        <h3 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h3>
+    </xsl:template>
+    
+    <xsl:template match="naglowek_osoba">
+        <xsl:param name="mixed" />
+        <h4 x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </h4>
+    </xsl:template>
+
+    <!--
+       ************************
+       Bloki w tekście głównym
+       ************************
+    -->
+    
+    <xsl:template match="dlugi_cytat">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+    
+    <xsl:template match="poezja_cyt">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="kwestia">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="didaskalia">
+        <xsl:param name="mixed" />
+        <div x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="wywiad_pyt">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="wywiad_odp">
+        <xsl:param name="mixed" />
+        <div>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+        </div>
+    </xsl:template>
+
+    <!--
+        ***********************************
+        Style akapitowe oraz strofy i wersy
+        ***********************************
+    -->
+
+    <xsl:template match="akap">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+    <xsl:template match="akap_cd">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+    <xsl:template match="akap_dialog">
+        <xsl:param name="mixed" />
+        <p x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </p>
+    </xsl:template>
+
+    <!--
+        ********
+        STROFA
+        ********
+    -->
+    <xsl:template match="strofa">
+        <div x-editable="true">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:call-template name="context-menu" />
+         
+            <xsl:choose>
+                <xsl:when test="count(br) > 0">
+                    <xsl:variable name="first-verse" select="br[1]/preceding-sibling::node()" />                    
+                    <xsl:call-template name="verse">
+                        <xsl:with-param name="verse-content" select="$first-verse" />                        
+                    </xsl:call-template>
+                    <xsl:for-each select="br">
+                        <xsl:variable name="lnum" select="count(preceding-sibling::br)" />
+                        <!-- select all nodes up to the next br or end of stanza -->
+                        <xsl:variable name="current-verse"
+                            select="following-sibling::node()[count(preceding-sibling::br) = $lnum+1]" />                        
+                        <xsl:call-template name="verse">
+                            <xsl:with-param name="verse-content" select="$current-verse" />                            
+                        </xsl:call-template>
+                    </xsl:for-each>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:call-template name="verse">
+                        <xsl:with-param name="verse-content" select="child::node()" />                        
+                    </xsl:call-template>
+                </xsl:otherwise>
+            </xsl:choose>
+        </div>
+    </xsl:template>
+
+    <xsl:template name="verse">
+        <!-- the verse contents including the last br (if any) -->
+        <xsl:param name="verse-content" />
+        <xsl:variable name="first-tag-name" select="name($verse-content/self::*)" />
+        <!-- name of text nodes is '' == false -->
+
+        <!-- THIS IS A HORROR!!! -->
+        <!-- Possible variants: -->
+        <xsl:choose>
+            <!-- Simple verse == not wers_ tags anywhere until the ending br -->
+            <xsl:when test="not($verse-content[starts-with(name(), 'wers_')])">
+                <p class="wers" x-node="wers" x-verse="true">
+                <xsl:apply-templates select="$verse-content[local-name(.) != 'br']">
+                    <xsl:with-param name="mixed" select="true()" />
+                </xsl:apply-templates>
+                </p>
+            </xsl:when>
+
+            <xsl:otherwise>
+            <xsl:apply-templates select="$verse-content[local-name(.) != 'br']">
+                <xsl:with-param name="mixed" select="false()" />
+            </xsl:apply-templates>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="wers_cd|wers_akap|wers_wciety">
+        <xsl:param name="mixed" />
+               <!-- <xsl:choose>
+               <xsl:when test="ancestor::*[0]/self::strofa"> -->
+               <p x-verse="true">
+               <xsl:call-template name="standard-attributes" />
+               <xsl:apply-templates select="child::node()">
+                       <xsl:with-param name="mixed" select="true()" />
+               </xsl:apply-templates>
+               </p>
+               <!-- </xsl:when> 
+               <xsl:choose> -->
+    </xsl:template>
+
+    <xsl:template match="br"><xsl:text>/</xsl:text></xsl:template>
+
+
+    <!--
+        *************
+        STYLE ZNAKOWE
+        *************
+    -->
+
+    <!--
+        Tagi obejmujące tytuł dzieła, np. książki, filmu, piosenki,
+        modlitwy, przedstawienia teatr. itd.:
+
+        <tytul_dziela> tytuł-dzieła </tytul_dziela>
+    -->
+    <xsl:template match="tytul_dziela">
+        <xsl:param name="mixed" />
+        <em>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </em>
+    </xsl:template>
+
+    <xsl:template match="wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www">
+        <xsl:param name="mixed" />
+        <em>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </em>
+    </xsl:template>
+
+    <!--
+        **********
+        SEPARATORY
+        **********
+    -->
+    <xsl:template match="sekcja_swiatlo">
+        <xsl:param name="mixed" />
+        <br><xsl:call-template name="standard-attributes" /></br>
+    </xsl:template>
+
+    <xsl:template match="sekcja_asterysk">
+        <xsl:param name="mixed" />
+        <hr><xsl:call-template name="standard-attributes" /></hr>
+    </xsl:template>
+
+    <xsl:template match="separator_linia">
+        <xsl:param name="mixed" />
+        <hr><xsl:call-template name="standard-attributes" /></hr>
+    </xsl:template>
+
+    <xsl:template match="zastepnik_wersu">
+        <xsl:param name="mixed" />
+        <hr><xsl:call-template name="standard-attributes" /></hr>
+    </xsl:template>
+
+    <!--
+        *************
+           PRZYPISY
+        *************
+    -->
+
+    <!--
+        Przypisy i motywy
+    -->
+    <xsl:template match="pr|pa|pe|pt">       
+        <span x-editable="true" x-common="common">
+            <xsl:call-template name="standard-attributes">
+                <xsl:with-param name="extra-class" select="'annotation-inline-box'" />
+            </xsl:call-template>
+            <a name="anchor-{generate-id(.)}" />
+            <!-- the link to the non-inline version -->
+            <a href="#annotation-{generate-id(.)}" class="annotation"></a>
+            <!-- inline contents -->
+            <span x-annotation-box="true" x-pass-thru="true">
+                <xsl:call-template name="context-menu" />
+                <xsl:apply-templates select="node()">
+                    <xsl:with-param name="mixed" select="true()" />
+                </xsl:apply-templates>
+            </span>
+        </span>
+    </xsl:template>
+
+    <xsl:template match="begin">        
+        <span>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:attribute name="theme-class">
+                <xsl:value-of select="substring-after(@id, 'b')" />
+            </xsl:attribute>
+        </span>
+    </xsl:template>
+
+    <xsl:template match="extra|uwaga">
+        <span x-common="common">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </span>
+    </xsl:template>
+
+    <xsl:template match="motyw">
+        <span x-editable="true" x-common="common">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:attribute name="theme-class">
+                <xsl:value-of select="substring-after(@id, 'm')" />
+            </xsl:attribute>
+            <xsl:call-template name="context-menu" />
+            <span x-pass-thru="true" class="theme-text-list"><xsl:value-of select=".|node()" /></span>
+        </span>
+    </xsl:template>
+
+    <xsl:template match="end">
+        <span>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:attribute name="theme-class">
+                <xsl:value-of select="substring-after(@id, 'e')" />
+            </xsl:attribute>
+        </span>
+    </xsl:template>
+
+
+    <!--
+        ****************
+         TEKST WŁAŚCIWY
+        ****************
+    -->
+
+    <xsl:template match="text()">
+        <!-- <xsl:value-of select="." /> -->
+        <xsl:param name="mixed" />
+        <xsl:choose>
+            <xsl:when test="normalize-space(.) = ''" />
+            <xsl:when test="not($mixed)">
+               <span x-node="out-of-flow-text" class="out-of-flow-text" x-editable="true">
+                       <xsl:value-of select="." />
+                               </span>
+                       </xsl:when>
+            <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="comment()">
+        <xsl:comment><xsl:value-of select="." /></xsl:comment>
+    </xsl:template>
+
+    <xsl:template match="*[name() != local-name()]">
+        <span>
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+        </span>
+    </xsl:template>
+       
+       <!-- 
+               Earlier versions of html2wl introduced a BUG, that 'causes "out-of-flow-text" tag to appear.
+               Instead of marking it as "unknown", just pass thru it
+       -->
+       <xsl:template match="out-of-flow-text">
+               <xsl:param name="mixed" />
+               <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="$mixed" />
+            </xsl:apply-templates>
+       </xsl:template> 
+
+    <xsl:template match="*">
+        <span class="unknown-tag" x-node="{name()}">
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>        
+        </span>
+    </xsl:template>
+
+    <xsl:template name="context-menu">
+        <!-- <span class="default-menu context-menu"> -->
+        <!-- <button class="edit-button">Edytuj</button> -->
+            <!-- <span class="delete-button">Delete</span> -->
+        <!-- </span> -->
+        <!-- <span class="edit-menu context-menu">
+            <span class="accept-button">Accept</span>
+            <span class="reject-button">Close</span>
+        </span> -->
+    </xsl:template>
+
+    <xsl:template name="standard-attributes">
+        <xsl:param name="extra-class" />
+        <xsl:attribute name="class"><xsl:value-of select="local-name()" /><xsl:text>&#x0020;</xsl:text><xsl:value-of select="$extra-class" /></xsl:attribute>
+
+        <xsl:attribute name="x-node"><xsl:value-of select="local-name()" /></xsl:attribute>
+
+        <xsl:if test="local-name() != name()">
+            <xsl:attribute name="x-ns"><xsl:value-of select="namespace-uri()" /></xsl:attribute>
+        </xsl:if>
+
+        <xsl:for-each select="@*">
+            <xsl:variable name="id" select="generate-id()" />
+            <xsl:attribute name="x-attr-value-{$id}"><xsl:value-of select="."/></xsl:attribute>
+            <xsl:attribute name="x-attr-name-{$id}"><xsl:value-of select="local-name()"/></xsl:attribute>
+            <xsl:choose>
+               <xsl:when test="namespace-uri()">
+                <xsl:attribute name="x-attr-ns-{$id}"><xsl:value-of select="namespace-uri()"/></xsl:attribute>
+                               </xsl:when>
+                               <!-- if the element belongs to default namespace and attribut has no namespace -->
+               <xsl:when test="not(namespace-uri(.))">
+                               <xsl:attribute name="data-wlf-{local-name()}"><xsl:value-of select="."/></xsl:attribute>
+                               </xsl:when>
+                       </xsl:choose>               
+        </xsl:for-each>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/redakcja/templates/404.html b/redakcja/templates/404.html
new file mode 100644 (file)
index 0000000..72d1875
--- /dev/null
@@ -0,0 +1,69 @@
+<!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" xmlns:p="http://platforma.wolnelektury.pl/">
+    <head>
+        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+        <title>Platforma Redakcyjna</title>
+               <style type="text/css">
+                       body {
+                               background-color: #84BF2A;
+                       }
+
+                       #main {
+                               position: absolute;
+                               top: 20%;
+                               left: 20%;
+                               right: 20%;
+                               border-width: 3px;
+                               border-color: black;
+                               border-style: ridge;
+                               padding: 1em;
+                               background: white;
+                       }
+
+                       #logo {
+                               vertical-align: middle;
+                       }
+
+                       p {
+                               text-indent: 1em;
+                               text-align: justify;
+                       }
+
+                       #main a {
+                               text-decoration:none;
+                               color: #325f70;
+                       }
+
+                       #main a:hover {
+                               color: #f9c325;
+                       }
+
+               </style>
+    </head>
+    <body>
+       <div id="main">
+       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
+               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
+                       </a>
+        Nie odnaleziono strony</h1>
+               <p>Strona o podanym przez ciebie adresie:</p>
+               <pre style="margin-left: 2em;">{{request.build_absolute_uri}}</pre>
+                       <p>nie instnieje.</p>
+                       <ul>
+                               <li>Sprawdź, czy adres nie zawiera literówek, np:
+                               <em>bog_mnie_oposcil</em>, zamiast <em>bog_mnie_opuscil</em>.
+                               </li>
+                               <li>
+                                       Upewnij się, że dokument do którego chcesz się dostać jest na
+                                       <a href="http://stigma.nowoczesnapolska.org.pl/platforma">liście utworów</a>.
+                               </li>
+                               </ul>
+                       <p>Jeśli nadal nie jesteś w stanie odszukać dokumentu, skontaktuj się
+                               z <a href="mailto:platfroma@stigma.nowoczesnapolska.org.pl">administratorem</a>.</p>
+
+
+               </div>
+               </div>
+    </body>
+</html>
diff --git a/redakcja/templates/500.html b/redakcja/templates/500.html
new file mode 100644 (file)
index 0000000..1774b5a
--- /dev/null
@@ -0,0 +1,56 @@
+<!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" xmlns:p="http://platforma.wolnelektury.pl/">
+    <head>
+        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+        <title>Platforma Redakcyjna</title>
+               <style type="text/css">
+                       body {
+                               background-color: #84BF2A;
+                       }
+
+                       #main {
+                               position: absolute;
+                               top: 20%;
+                               left: 20%;
+                               right: 20%;
+                               border-width: 3px;
+                               border-color: black;
+                               border-style: ridge;
+                               padding: 1em;
+                               background: white;
+                       }
+
+                       #logo {
+                               vertical-align: middle;
+                       }
+
+                       p {
+                               text-indent: 1em;
+                               text-align: justify;
+                       }
+
+                       #main a {
+                               text-decoration:none;
+                               color: #325f70;
+                       }
+
+                       #main a:hover {
+                               color: #f9c325;
+                       }
+               </style>
+    </head>
+    <body>
+       <div id="main">
+       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
+               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
+                       </a>
+               Błąd po stronie serwera.</h1>
+               <p>Niestety nasz serwer WWW nie był w stanie dostarczyć Ci strony o którą prosiłeś.</p>
+                       <p><b>Serdecznie przepraszamy.</b></p>
+                       <p>Administrator został już powiadomiony o błędzie, ale jeśli chciałbyś
+                       przekazać nam więcej informacji na temat błędu, napisz <a href="mailto:platforma@stigma.nowoczesnapolska.org.pl">nasz adres</a>.</p>
+               </div>
+               </div>
+    </body>
+</html>
diff --git a/redakcja/templates/503.html b/redakcja/templates/503.html
new file mode 100644 (file)
index 0000000..7f85276
--- /dev/null
@@ -0,0 +1,56 @@
+<!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" xmlns:p="http://platforma.wolnelektury.pl/">
+    <head>
+        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+        <title>Platforma Redakcyjna</title>
+               <style type="text/css">
+                       body {
+                               background-color: #84BF2A;
+                       }
+
+                       #main {
+                               position: absolute;
+                               top: 20%;
+                               left: 20%;
+                               right: 20%;
+                               border-width: 3px;
+                               border-color: black;
+                               border-style: ridge;
+                               padding: 1em;
+                               background: white;
+                       }
+
+                       #logo {
+                               vertical-align: middle;
+                       }
+
+                       p {
+                               text-indent: 1em;
+                               text-align: justify;
+                       }
+
+                       #main a {
+                               text-decoration:none;
+                               color: #325f70;
+                       }
+
+                       #main a:hover {
+                               color: #f9c325;
+                       }
+               </style>
+    </head>
+    <body>
+       <div id="main">
+       <h1><a href="http://stigma.nowoczesnapolska.org.pl/platforma">
+               <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABKCAYAAAD+IBtNAAAACXBIWXMAAAMTAAADEwE9ZoPHAAAgAElEQVR4nO2dd5iU1fX4P+e+78zs7MIqIIigsLusikFBWERRUazYNSr4jVKjASMqIGCJbdAkVLGiwZ+NYgnExGiMGkSwIrJUgwpIF1B63d0p7z2/P2Zm2Q4LKyXO53n22SnnnnvOfee8t7y3CDXAY5/mnOClmc+MZal15DOJ6We73ILPQ23XbqwJ/XuLKrJzWq1f+aweF7hg1wci6IHMP8X/HlITSobl5zRx1axU5QfQo0QkLfHVd9YyTZQPNvy09aMRV2/cURP5JVFFdn3oP9lVOd8xpiPQAaEegEvhsXIBa2oyvxS/PGokQABGzmq2wqj8Y0dG4J7MbdFTY0bbi6Nng14gSB0gqsoMa3nf8XuvDWqzfCXAqFm53WJil9/bdtlne5OPKhKb4p4jrr+bWr0SoQGqEYWZKuZjUXuuiJzsnl9YL1WDpNhf3JpSpPCxwrmhFgsjwFeJvydDismccUJb6/cuRuUix2GIRk3/0MtZTUO9VhSB9nOsWQtUGSDbPwycEDBOj8hU29U40sSqXYSVN4xrP3AKwtPlSgoAIlMDX6PyWSo4UtQENRcgnpmuju06dEGTOve1XLUl+XlIsLA4GTB/HDH7hA4G+0ntk92LgbctLBToUJne8BROEkkbKyIdsLpZRF61nnnJf/GueeVsmEhmTOVXGMbXlF8pftmYmlJkC51pghh/xH9hVXIFbRZ/rqo/euh1AGrtLBHNejz/pGMqTOCkPYxQX6x3vbu58Bj3gsI7KwoOgHDDtHaImKgX+3S/HUqRghoMkPvO+26FKsvV04urkgsJVlX+IXDl2Pw8X6ETfkORaNSLdSsrqxPJNMpVWEa4F0XelC5EqtIt1pyDakGwTnT2/vqTIgXUYIAktL2H0GlPYmLM3wWps0W2nR9qu3ajKu8YY7uWlYs2Srsexfq2FE3em+zF6CUY/UTaEt0X81OkKEuNBoiV2AREjhv9xQntqpJrunzxNLDrfJbOAMboOyCnDMvPaVJSTixdrZo3pQs795S3fkg9QfM85YP98yJFit3UaIDck7fiSxVdYl29uSq5Ll3wgAlWuSYU6ujuNJEpAG6MK5Iy+kHwOISO1rOv7E3eERu8GBEjsfD7++NDihQlqdkmFiAwHvT/QvmN0quSi4h9WYR6mZetuDDUZvVaVBdax7k8+X3YZ6+3sCqtU9H0vcrYlU4WXRnoxHf750GKFLup8QCJoeMRrZ0RC1xbldwf2q74DsuXFuf3AIJMEbXnj83P8wEYlevxzPg9Pc/QSfiLpmR0MlYvdaymmlcpapQaD5B72y5bpapTxXUGDc9vep5q5U/rrcOLKlwxdFrzLM9Gp4hI2k7deLL+M72RKGdorGBcRen0ZdJiU/zXhaemvRqrG1zvGPs+4BShz9S0Pyl+2dR4gADYSPQ+taijvo8em52zbPjM3NCjM0/MLitXEAyMF9FVbnr4tvXBoo9R9Tzx5YVredcqfJ52GUtLykc+Ss+LTQmOiTUJrlXj/A2hgwjjY55e6H5W2LDWRZGvfw5/UvxyqbG5WBXxp1nNTg6g3VTNjSLaGJhurX2lwAn/LdR2bQHAiJnZ3R1jnosaudbx9C0xZkC/rWuuVWPf8J9f9JI+RSDcPP0WY7S3CC2BHxQmx2xsUvDC6MzUlJIUPyc/a4AkCSkmMKdZR8dqF1G5GiRDlMkxx76cs2zZjFVNc9/CcAWqhSYWbnnzpg2SuTG8Otw4vYfj6AOgR1vh7yYae9a9OPZpMih0Ko1j1t8LkTPFSHM8/cC9KPz7A+FTil8GByRAShJSjP/LZu0dV6911FzjmegthXkrPw7Mzr6QHYHFiSfyEpmW9rqxXGPVDPMHCsbKOawDCH9Ac3UDFzrWXILoJQhWkQXGyvyota8GOxV9dKB9SvG/ywEPEIBpWVlpzWOxlkE1tQs0Nr/R2tILq/RdmsbSgiuwDN4Z079lOF4HFd+FRvQChMaoWoWZ1upfA2H/q3LljgO6MCvFL4cDEiAKZn3j3NN9fr0cy6UoLTGJmcQqmwuNd2bj5csXFcuHMNGz074VkRNKKNlkRaeK5/3LF057LxUUKQ4EP1uAKJjNTZpcIPi6IVyWWOkXQfnCWpkS1aIP/a5rRM0XotKrzqqlpYZ0dTwZXuPAOQjiRM3X0qlw9c9la4oUlVGjAbIlO7upetoHIyermjwRGmH5XsR7Rz1nSuSHnZ805Kddmpfn27Jp0/Wo8yiAGys6PXPNmk15vXunazjtJN/6TUt21orYQFqjfIx8LMibtVce8dH06aFYTdqbIsWeqNEA2dgku6uIjBXkO1HmYL2JdX5Y8XHy+zWNGh3ndwK/cx3prUgdPJ6P+Hk0LeZmXJP9m9XbmmydIUJbsN/FdhRc5Dsi0MB6/l6C/Y0VEdT+Uzwz+Yg1R05JBUuKA8HP3gdZddRxjWqn+6+3jnYRy5kI21HzWlhiI45ZsWLF6nonNE6vFVvy23bt265Or79Q4DaFQWr5fO6EJ7oDtOgc8gfStl6hoj0EuUxhsxheR+2EOeOeSq39SPGz8bMEyJbs7KZW5VqxXItwFqAiZqoSe3k+/OO8FSuKkrKbs3LuVZVzLz73ij4qsjJG7Gq/9cc8Y9/xbFGrBRP+8t+Supt1G9SgthO7UTx6iqGVqn5rxYTmj3t80s/hS4pfNjUaIGsbNUoPumn/VCMXoqqKzLTGvhkJh//aeO3aCjvZW7JyFlnVEfVWLn+xdfcBm8Xo+DmvPDGgTfd+S0Bmzxn/xA2V5df6t3e1Ek/vV7WXRgrXHrNw8uQ9rhtJkaI61OhcLNfxX6lGLgS9T2PhJvVWLm1ff/nyUZUFx09Nm56pVnJ8schbAKI6V1UuAlSU5xSuad/55rqV5Tf3pdHzd4Wj/RFJD6Qf07kmfUmRAmo4QIxxO6mypu6KZcPqrVnzw57kXXV7Wkc/zlyzZhOAODJF0F+d0PnWxhEv8hKiGg7UurEqHYveeGYt2P+oSs8aciNFimJqNEAE7WTiU8/3yGoIYrjBIMV9h6hX+C+A9Iy0i75+7bktKB/gmJ57VBbTF4EOp/bsn7VvlqdIUTE1FiCbc3JOEaGR9dirAAk2yb5OIGC86OQWN/U7rWXX35+4YMJf/quWlXj2ooRxfwXNa9nt1pOr0hWJ1HtbkE0OttzOKClS7A81V4OoXIKqt93oh3sl70hPq/rukatWbfE7Ms2YwHgAMfzLiLk4r3dvX1Hh2rfBFgn+m6pStXByKCIi/7Qq+xwgj+efdMyw/Jyz9zV9itLk9ejd7MT/u73RwbZjf6mxAFHlAkVmZq9YsXVPsluys5say/mInQCAEDTCMQAxMRMRjortSrti4eTJO1HeM2Ku35POGPxHkOPzevRuti/2ezYyxVXz6bDZuXvctijFnrGS/mJGwPf2wbZjf6mRANG4nvai3sd7kl3fqGlrPEaB2VIvI+PfAKJYVa0DsOCV0V8q8o3jSncAa/VNEXJb//auVlXpTS/Y/qGCVdLO2ScnhACAG9N9S18DjMrPHjhq1vFPHaz8axTVpoq2btE55D/YpuwPNRIgG7KyWgpkiuN+WdH32xs3rrelSVa/zVk5C1y/O8caczoSu10WLowAqKgnIrXyevf2ASD2U1HaAjjp6f9SJWKiWmUtMmPyi5tVybdizt0XHyxmMYA45qR9SV+SQfOPzhg+o2m19SimD+gdZfcHOxwRxRMwZOyqdJj+cKBGNq826p6FKGGjxQHy07HHtvT5Ap3E04tjRs5R1ZioeUs1MrDuqlVTBWxSVlQsAnZL9Ehgg8T4rzrS56yr7q79+fPDt7Xpfue7VuT+1t37X6JiP3BU3q+9qs6X5eZjCdPFo9IHi1XhqC5W4TJPtfm+lkOS+uGMa4xjHgVyqpVQid9tram9vzYcdESjIAQKo3WAHw+2OftKjdQggj0bZZPf0+s2ZTV7Y0tWzo8+NzAf5U+eYCz02bBre8O6K7+/qd6qVVNKBgeAoh6ADabXAYgV7HrLs3bY523SdwGEC9d1t0b7qdr1BhmgIp9ub7p1Y+tu/d5s1fPOO9reeEe7Fp1Dfteaj8XQ9MRut5TbIGKPGLsYwEBuKNRxv24cjshmEbJHfnlsy+qkE9QPIJFwcH/yPxRQlQhANC1a/2Dbsj/UzPEHyskY6oE8iTJb1bysjjctHA5/1mhtfHOGqkgGjKvE+yF/f+EH4L7k94kpJE8DT3PppYGWdXPOdsXfSYy90LFytfUZx+/bEvaURYKQTsb5wIvV8sHGFiN+AJ9z+cpmhFi0pySVEVZvXUBcjBu8Gliwt+lUjV8EJBg87AME2ArgF/fog23I/lAzAWLs76LG1NJlu2Y05Kdd1U2uGE9Q1HHq7FH4vffCC2Aq8T/Ouuru2kV1ou09j7MdY89G2W6MVLtjGNvlLXJqxV+neU5z2PcAwRasw8lErb0EeLQaKf0AnkYP/wARswEUz9MGB9uU/aFGAqTeihUVds73FsFaEFTNngOkDJ+/PWIH8J/E3z5zd8c1a0bnNytQJF1dexLwz33VFT19/YbArNqeIidWJ51IPEDcmHPYB4iqXS8iqJpUDbK/qGAFMHDkwbJBBB2VL0tQWkm8BimFKvL4jKxzrOu7UcQerWiBtfr+3acvL3eaVUiwI2fJTwKNhuXnHHFv22Xb9pT/47NOyPHw/CCo0Vsfy292uWclCAQF/CL63KDTlr5XQ+7+7GiiBnEcUgGyvyjxAPE8qXYNUsOGLAZaYUqPZIVezkp77CvnLXzSCZT4bqqCMfxm5Fe51w9u9/1VZVUJug6kkcE0A+YkPx/9fou6bvom585zftwAMPqLrHM913nGw56cXH1gRC5RBVNiMYKqRoHDJkDEeusxBpFUgOw3BlUQjBvLqAl9p/W67ThP/QNR2ojqD57qisDGTcNmvvfq9qrSechiBwV2B8joSQRtlu8dRC8AQNmsqu+KMdmgZ4voFaFpWUeGziszg8DKOgzg2RNJBMjj+ScdE7NFczwyjnx0VvapD562fJH1uf8SqKXKDhESw7s6DdHizr1AgYP7Qk2UzYHCcWS9Kqhy3MG2ZX/YrwBp1b3vCY74X7Nqv4oW1um/cHKo9BFpoZA5eeXmM/zW9LCqHsYuj+768blyC5vUKAJC8fnqnNzrzjOP2JT2daKPsde06d5/pGe1H+ADUBGMCNH6R3XI69270+znn690VM3BrgJBkCOSh5Fqk+y+yeBQlTcCdZb0vPN4wqH8RukZNn2biLjpmf5TgDLnIuqPIDgOpwCvA3he5BEx0hDANaYxsCgisQv94sSaLl06b1V2bvy5jth3B7Vd/lh1/D5YdO7c2VkWbNR4q/qKlk4YtT75uSAb4nvCanPiVeNhuUVsuQBp06PfP2I2/GDZpa4V4Yg7HDTPiOQF/RtfBT4HyOvZrzPITXbZtnNE4h1vIwLq4A82HpTXre9VsyeMmZnUo6IqCIk2N0d3G5Th96Kf7MosehQYAvGltkeYyOV46pf09DdmPz+8XLu+Vc8770AZVLxQUu00VScgRs9E5GwtTB8A/KlSh2K6ETeeNhZ2GgBbcMxvACx8W/Dvxt0Gh5bExubn+bbGNt8rDi7YdWmZ339VVpVV+6PBQT1zCsCwr3JbgPYCUFhaV4/8FOAPbVcUl8OoWaog4nnOHh8UPjYr57cW85TFjr3ntGUDIV7bAdzVhcJinbOb5eFpL3CaW/GWuJuC98eOCmc5ym1RsQP3pn9UGa16DOiyTBmmotmZxCKndu8/3rEFD82e+Py6GKyIP2ST9BO73ZK1aMILy/c1n4NJuQeFqnKmj0C5CXt53fqentf7niOS79t37hxEpViuwPVtjcsNeFRVJqlyNcI6z+NRYFlSToQGVnwTj+42aHdzSiVxd9E0gKN3ba2DiCNGOgGS13PAsEwTWwfmJRznL1oUXtfqxttL2diy511nOCrJu+4yK7SeM/6p8/0b11+Kxn8wNr6BdqVYv7sh+TpgfA2GTmuepUgbACNEal3+w2ujvmr2+XZv6w+O4zwIRFWcQXceT7isLsdxfgRQo6cAOOhIRBwAE4vd36ft7HLnKKqKByCqteLvkcdm5Q4b+VX278rKephBAhkG6T966gmNAbym2UNsdu764dMaH/vnGc3OGvlV7lys5COmL6IXGMyt9qiCXuJ5/6dws0/LT8sZld+sx2Ozcl8IzW9W4fBsm8635QK06drvdqP2DRXNhvgInBFu8Zzga4DMe+WJFaqsBwg6wSpPPj6UKRcgAsYabVvyo9bd+32sxvclRUXPJT+MZDTuhMTvWBY+/2bc4wvb3nhHOyv2fgCxOn5u9hGnzJ/4xENzxj3RLGLsWYouARAht5GNFU8KjPdBwEk2sTLcIxO2tGvTfcDbqnqPlLRVCDqO82Tx3C1ANHo9iE+VCNgu8155Yh6XXhqIHn3UJISggrVe7M2Svp7a7c6+eT36zW3T4874nT0S3r1bo9UGmQ2cjWj8KT9KK6AzImciUhfVLyIS6zC47ZLXKipYD/kxbqo0HTUj51oRuTT+jc6+64wVlWwwofEmlqMZAKO+yD1D4R7FKTXdf/QkgoKemNBvYrX0JgBr3AhQy8lIe9/nyHQRTi2RLIrlJW9H5K/GyC4AFS01KDLy89z2qrykcHPtiJbbBDyv58Dmmu5f1KZHv3/gyNMCq401l1uhjuL1ADBIx7zuA7rHLwozAcSaXhX7e+hTLkCsYEDyku9b9RjQWUTOAbAqZwJ07Bhy1dqHkjIqdiyAGre9iIiCLSqq8ztCoeIpJf99+akv1Orfku8FrVc2b03UINb1Z8aFxEE0fm6hqidWx6vKlrjlcqIWZlySTOuom/jB6FdrrP+7Nt1vv6FNgxOnJGs5g71nwatjpibl2/TsHzLGPKPIqSh3ABT6osU1iBHq922xcCdG/pvIvzAm9goh2iawcXO9Qe2WnlWyeZRk0PyjM+JlpcVHwakrJTvYRwyb3rxp2XQJf+M1iJUMAC9g6yYK61clxbyc438tSPG1M2K7A7iGLxN6WojggqrFjo2J7RBMD9QddPr3N99z3pofVDTRB9SOSR1PLSEgfl5K6lWN15yl8LvrUBWQa6y1r0VjkVPzJ4z+97xXntg6d9zT4xVdC6DGaxc32/4jbo60b9X9jtYV+nyIU64PIqiHktui5+CGGz3d4ao3TJPDjaJN8nr3Tt9asK2/EdMawMLmOtSdDBBD6zkAqhIIbvw18Nek3lN79s8Sj+L15TGf833ytUq8iaWJGsRfYLZQ3F1P4NFz9qtPTmzds98bqNwAIEZPBt4BsKJ1DGBFftVYouvBTY/r1LC1+vj8CU+NSqpq07N/COXhYtXiDAPIXLZ2l83OTRjoNQCwMe8d4zitEAk6Kk9GjPQeeNnmUqNhg+YfnXF0OP1GxfSWCG1GzKr9YEHb74fVmpW7HSFTiA9fx0eqJNdXK/LF6PycTne1XVbqwB9RPASMY2oB+CPuBuuzGKg//MvjexEr+tr43C6idnc/C0CkxYj83DY7dNeXtSh5NKT0uPu0pRPKlCSelR8dAdTc9NhXTSaGjVkT2eoMBUoOb5f7Qc9+fvi2Nj36LwdyPDHPfP3ac1vK2B9DAOs0AZiTXXdcm+VbBwCnODift+7W/28YPQPku7njnig3NH4oUsEols4WMZcEbPTJRkYcRYsn/omIaCRtpDj25uIxe09enD4xVAQgLi+hdrCISQP3jTbd+40QMVMUPQHVMzASH1my8sWCCaN3P31XVUTQRJMtbNesDrC7uyDYv8x+9amJADYmix0nkQxaFAtZ+zrGnGWgbvypPGtU7fioE3hq4YSRPwK06969XpR6IVRvL04GI5J7agVatHAKC8KJPOM1XMH7TYfUunT1aRjpJNDMZ2XqqFnNvsayFiEsxnga1gvigZCw19I+JNhRs5gJXJT4eGNsl3uar5Y3AczZVvWTYfk5V97bdtln5a6AZ9MBBrRfPGt0fu5/FC52HH0JJ1BaDrXJO76J0Tl0xtr7Rs7KXSrQzMK3g9t+P3FQ+QuMb8Wyv9vs3I3AUSr+D/0VjS+JHDd6EsG3nw1FdzTd/LTFfDJ33BOvW3SpQXJ81mtJKDSz9ZKtncRHJ1VygCYAntW5AIRC1nTtN9AzfCAiQRG6gYDaPQ4AHSpU0Adx/pF40UXQ6wBUyVfVxKiduU2QQPxznTFn03cPJtPOe+WJFYr2SXaKEWmi6M1AB0gEh+q3Rf5IqZ1KNNFJN4km1sLJk3cqWvxcYactGLFb2iue6yVocYA4weBE0N1DuKIFxsgxPoquzOs6oN+pPfu/EpO6y0V2B4eqvn18wZo/JN9vKNxiSfSHrLhHAIRC02P+TVu6qOqMEqV0CkY6IXKVqv4aIbOEzhkSsQMBPM8rvgmoxy33nffdik3bCq4B/R7kSMfKlFGfNCluPqkQr4BNfPGWCFrkbe+uyrxS5WV1PSK/d6JOeyAKYF1J7JbvDUd1NV50UGWnb93VhUIi9rK4HUm72WE974+KfTfxgTegM0Vbmmy5RDG3onoHgFhdDWCNadVq+bbrxeXfKP0Eriy+FuFI8eyC/IlPTvGsOVfhHat8JVb+mGnqVrlTzaFEuRpkzrjHnz+1253NjTEDAFD519wN313fqkHzEQ56Z1LOotOlcHsX3nuv1AjO3HFPj2/Z7dY5Lv5HwFyyuyOvP4GM82KRYd+OL1M1G7sOTFNUitd3iJrPEL1CkaklhwiN46xKvlZo0aJzyL9wcigy+/nh2/K69T1fxZ2ESBNBjgeON+r0VEcxJX4qFjYb7KC54596eW4JO0Jt1xaMnHX814K2VKOLk5/fednm7aqbzxo9O/d6tfpHSh7LQPxOjsh31vNG391u+UvJH+aGYMHwBoXp4vjcmYNOW/IvgKEXrtn02Kc5l2tAZohIXYK+s4FvKK2wuKq4/4z1P8H61qPmZDfVItNGYtFFuz7KWRwKTY8BjPzy2LbGBNoUSMEkgMHtlv8/4P+Vva5lGXTWslmqnDBketYRTm2vnhuQzfe1XLVlxKzcb+I1oWwTQTt2rPP+zmO3XLxFfPMBrHF+cFAQaaker6tRFRFJlMMKg+kze/Kz35fMa8HExz+l3HOiw4MKHxTOm/DUXSd2u+XpgJN5dN2VmflMfy9Wp+PpA3c02TIZ5XSs9595rz5T6YGZiWco1+b17p1OmGOiO2y47uZjf6xsw+mYuANc1bu8WKx4irrLpp5FXp2OxmVqSdloWJb4A8lfu/gC6ZtPAWYDzJ4wZmb7zje3jgRrPaNwMSKlBgJU+V7RKVK4/eE5k1/eQAUYvL+D5LpRp9TmE/Ef/feTJ03i70vrNz/OHyhspMY0iqqzccv6bbNHXL1xB8A9JdKMavXTLuBByjCww7LFw6c1bqUZwTOL/n3c30mcVSrKTwg5RgiUTTOozfKVwMr4u+J7BIPP+GEB1ZhSX96nFVtJTE0fNP/oDInoiYn5YJsAEtdsSjKN63mr1TGIyq8WTHz807Y9+5+vnuZ5jt2+zgu89tOEUdWezX0oc1BOmNof2nfuHAwHG32HSBMAK17vea88XeEd87Retx3nxQKnxkxUnIJdM+ZWEhRlCb2clRbqtXv/4APFYzNzPlFjOqC6cFC7pVVudfRzMPqLrHOtz50OgNoxg9otu72szCndB1ztE31LVTW3cK1v8uTJ3oG280BySMzFqg4zJk8ubP2bO7rjdz4SMI66KyuTnfXys6uBah+8czCCAwDVt4EOVvSAN0fG5uf5ttmto5KdUhNzy81SBnA9jeDGB2xWBoNHApsOnJUHnp/lnPSfm7mvP/2xUe2GMGT2uMf3ax3IocTAM5aPcsTX6O7Tlh3wk3p3smWIEWkLoGoX3XXm4nLTZwBwpHgGQKyw1sGdfX0AOOxqkCSzxz9Z4RPsw50Bbb9dd6DzHDojt6ONz1ZAUWuI9a1UOBqL4o+Ps4f9vlSApPjfJaSY2rNz+1urfyp+nmLtQwNPXzW1sjTRNIn6E/MjHGKZlcn9r5AKkF8go+ZkN1VPfm3ypZtCm8QoLVZ5c3C75X8eWEXaaKxgnT/+oB9x3MN+afCeSAXI/yhDFzSp4wv7vlKVLCMaUZUYqA/w44lTZoFG1EPvv/u0paMqe7iYZNGEF1ac2qP/ZoNNL9KChT+vFwefw7KTnmLPOAX2KJBcEVxF0hEyEQkmp9zHUQWdFpFYh3tOWzpyT8GRTGS98Jmeeq0O1zUe1eGwew6SYu8ZMev464y1l6iRUyQ+b60IYY1VWaOefuaGCyYOPLfi079SxNnnAAk9MuY2LFfjdwaE/nDrN3uWf/YuVK/B0QdCD9z+yT7nGxozBqEpPndQ6A99iqeUjxw5PsPzCt177+2zrTKZkjZkBDJnJ+X31ZbdeqtXFiUpaff+2pGi5tn3JpblFEUvlqi3d7tWqDZX1Q7i7fc+SWmqerlEvVLHHOwq2PFkUTi2KfTIs70rkylpQxn5Shky5JnBoSFj3h4y5LnrKhWqbllUbvf+2VEDHKh8DhfKBUho0qQqdyUMjRjT8M9/Hlc8x0nERKqSL49uHD78xdpjx471AUyaNMmpSCqkWmXwisjW0LCxTYrTG3kD1XdFrVOpTAkbKpKv0FokQ1WvVLHH7MmzqsqiUn9K2FFVueyNHaNHTwomr19Sz96UdXXzqS57upaHMqWaWKGhY3IJ68cIm0DeCqaljfQ81x+J7nwO1WxEjlfVI0RkGsoiRW91jHO2NVbw9G84cm3ogb5fhIY88wzKTYgsReQvoYdueyE0ZMzzqvo7I3K+Qh9UL8WYIag+gLKIAN1oVn+VfLuhh8LNKC0wMjD00G3Pl7IxNOZFRX8rIu+p6qWC/Nfvr9UxEt11D+g5Avep0rVimZ1Dd9sglyblH36477QKbQ6NGQp6o0ITQeYRkOtC9922bMiQZ3soOhjV+ZyOuCAAAAXaSURBVK7r3B2L2QcqKgtOqJ+/R3+GPDui2O7KyiXMzXtlh2eHA10Q7sLqoyLmAUU7VKQzdF/f7yvw4/aK8qn4ej7zH5D1oYf7dg2FxrwLfBMK9R0cGvLMMOBUghk9pbDgyqp8PxwoFdkS4SaFRqisVtUHC8Phq++7r/tmVOuBrAcSK+l2r9WwovWI6esodRxly5Ahz3ZWpS/Ct4DB2udCfxpTcm00wHaFTKzeBzpd0TMkwg18u2GEVX0e1doYHarWjg098uxdldh+iQjDgdxIZFd/VEVVT1fR+pXKlKSEfGU2i+iHSHy9BUKQKOeHhj6bo2pfSHx2XSxmiw+8KVsWe+VPabsrLJdq2FGgqj4s9wO11NG5lemsKH1F+VRxPa2q3jR06LN1QC8GvWvs2LE+VHqgXERhQaga1/KQpWzVtx1ARF6JLy2ngYhoKHT7BSKMAo4VWJyRnrn7LEBrn1A4VsQ89OCDfb9V1fg6cUfuFnhOwcWjkrP/dCOuPAKg6NGZtevfZ0S6ipgQyi1x/VrZkWh/Ji3wTHwdu+5enyHs3KNMSYSdldn88MO3TxVkQlxMHgw9dNsLEtHzFFxBkjPbd58BUqYsquVPKbtLl0t17VC0ISJDQw/0/aIynRWlryifSq+nyhKAcFSvVHAVzLr1sfMUbQjyRWbt+gOqcS0PWUoFiOPwNxH5VtVeg8M5rpG/AoQef/lIhXGoRvH5fjN4cPfiOf+qZIuI5zj2DQAksQw2PfANyYNTlKyKc5cXjafJyW+1treuH1W40qqdBFL1sQlGpktRJL5uWnTpPstU02bVeLAr+hyKg8iMEt+VKotq+VPa7lLlUl07BFlwTEO39K7yZXRWlb4UlZSNiCxOvO4iyZaFx80AIvr2Pvt+iFEqQGLpgV1+X/BchAAx3rRWjgJge8FfVPU4EflD6P4+c0qmEWSBqjoxTybEO4GJ5lc4cqQK8d07koVZLnOz+6IoAT755gFVvUGQURXJl0VVzkgYMW9/ZKpjMxBff4/2MsY9R9DicxnLlUU1/UlSrlyqa4eYR/r06VNq360KdJZLr6oVDPtXXDbq2Pnxr/UiRD4QkR2IXg2gPt87++r7oUbpJtb28JBwpGA9sFjRBla9XkOGjLlZVW8QYYMKTig05umRI8fv3vTN1TsE3lbVDt98u/FpVOIrDWO0ROP7a5nEir+KsI6TvCgG5QJB5gENgYqbRLtT+sF2FWR9RjDzXaSiZzplZEpSUr4Km7XMQIaIJs6BN35rvZDC45AYpSlXFnvhT4V2lymXvbcjMXVIK1zPUlJnRemHTJ7sK5tPpWWTeeQ8EVEFPyJfoCxUJSAi60J/6PNd9a7loUvpAKnlDpH4es54h1ZYrMq1AKrUV6vDFb29oGDH+cUXQY3f5wv0FpHVYBs6jvO8wGY8HYtyk4gssc2P+np3XppJor2sSi2J2dMTuacbo4NAcxTtiugjIoSTa9qLSW52Zhmv0AQjwxNNvoYJe5pUIVPShmL5KmyG4iaOZgLoUTJVhBmq9m3QjoLpBRRUVBZ75U9Juyspl2rYkbyeR5XQX6HOitKHunSJlM2nsrIJ3dl1O2h8x0yRBYjGb4Ia/7+Xvh/ylAqQ0KA+GzMzGzTHmKsc47QJPdT3WTJMLzFyh2Ocs30uWVL3yCMefrjvOxkZmQ8Yca4NuMy+//7f/US6aXtMQ98NDz5465JgMJglojdizB2uoxeFunSJUDtwtxjTR9MCs8lMv14cc5GeVG/aSSfVf0Vc9zT8vnseeuj2mcZwpmOcs0MP3f7HzNoN6pDmL7UDhmMCA43IICNcbkRuzAjWGguQWbv+78Thclz3o8pkStpQUr5Sm4GHH7ptsLhyls8XfBsg1Lfvzocf6nsWPt/puE6Hhx/+/QeVlcXe+FPSjsrKZW/t4KQGvcVxztO0wJTdGVSss8L0FeRTVdn4fentjUjXjLSMmRwl9xpxrsWRpwH2xvcUKVKkSJEiRYoUv0j+P1GPgO+VXwPOAAAAAElFTkSuQmCC">
+                       </a>
+               Serwis tymczasowo niedostępny</h1>
+               <p>Platfroma redakcyjna serwisu <a href="http://wolnelektury.pl/">wolnelektury.pl</a> jest
+               tymczasowo niedostępna z powodu prac administracyjnych.
+                       </p>
+                       <p>Prosimy o wyrozumiałość i ponowne odwiedziny.</p>
+               </div>
+               </div>
+    </body>
+</html>
diff --git a/redakcja/templates/admin/index.html b/redakcja/templates/admin/index.html
new file mode 100644 (file)
index 0000000..45de219
--- /dev/null
@@ -0,0 +1,83 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css" />{% endblock %}
+
+{% block coltype %}colMS{% endblock %}
+
+{% block bodyclass %}dashboard{% endblock %}
+
+{% block breadcrumbs %}{% endblock %}
+
+{% block content %}
+<div id="content-main">
+
+{% if app_list %}
+
+    {% include "filebrowser/append.html" %}
+
+    {% for app in app_list %}
+        <div class="module">
+        <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
+        <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
+        {% for model in app.models %}
+            <tr>
+            {% if model.perms.change %}
+                <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
+            {% else %}
+                <th scope="row">{{ model.name }}</th>
+            {% endif %}
+
+            {% if model.perms.add %}
+                <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
+            {% else %}
+                <td>&nbsp;</td>
+            {% endif %}
+
+            {% if model.perms.change %}
+                <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
+            {% else %}
+                <td>&nbsp;</td>
+            {% endif %}
+            </tr>
+        {% endfor %}
+        </table>
+        </div>
+    {% endfor %}
+{% else %}
+    <p>{% trans "You don't have permission to edit anything." %}</p>
+{% endif %}
+</div>
+{% endblock %}
+
+{% block sidebar %}
+<div id="content-related">
+    <div class="module" id="recent-actions-module">
+        <h2>{% trans 'Recent Actions' %}</h2>
+        <h3>{% trans 'My Actions' %}</h3>
+            {% load log %}
+            {% get_admin_log 10 as admin_log for_user user %}
+            {% if not admin_log %}
+            <p>{% trans 'None available' %}</p>
+            {% else %}
+            <ul class="actionlist">
+            {% for entry in admin_log %}
+            <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
+                {% if entry.is_deletion %}
+                    {{ entry.object_repr }}
+                {% else %}
+                    <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+                {% endif %}
+                <br/>
+                {% if entry.content_type %}
+                    <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
+                {% else %}
+                    <span class="mini quiet">{% trans 'Unknown content' %}</span>
+                {% endif %}
+            </li>
+            {% endfor %}
+            </ul>
+            {% endif %}
+    </div>
+</div>
+{% endblock %}
diff --git a/redakcja/templates/base.html b/redakcja/templates/base.html
new file mode 100644 (file)
index 0000000..ac728d0
--- /dev/null
@@ -0,0 +1,17 @@
+<!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=utf-8" />
+        <title>{% block title %}Platforma Redakcyjna{% block subtitle %}{% endblock subtitle %}{% endblock title%}</title>
+        {% block extrahead %}
+        {% endblock %}
+    </head>
+    <body id="{% block bodyid %}base{% endblock %}">
+       <div id="body-wrap">
+        <div id="content">{% block maincontent %} {% endblock %}</div>
+        </div>
+       <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> -->
+    {% block extrabody %}{% endblock %}
+    </body>
+</html>
diff --git a/redakcja/templates/registration/head_login.html b/redakcja/templates/registration/head_login.html
new file mode 100644 (file)
index 0000000..f051213
--- /dev/null
@@ -0,0 +1,11 @@
+{% load i18n %}
+
+{% if user.is_authenticated %}
+<span class="user_name">{{ user.username }}</span> |
+<a href='{% url logout %}'>{% trans "Log Out" %}</a>
+{% else %}
+{% url login as login_url %}
+{% ifnotequal login_url request.path %}
+    <a href='{{ login_url }}'>{% trans "Log In" %}</a>
+{% endifnotequal %}
+{% endif %}
diff --git a/redakcja/templates/registration/login.html b/redakcja/templates/registration/login.html
new file mode 100644 (file)
index 0000000..e4b0897
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block subtitle %} - Logowanie {% endblock subtitle %}
+
+{% block maincontent %}
+
+<div class="isection">
+<form method="POST" action="{% url django.contrib.auth.views.login %}">
+{{ form.as_p }}
+<p><input type="submit" value="Login" /></p>
+<input type="hidden" name="next" value="{{ next|urlencode }}" />
+</form>
+</div>
+
+{% endblock maincontent %}
diff --git a/redakcja/urls.py b/redakcja/urls.py
new file mode 100644 (file)
index 0000000..904ad44
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from django.conf.urls.defaults import *
+from django.contrib import admin
+from django.conf import settings
+
+admin.autodiscover()
+
+urlpatterns = patterns('',
+    # Auth
+    url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
+    url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
+
+    # Admin panel
+    (r'^admin/filebrowser/', include('filebrowser.urls')),
+    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+    (r'^admin/', include(admin.site.urls)),
+
+    # Static files (should be served by Apache)
+    url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
+        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
+    url(r'^%s(?P<path>.+)$' % settings.ADMIN_MEDIA_PREFIX[1:], 'django.views.static.serve',
+        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
+    url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
+        {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
+
+    url(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/documents/'}),
+    url(r'^documents/', include('wiki.urls')),
+)
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..d247c76
--- /dev/null
@@ -0,0 +1,20 @@
+## Python libraries
+lxml>=2.2
+mercurial>=1.3.1
+PyYAML>=3.0
+PIL>=1.1
+
+## Book conversion library
+git+git://github.com/fnp/librarian.git@master#egg=librarian
+
+## Django 
+Django>=1.1.1,<1.2
+sorl-thumbnail>=3.2
+django-maintenancemode>=0.9
+
+# migrations
+south>=0.6
+
+## Debugging utils, uncomment this if you want tests
+# django-nose>=0.0.3
+# django-debug-toolbar>=0.8
\ No newline at end of file
diff --git a/setup.py b/setup.py
deleted file mode 100644 (file)
index 199329e..0000000
--- a/setup.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import os
-from distutils.core import setup
-
-RESOURCE_PATHS = ('templates', 'static', 'media', 'locale', 'config')
-
-
-def is_package(path):
-    return os.path.isdir(path) \
-       and os.path.isfile(os.path.join(path, '__init__.py'))
-
-
-def find_packages(path, base=""):
-    """ Find all packages in path """
-    packages = {}
-    for item in os.listdir(path):
-        dir = os.path.join(path, item)
-        if is_package(dir):
-            if base:
-                module_name = "%(base)s.%(item)s" % vars()
-            else:
-                module_name = item
-            packages[module_name] = dir
-            packages.update(find_packages(dir, module_name))
-    return packages
-
-
-def files_from(*paths, **kwargs):
-    base = kwargs.pop('base')
-
-    def generator():
-        for path in paths:
-            path = os.path.join(base, path)
-            if not os.path.isdir(path) or is_package(path):
-                continue
-
-            for dir, _, files in os.walk(path):
-                for file in files:
-                    yield os.path.relpath(os.path.join(dir, file), base)
-
-    return list(generator())
-
-
-def django_setup(project, apps=[], apps_dir='apps', package_dir={}, packages=[], package_data={}, **kwargs):
-
-    # directories
-    extra_dirs = dict((app, os.path.join(apps_dir, app)) for app in apps)
-    extra_dirs[project] = project
-    package_dir.update(extra_dirs)
-
-    # applications
-    packages.extend(apps)
-    # with all subpackages
-    for app in apps:
-        packages.extend(find_packages(os.path.join(apps_dir, app), base=app))
-    # and the project
-    packages.append(project)
-
-    # extra data
-    extra_data = {}
-    for app in apps:
-        extra_data[app] = files_from(*RESOURCE_PATHS, base=os.path.join(apps_dir, app))
-    extra_data[project] = files_from(*RESOURCE_PATHS, base=project)
-    package_data.update(extra_data)
-
-    return setup(
-                package_dir=package_dir,
-                packages=packages,
-                package_data=package_data, **kwargs)
-
-
-#
-# The real stuff :)
-#
-django_setup(
-    name='fnp-redakcja',
-    version='1.1',
-    description='IDE for developing books.',
-    author="Fundacja Nowoczesna Polska",
-    author_email='fundacja@nowoczesnapolska.org.pl',
-    license="GNU Affero General Public License 3",
-    maintainer='Łukasz Rekucki',
-    maintainer_email='lrekucki@gmail.com',
-    url='http://github.com/fnp/redakcja',
-    package_dir={'': 'lib'},
-    py_modules=[
-        'wlapi',
-        'vstorage',
-    ],
-    scripts=[
-        'scripts/crop.py',
-        'scripts/imgconv.py',
-    ],
-    # django applications
-    project='platforma',
-    apps_dir='apps',
-    apps=[
-        'compress',
-        'django_cas',
-        'filebrowser',
-        'toolbar',
-        'wiki',
-    ],
-    requires=[
-        "librarian (>=1.3)",
-        "Django (>=1.1.1,<1.2)",
-    ])