aboutsummaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/Sylvia/icon/add_tag.pngbin0 -> 193 bytes
-rw-r--r--themes/Sylvia/icon/caddie_add.pngbin0 -> 679 bytes
-rw-r--r--themes/Sylvia/icon/calendar.pngbin0 -> 798 bytes
-rw-r--r--themes/Sylvia/icon/calendar_created.pngbin0 -> 1155 bytes
-rw-r--r--themes/Sylvia/icon/category_edit.pngbin0 -> 1312 bytes
-rw-r--r--themes/Sylvia/icon/datepicker.pngbin0 -> 430 bytes
-rw-r--r--themes/Sylvia/icon/dec_period.pngbin0 -> 637 bytes
-rw-r--r--themes/Sylvia/icon/dec_period_unactive.pngbin0 -> 1002 bytes
-rw-r--r--themes/Sylvia/icon/del_favorite.pngbin0 -> 872 bytes
-rw-r--r--themes/Sylvia/icon/delete.pngbin0 -> 425 bytes
-rw-r--r--themes/Sylvia/icon/edit.pngbin0 -> 970 bytes
-rw-r--r--themes/Sylvia/icon/errors.pngbin0 -> 1224 bytes
-rw-r--r--themes/Sylvia/icon/exit.pngbin0 -> 816 bytes
-rw-r--r--themes/Sylvia/icon/favicon.icobin0 -> 1406 bytes
-rw-r--r--themes/Sylvia/icon/favorite.pngbin0 -> 901 bytes
-rw-r--r--themes/Sylvia/icon/first.pngbin0 -> 880 bytes
-rw-r--r--themes/Sylvia/icon/first_unactive.pngbin0 -> 893 bytes
-rw-r--r--themes/Sylvia/icon/flat.pngbin0 -> 462 bytes
-rw-r--r--themes/Sylvia/icon/help.pngbin0 -> 774 bytes
-rw-r--r--themes/Sylvia/icon/home.pngbin0 -> 726 bytes
-rw-r--r--themes/Sylvia/icon/inc_period.pngbin0 -> 635 bytes
-rw-r--r--themes/Sylvia/icon/inc_period_unactive.pngbin0 -> 987 bytes
-rw-r--r--themes/Sylvia/icon/index.php30
-rw-r--r--themes/Sylvia/icon/infos.pngbin0 -> 1349 bytes
-rw-r--r--themes/Sylvia/icon/last.pngbin0 -> 858 bytes
-rw-r--r--themes/Sylvia/icon/last_unactive.pngbin0 -> 857 bytes
-rw-r--r--themes/Sylvia/icon/left.pngbin0 -> 618 bytes
-rw-r--r--themes/Sylvia/icon/left_unactive.pngbin0 -> 604 bytes
-rw-r--r--themes/Sylvia/icon/lost_password.pngbin0 -> 1052 bytes
-rw-r--r--themes/Sylvia/icon/metadata.pngbin0 -> 1866 bytes
-rw-r--r--themes/Sylvia/icon/metadata_grey.pngbin0 -> 1764 bytes
-rw-r--r--themes/Sylvia/icon/mimetypes/avi.pngbin0 -> 3002 bytes
-rw-r--r--themes/Sylvia/icon/mimetypes/index.php30
-rw-r--r--themes/Sylvia/icon/mimetypes/mp3.pngbin0 -> 1350 bytes
-rw-r--r--themes/Sylvia/icon/mimetypes/mpg.pngbin0 -> 3041 bytes
-rw-r--r--themes/Sylvia/icon/mimetypes/ogg.pngbin0 -> 1312 bytes
-rw-r--r--themes/Sylvia/icon/mimetypes/zip.pngbin0 -> 1753 bytes
-rw-r--r--themes/Sylvia/icon/normal_mode.pngbin0 -> 677 bytes
-rw-r--r--themes/Sylvia/icon/note.pngbin0 -> 1332 bytes
-rw-r--r--themes/Sylvia/icon/pause.pngbin0 -> 577 bytes
-rw-r--r--themes/Sylvia/icon/pause_selected.pngbin0 -> 577 bytes
-rw-r--r--themes/Sylvia/icon/pause_unactive.pngbin0 -> 579 bytes
-rw-r--r--themes/Sylvia/icon/play.pngbin0 -> 367 bytes
-rw-r--r--themes/Sylvia/icon/preferences.pngbin0 -> 768 bytes
-rw-r--r--themes/Sylvia/icon/rating-stars.gifbin0 -> 171 bytes
-rw-r--r--themes/Sylvia/icon/rating-stars.pngbin0 -> 521 bytes
-rw-r--r--themes/Sylvia/icon/recent.pngbin0 -> 703 bytes
-rw-r--r--themes/Sylvia/icon/recent_by_child.pngbin0 -> 777 bytes
-rw-r--r--themes/Sylvia/icon/recent_s.pngbin0 -> 956 bytes
-rw-r--r--themes/Sylvia/icon/recent_s_by_child.pngbin0 -> 1203 bytes
-rw-r--r--themes/Sylvia/icon/register.pngbin0 -> 802 bytes
-rw-r--r--themes/Sylvia/icon/remove_s.pngbin0 -> 383 bytes
-rw-r--r--themes/Sylvia/icon/representative.pngbin0 -> 1055 bytes
-rw-r--r--themes/Sylvia/icon/right.pngbin0 -> 612 bytes
-rw-r--r--themes/Sylvia/icon/right_unactive.pngbin0 -> 611 bytes
-rw-r--r--themes/Sylvia/icon/save.pngbin0 -> 771 bytes
-rw-r--r--themes/Sylvia/icon/save_selected.pngbin0 -> 700 bytes
-rw-r--r--themes/Sylvia/icon/search_rules.pngbin0 -> 960 bytes
-rw-r--r--themes/Sylvia/icon/slideshow.pngbin0 -> 803 bytes
-rw-r--r--themes/Sylvia/icon/slideshow_selected.pngbin0 -> 829 bytes
-rw-r--r--themes/Sylvia/icon/start_filter.pngbin0 -> 1218 bytes
-rw-r--r--themes/Sylvia/icon/start_repeat.pngbin0 -> 954 bytes
-rw-r--r--themes/Sylvia/icon/start_repeat_grey.pngbin0 -> 943 bytes
-rw-r--r--themes/Sylvia/icon/start_slideshow.pngbin0 -> 829 bytes
-rw-r--r--themes/Sylvia/icon/stop_filter.pngbin0 -> 852 bytes
-rw-r--r--themes/Sylvia/icon/stop_repeat.pngbin0 -> 987 bytes
-rw-r--r--themes/Sylvia/icon/stop_repeat_pink.pngbin0 -> 941 bytes
-rw-r--r--themes/Sylvia/icon/stop_selected.pngbin0 -> 559 bytes
-rw-r--r--themes/Sylvia/icon/stop_slideshow.pngbin0 -> 454 bytes
-rw-r--r--themes/Sylvia/icon/stop_unactive.pngbin0 -> 561 bytes
-rw-r--r--themes/Sylvia/icon/tag_cloud.pngbin0 -> 856 bytes
-rw-r--r--themes/Sylvia/icon/tag_cloud_grey.pngbin0 -> 827 bytes
-rw-r--r--themes/Sylvia/icon/tag_letters.pngbin0 -> 1324 bytes
-rw-r--r--themes/Sylvia/icon/tag_letters_grey.pngbin0 -> 1005 bytes
-rw-r--r--themes/Sylvia/icon/tag_letters_pink.pngbin0 -> 1007 bytes
-rw-r--r--themes/Sylvia/icon/up.pngbin0 -> 606 bytes
-rw-r--r--themes/Sylvia/icon/validate_s.pngbin0 -> 492 bytes
-rw-r--r--themes/Sylvia/images/bottom-left-bg.jpgbin0 -> 9014 bytes
-rw-r--r--themes/Sylvia/images/cat_bottom-left.gifbin0 -> 1548 bytes
-rw-r--r--themes/Sylvia/images/cat_bottom-right.gifbin0 -> 2209 bytes
-rw-r--r--themes/Sylvia/images/cat_top-left.gifbin0 -> 1006 bytes
-rw-r--r--themes/Sylvia/images/cat_top-right.gifbin0 -> 3449 bytes
-rw-r--r--themes/Sylvia/images/fillet.gifbin0 -> 809 bytes
-rw-r--r--themes/Sylvia/images/header_msgs-bg.gifbin0 -> 44 bytes
-rw-r--r--themes/Sylvia/images/menuBox_bottom.gifbin0 -> 1347 bytes
-rw-r--r--themes/Sylvia/images/menuBox_sides.gifbin0 -> 838 bytes
-rw-r--r--themes/Sylvia/images/menuBox_top.gifbin0 -> 1320 bytes
-rw-r--r--themes/Sylvia/images/menuId_bottom.gifbin0 -> 831 bytes
-rw-r--r--themes/Sylvia/images/menuId_sides.gifbin0 -> 79 bytes
-rw-r--r--themes/Sylvia/images/menuId_top.gifbin0 -> 894 bytes
-rw-r--r--themes/Sylvia/images/top-left-bg.jpgbin0 -> 17092 bytes
-rw-r--r--themes/Sylvia/images/transparent.gifbin0 -> 85 bytes
-rw-r--r--themes/Sylvia/index.php30
-rw-r--r--themes/Sylvia/local_head.tpl3
-rw-r--r--themes/Sylvia/mail-css.tpl15
-rw-r--r--themes/Sylvia/theme-ie.css12
-rw-r--r--themes/Sylvia/theme.css429
-rw-r--r--themes/Sylvia/themeconf.inc.php8
-rw-r--r--themes/clear/index.php30
-rw-r--r--themes/clear/mail-css.tpl12
-rw-r--r--themes/clear/theme.css77
-rw-r--r--themes/clear/themeconf.inc.php6
-rw-r--r--themes/dark/images/index.php30
-rw-r--r--themes/dark/images/tableh1_bg.pngbin0 -> 271 bytes
-rw-r--r--themes/dark/images/tableh2_bg.pngbin0 -> 307 bytes
-rw-r--r--themes/dark/index.php30
-rw-r--r--themes/dark/mail-css.tpl12
-rw-r--r--themes/dark/theme.css76
-rw-r--r--themes/dark/themeconf.inc.php6
-rw-r--r--themes/default/content.css197
-rw-r--r--themes/default/default-colors.css109
-rw-r--r--themes/default/default-layout.css314
-rw-r--r--themes/default/fix-ie5-ie6.css42
-rw-r--r--themes/default/fix-ie7.css21
-rw-r--r--themes/default/fix-khtml.css17
-rw-r--r--themes/default/icon/add_tag.pngbin0 -> 59 bytes
-rw-r--r--themes/default/icon/admin/errors.pngbin0 -> 3249 bytes
-rw-r--r--themes/default/icon/admin/index.php30
-rw-r--r--themes/default/icon/admin/infos.pngbin0 -> 2250 bytes
-rw-r--r--themes/default/icon/caddie_add.pngbin0 -> 1186 bytes
-rw-r--r--themes/default/icon/calendar.pngbin0 -> 844 bytes
-rw-r--r--themes/default/icon/calendar_created.pngbin0 -> 1230 bytes
-rw-r--r--themes/default/icon/category_children.pngbin0 -> 1554 bytes
-rw-r--r--themes/default/icon/category_edit.pngbin0 -> 1606 bytes
-rw-r--r--themes/default/icon/category_representant_random.pngbin0 -> 3171 bytes
-rw-r--r--themes/default/icon/datepicker.pngbin0 -> 1047 bytes
-rw-r--r--themes/default/icon/dec_period.pngbin0 -> 1230 bytes
-rw-r--r--themes/default/icon/dec_period_unactive.pngbin0 -> 1042 bytes
-rw-r--r--themes/default/icon/del_all_favorites.pngbin0 -> 1424 bytes
-rw-r--r--themes/default/icon/del_favorite.pngbin0 -> 1424 bytes
-rw-r--r--themes/default/icon/delete.pngbin0 -> 778 bytes
-rw-r--r--themes/default/icon/edit.pngbin0 -> 970 bytes
-rw-r--r--themes/default/icon/exit.pngbin0 -> 1432 bytes
-rw-r--r--themes/default/icon/favicon.icobin0 -> 1406 bytes
-rw-r--r--themes/default/icon/favorite.pngbin0 -> 1457 bytes
-rw-r--r--themes/default/icon/first.pngbin0 -> 1645 bytes
-rw-r--r--themes/default/icon/first_unactive.pngbin0 -> 1573 bytes
-rw-r--r--themes/default/icon/flat.pngbin0 -> 754 bytes
-rw-r--r--themes/default/icon/help.pngbin0 -> 1994 bytes
-rw-r--r--themes/default/icon/home.pngbin0 -> 1591 bytes
-rw-r--r--themes/default/icon/inc_period.pngbin0 -> 1209 bytes
-rw-r--r--themes/default/icon/inc_period_unactive.pngbin0 -> 1039 bytes
-rw-r--r--themes/default/icon/index.php30
-rw-r--r--themes/default/icon/last.pngbin0 -> 1642 bytes
-rw-r--r--themes/default/icon/last_unactive.pngbin0 -> 1556 bytes
-rw-r--r--themes/default/icon/left.pngbin0 -> 1644 bytes
-rw-r--r--themes/default/icon/left_unactive.pngbin0 -> 1574 bytes
-rw-r--r--themes/default/icon/lost_password.pngbin0 -> 1717 bytes
-rw-r--r--themes/default/icon/metadata.pngbin0 -> 1520 bytes
-rw-r--r--themes/default/icon/mimetypes/avi.pngbin0 -> 4284 bytes
-rw-r--r--themes/default/icon/mimetypes/index.php30
-rw-r--r--themes/default/icon/mimetypes/mp3.pngbin0 -> 3902 bytes
-rw-r--r--themes/default/icon/mimetypes/mpg.pngbin0 -> 4271 bytes
-rw-r--r--themes/default/icon/mimetypes/ogg.pngbin0 -> 4063 bytes
-rw-r--r--themes/default/icon/mimetypes/zip.pngbin0 -> 3721 bytes
-rw-r--r--themes/default/icon/normal_mode.pngbin0 -> 360 bytes
-rw-r--r--themes/default/icon/note.pngbin0 -> 1862 bytes
-rw-r--r--themes/default/icon/pause.pngbin0 -> 1597 bytes
-rw-r--r--themes/default/icon/play.pngbin0 -> 1568 bytes
-rw-r--r--themes/default/icon/preferences.pngbin0 -> 1606 bytes
-rw-r--r--themes/default/icon/rating-stars.gifbin0 -> 251 bytes
-rw-r--r--themes/default/icon/recent.pngbin0 -> 757 bytes
-rw-r--r--themes/default/icon/recent_by_child.pngbin0 -> 738 bytes
-rw-r--r--themes/default/icon/register.pngbin0 -> 1445 bytes
-rw-r--r--themes/default/icon/remove_s.pngbin0 -> 451 bytes
-rw-r--r--themes/default/icon/representative.pngbin0 -> 1556 bytes
-rw-r--r--themes/default/icon/right.pngbin0 -> 1661 bytes
-rw-r--r--themes/default/icon/right_unactive.pngbin0 -> 1556 bytes
-rw-r--r--themes/default/icon/save.pngbin0 -> 961 bytes
-rw-r--r--themes/default/icon/search_rules.pngbin0 -> 1509 bytes
-rw-r--r--themes/default/icon/start_filter.pngbin0 -> 1064 bytes
-rw-r--r--themes/default/icon/start_repeat.pngbin0 -> 1691 bytes
-rw-r--r--themes/default/icon/start_slideshow.pngbin0 -> 1344 bytes
-rw-r--r--themes/default/icon/stop_filter.pngbin0 -> 1083 bytes
-rw-r--r--themes/default/icon/stop_repeat.pngbin0 -> 1683 bytes
-rw-r--r--themes/default/icon/stop_slideshow.pngbin0 -> 1149 bytes
-rw-r--r--themes/default/icon/tag_cloud.pngbin0 -> 1165 bytes
-rw-r--r--themes/default/icon/tag_letters.pngbin0 -> 882 bytes
-rw-r--r--themes/default/icon/up.pngbin0 -> 1641 bytes
-rw-r--r--themes/default/icon/validate_s.pngbin0 -> 315 bytes
-rw-r--r--themes/default/index.php30
-rw-r--r--themes/default/js/datepicker.js191
-rw-r--r--themes/default/js/jquery.js6078
-rw-r--r--themes/default/js/jquery.packed.js1
-rw-r--r--themes/default/js/jquery.tablednd.js382
-rw-r--r--themes/default/js/plugins/jquery.autogrow-textarea.js47
-rw-r--r--themes/default/js/plugins/jquery.cluetip.js543
-rw-r--r--themes/default/js/plugins/jquery.cluetip.packed.js1
-rw-r--r--themes/default/js/plugins/jquery.fcbkcomplete.js588
-rw-r--r--themes/default/js/plugins/jquery.tipTip.minified.js27
-rw-r--r--themes/default/js/pngfix.js37
-rw-r--r--themes/default/js/rating.js100
-rw-r--r--themes/default/js/scripts.js188
-rw-r--r--themes/default/js/ui/effects.blind.js49
-rw-r--r--themes/default/js/ui/effects.bounce.js78
-rw-r--r--themes/default/js/ui/effects.clip.js54
-rw-r--r--themes/default/js/ui/effects.core.js545
-rw-r--r--themes/default/js/ui/effects.drop.js50
-rw-r--r--themes/default/js/ui/effects.explode.js79
-rw-r--r--themes/default/js/ui/effects.fold.js56
-rw-r--r--themes/default/js/ui/effects.highlight.js48
-rw-r--r--themes/default/js/ui/effects.pulsate.js56
-rw-r--r--themes/default/js/ui/effects.scale.js180
-rw-r--r--themes/default/js/ui/effects.shake.js57
-rw-r--r--themes/default/js/ui/effects.slide.js50
-rw-r--r--themes/default/js/ui/effects.transfer.js45
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ar.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-bg.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ca.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-cs.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-da.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-de.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-es.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-fi.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-fr.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-he.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-hu.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-hy.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-id.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-is.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-it.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ja.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ko.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-lt.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-lv.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-nl.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-no.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-pl.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-pt-BR.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ro.js22
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ru.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-sk.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-sv.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-th.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-tr.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-uk.js25
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-zh-CN.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-zh-TW.js19
-rw-r--r--themes/default/js/ui/jquery.ui.all.js298
-rw-r--r--themes/default/js/ui/minified/effects.blind.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.bounce.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.clip.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.core.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.drop.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.explode.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.fold.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.highlight.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.pulsate.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.scale.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.shake.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.slide.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.transfer.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.accordion.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.core.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.datepicker.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.dialog.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.draggable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.droppable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.resizable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.selectable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.slider.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.sortable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.tabs.min.js1
-rw-r--r--themes/default/js/ui/packed/effects.blind.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.bounce.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.clip.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.core.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.drop.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.explode.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.fold.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.highlight.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.pulsate.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.scale.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.shake.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.slide.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.transfer.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.accordion.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.core.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.datepicker.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.dialog.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.draggable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.droppable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.resizable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.selectable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.slider.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.sortable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.tabs.packed.js1
-rw-r--r--themes/default/js/ui/theme/ui.datepicker.css62
-rw-r--r--themes/default/js/ui/ui.accordion.js477
-rw-r--r--themes/default/js/ui/ui.core.js519
-rw-r--r--themes/default/js/ui/ui.datepicker.js1636
-rw-r--r--themes/default/js/ui/ui.dialog.js671
-rw-r--r--themes/default/js/ui/ui.draggable.js766
-rw-r--r--themes/default/js/ui/ui.droppable.js282
-rw-r--r--themes/default/js/ui/ui.resizable.js800
-rw-r--r--themes/default/js/ui/ui.selectable.js257
-rw-r--r--themes/default/js/ui/ui.slider.js558
-rw-r--r--themes/default/js/ui/ui.sortable.js1019
-rw-r--r--themes/default/js/ui/ui.tabs.js685
-rw-r--r--themes/default/layout.css16
-rw-r--r--themes/default/local_head.tpl12
-rw-r--r--themes/default/mail/index.php30
-rw-r--r--themes/default/mail/text/html/images/footer-bg.jpgbin0 -> 9014 bytes
-rw-r--r--themes/default/mail/text/html/images/footer-bg.pngbin0 -> 15656 bytes
-rw-r--r--themes/default/mail/text/html/images/header-bg.pngbin0 -> 30525 bytes
-rw-r--r--themes/default/mail/text/html/images/index.php30
-rw-r--r--themes/default/mail/text/html/images/mailbody-bg.pngbin0 -> 924 bytes
-rw-r--r--themes/default/mail/text/html/index.php30
-rw-r--r--themes/default/mail/text/index.php30
-rw-r--r--themes/default/mail/text/plain/index.php30
-rw-r--r--themes/default/menubar.css87
-rw-r--r--themes/default/not-ie.css8
-rw-r--r--themes/default/picture.css102
-rw-r--r--themes/default/print.css14
-rw-r--r--themes/default/template/about.tpl18
-rw-r--r--themes/default/template/comment_list.tpl58
-rw-r--r--themes/default/template/comments.tpl76
-rw-r--r--themes/default/template/footer.tpl35
-rw-r--r--themes/default/template/header.tpl73
-rw-r--r--themes/default/template/identification.tpl71
-rw-r--r--themes/default/template/include/autosize.inc.tpl13
-rw-r--r--themes/default/template/include/datepicker.inc.tpl24
-rw-r--r--themes/default/template/include/resize.inc.tpl22
-rw-r--r--themes/default/template/index.tpl116
-rw-r--r--themes/default/template/mail/index.php30
-rw-r--r--themes/default/template/mail/text/html/cat_group_info.tpl8
-rw-r--r--themes/default/template/mail/text/html/footer.tpl22
-rw-r--r--themes/default/template/mail/text/html/global-mail-css.tpl11
-rw-r--r--themes/default/template/mail/text/html/header.tpl18
-rw-r--r--themes/default/template/mail/text/html/index.php30
-rw-r--r--themes/default/template/mail/text/html/notification_by_mail.tpl56
-rw-r--r--themes/default/template/mail/text/index.php30
-rw-r--r--themes/default/template/mail/text/plain/cat_group_info.tpl8
-rw-r--r--themes/default/template/mail/text/plain/footer.tpl3
-rw-r--r--themes/default/template/mail/text/plain/header.tpl5
-rw-r--r--themes/default/template/mail/text/plain/index.php30
-rw-r--r--themes/default/template/mail/text/plain/notification_by_mail.tpl41
-rw-r--r--themes/default/template/mainpage_categories.tpl31
-rw-r--r--themes/default/template/menubar.tpl13
-rw-r--r--themes/default/template/menubar_categories.tpl39
-rw-r--r--themes/default/template/menubar_identification.tpl64
-rw-r--r--themes/default/template/menubar_links.tpl15
-rw-r--r--themes/default/template/menubar_menu.tpl20
-rw-r--r--themes/default/template/menubar_specials.tpl9
-rw-r--r--themes/default/template/menubar_tags.tpl17
-rw-r--r--themes/default/template/month_calendar.tpl86
-rw-r--r--themes/default/template/navigation_bar.tpl28
-rw-r--r--themes/default/template/nbm.tpl30
-rw-r--r--themes/default/template/notification.tpl24
-rw-r--r--themes/default/template/password.tpl53
-rw-r--r--themes/default/template/picture.tpl280
-rw-r--r--themes/default/template/picture_content.tpl11
-rw-r--r--themes/default/template/picture_nav_buttons.tpl102
-rw-r--r--themes/default/template/profile.tpl21
-rw-r--r--themes/default/template/profile_content.tpl109
-rw-r--r--themes/default/template/redirect.tpl13
-rw-r--r--themes/default/template/register.tpl68
-rw-r--r--themes/default/template/search.tpl146
-rw-r--r--themes/default/template/search_rules.tpl57
-rw-r--r--themes/default/template/slideshow.tpl22
-rw-r--r--themes/default/template/tags.tpl54
-rw-r--r--themes/default/template/thumbnails.tpl37
-rw-r--r--themes/default/template/upload.tpl114
-rw-r--r--themes/default/theme.css12
-rw-r--r--themes/default/themeconf.inc.php7
-rw-r--r--themes/default/thumbnails.css36
-rw-r--r--themes/index.php30
-rw-r--r--themes/p0w0/images/button-bg.pngbin0 -> 233 bytes
-rw-r--r--themes/p0w0/images/index.php30
-rw-r--r--themes/p0w0/index.php30
-rw-r--r--themes/p0w0/mail-css.tpl11
-rw-r--r--themes/p0w0/theme.css247
-rw-r--r--themes/p0w0/themeconf.inc.php6
-rw-r--r--themes/wipi/images/index.php30
-rw-r--r--themes/wipi/images/tableh1_bg.pngbin0 -> 142 bytes
-rw-r--r--themes/wipi/images/tableh2_bg.pngbin0 -> 141 bytes
-rw-r--r--themes/wipi/index.php30
-rw-r--r--themes/wipi/mail-css.tpl18
-rw-r--r--themes/wipi/theme.css273
-rw-r--r--themes/wipi/themeconf.inc.php11
380 files changed, 23305 insertions, 0 deletions
diff --git a/themes/Sylvia/icon/add_tag.png b/themes/Sylvia/icon/add_tag.png
new file mode 100644
index 000000000..66042aadf
--- /dev/null
+++ b/themes/Sylvia/icon/add_tag.png
Binary files differ
diff --git a/themes/Sylvia/icon/caddie_add.png b/themes/Sylvia/icon/caddie_add.png
new file mode 100644
index 000000000..14dfc5684
--- /dev/null
+++ b/themes/Sylvia/icon/caddie_add.png
Binary files differ
diff --git a/themes/Sylvia/icon/calendar.png b/themes/Sylvia/icon/calendar.png
new file mode 100644
index 000000000..0044c1e93
--- /dev/null
+++ b/themes/Sylvia/icon/calendar.png
Binary files differ
diff --git a/themes/Sylvia/icon/calendar_created.png b/themes/Sylvia/icon/calendar_created.png
new file mode 100644
index 000000000..607fc0a4a
--- /dev/null
+++ b/themes/Sylvia/icon/calendar_created.png
Binary files differ
diff --git a/themes/Sylvia/icon/category_edit.png b/themes/Sylvia/icon/category_edit.png
new file mode 100644
index 000000000..3ace19daf
--- /dev/null
+++ b/themes/Sylvia/icon/category_edit.png
Binary files differ
diff --git a/themes/Sylvia/icon/datepicker.png b/themes/Sylvia/icon/datepicker.png
new file mode 100644
index 000000000..3d0e015f6
--- /dev/null
+++ b/themes/Sylvia/icon/datepicker.png
Binary files differ
diff --git a/themes/Sylvia/icon/dec_period.png b/themes/Sylvia/icon/dec_period.png
new file mode 100644
index 000000000..6a9d2bfa7
--- /dev/null
+++ b/themes/Sylvia/icon/dec_period.png
Binary files differ
diff --git a/themes/Sylvia/icon/dec_period_unactive.png b/themes/Sylvia/icon/dec_period_unactive.png
new file mode 100644
index 000000000..5cb58ba8e
--- /dev/null
+++ b/themes/Sylvia/icon/dec_period_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/del_favorite.png b/themes/Sylvia/icon/del_favorite.png
new file mode 100644
index 000000000..bea4720cf
--- /dev/null
+++ b/themes/Sylvia/icon/del_favorite.png
Binary files differ
diff --git a/themes/Sylvia/icon/delete.png b/themes/Sylvia/icon/delete.png
new file mode 100644
index 000000000..285e53e19
--- /dev/null
+++ b/themes/Sylvia/icon/delete.png
Binary files differ
diff --git a/themes/Sylvia/icon/edit.png b/themes/Sylvia/icon/edit.png
new file mode 100644
index 000000000..9c755cda1
--- /dev/null
+++ b/themes/Sylvia/icon/edit.png
Binary files differ
diff --git a/themes/Sylvia/icon/errors.png b/themes/Sylvia/icon/errors.png
new file mode 100644
index 000000000..e26d8c6e5
--- /dev/null
+++ b/themes/Sylvia/icon/errors.png
Binary files differ
diff --git a/themes/Sylvia/icon/exit.png b/themes/Sylvia/icon/exit.png
new file mode 100644
index 000000000..685cc44b5
--- /dev/null
+++ b/themes/Sylvia/icon/exit.png
Binary files differ
diff --git a/themes/Sylvia/icon/favicon.ico b/themes/Sylvia/icon/favicon.ico
new file mode 100644
index 000000000..d7a1d89fd
--- /dev/null
+++ b/themes/Sylvia/icon/favicon.ico
Binary files differ
diff --git a/themes/Sylvia/icon/favorite.png b/themes/Sylvia/icon/favorite.png
new file mode 100644
index 000000000..2caa31687
--- /dev/null
+++ b/themes/Sylvia/icon/favorite.png
Binary files differ
diff --git a/themes/Sylvia/icon/first.png b/themes/Sylvia/icon/first.png
new file mode 100644
index 000000000..de15054a1
--- /dev/null
+++ b/themes/Sylvia/icon/first.png
Binary files differ
diff --git a/themes/Sylvia/icon/first_unactive.png b/themes/Sylvia/icon/first_unactive.png
new file mode 100644
index 000000000..2eca53a3c
--- /dev/null
+++ b/themes/Sylvia/icon/first_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/flat.png b/themes/Sylvia/icon/flat.png
new file mode 100644
index 000000000..291156950
--- /dev/null
+++ b/themes/Sylvia/icon/flat.png
Binary files differ
diff --git a/themes/Sylvia/icon/help.png b/themes/Sylvia/icon/help.png
new file mode 100644
index 000000000..cd1d20919
--- /dev/null
+++ b/themes/Sylvia/icon/help.png
Binary files differ
diff --git a/themes/Sylvia/icon/home.png b/themes/Sylvia/icon/home.png
new file mode 100644
index 000000000..81b6bddb7
--- /dev/null
+++ b/themes/Sylvia/icon/home.png
Binary files differ
diff --git a/themes/Sylvia/icon/inc_period.png b/themes/Sylvia/icon/inc_period.png
new file mode 100644
index 000000000..72860d6db
--- /dev/null
+++ b/themes/Sylvia/icon/inc_period.png
Binary files differ
diff --git a/themes/Sylvia/icon/inc_period_unactive.png b/themes/Sylvia/icon/inc_period_unactive.png
new file mode 100644
index 000000000..f28f986c2
--- /dev/null
+++ b/themes/Sylvia/icon/inc_period_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/index.php b/themes/Sylvia/icon/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/Sylvia/icon/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/Sylvia/icon/infos.png b/themes/Sylvia/icon/infos.png
new file mode 100644
index 000000000..00695cb8f
--- /dev/null
+++ b/themes/Sylvia/icon/infos.png
Binary files differ
diff --git a/themes/Sylvia/icon/last.png b/themes/Sylvia/icon/last.png
new file mode 100644
index 000000000..89ec3f8da
--- /dev/null
+++ b/themes/Sylvia/icon/last.png
Binary files differ
diff --git a/themes/Sylvia/icon/last_unactive.png b/themes/Sylvia/icon/last_unactive.png
new file mode 100644
index 000000000..76f47f5b0
--- /dev/null
+++ b/themes/Sylvia/icon/last_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/left.png b/themes/Sylvia/icon/left.png
new file mode 100644
index 000000000..2d2ff0b08
--- /dev/null
+++ b/themes/Sylvia/icon/left.png
Binary files differ
diff --git a/themes/Sylvia/icon/left_unactive.png b/themes/Sylvia/icon/left_unactive.png
new file mode 100644
index 000000000..0b5abd707
--- /dev/null
+++ b/themes/Sylvia/icon/left_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/lost_password.png b/themes/Sylvia/icon/lost_password.png
new file mode 100644
index 000000000..012ba4b28
--- /dev/null
+++ b/themes/Sylvia/icon/lost_password.png
Binary files differ
diff --git a/themes/Sylvia/icon/metadata.png b/themes/Sylvia/icon/metadata.png
new file mode 100644
index 000000000..25da864c3
--- /dev/null
+++ b/themes/Sylvia/icon/metadata.png
Binary files differ
diff --git a/themes/Sylvia/icon/metadata_grey.png b/themes/Sylvia/icon/metadata_grey.png
new file mode 100644
index 000000000..9463f1980
--- /dev/null
+++ b/themes/Sylvia/icon/metadata_grey.png
Binary files differ
diff --git a/themes/Sylvia/icon/mimetypes/avi.png b/themes/Sylvia/icon/mimetypes/avi.png
new file mode 100644
index 000000000..b5dde0869
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/avi.png
Binary files differ
diff --git a/themes/Sylvia/icon/mimetypes/index.php b/themes/Sylvia/icon/mimetypes/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/Sylvia/icon/mimetypes/mp3.png b/themes/Sylvia/icon/mimetypes/mp3.png
new file mode 100644
index 000000000..cb1288596
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/mp3.png
Binary files differ
diff --git a/themes/Sylvia/icon/mimetypes/mpg.png b/themes/Sylvia/icon/mimetypes/mpg.png
new file mode 100644
index 000000000..4dc09c28b
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/mpg.png
Binary files differ
diff --git a/themes/Sylvia/icon/mimetypes/ogg.png b/themes/Sylvia/icon/mimetypes/ogg.png
new file mode 100644
index 000000000..978b235f9
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/ogg.png
Binary files differ
diff --git a/themes/Sylvia/icon/mimetypes/zip.png b/themes/Sylvia/icon/mimetypes/zip.png
new file mode 100644
index 000000000..7d76f9a60
--- /dev/null
+++ b/themes/Sylvia/icon/mimetypes/zip.png
Binary files differ
diff --git a/themes/Sylvia/icon/normal_mode.png b/themes/Sylvia/icon/normal_mode.png
new file mode 100644
index 000000000..a141c5523
--- /dev/null
+++ b/themes/Sylvia/icon/normal_mode.png
Binary files differ
diff --git a/themes/Sylvia/icon/note.png b/themes/Sylvia/icon/note.png
new file mode 100644
index 000000000..9ef1af537
--- /dev/null
+++ b/themes/Sylvia/icon/note.png
Binary files differ
diff --git a/themes/Sylvia/icon/pause.png b/themes/Sylvia/icon/pause.png
new file mode 100644
index 000000000..2bb742f24
--- /dev/null
+++ b/themes/Sylvia/icon/pause.png
Binary files differ
diff --git a/themes/Sylvia/icon/pause_selected.png b/themes/Sylvia/icon/pause_selected.png
new file mode 100644
index 000000000..2bb742f24
--- /dev/null
+++ b/themes/Sylvia/icon/pause_selected.png
Binary files differ
diff --git a/themes/Sylvia/icon/pause_unactive.png b/themes/Sylvia/icon/pause_unactive.png
new file mode 100644
index 000000000..c756d2aa3
--- /dev/null
+++ b/themes/Sylvia/icon/pause_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/play.png b/themes/Sylvia/icon/play.png
new file mode 100644
index 000000000..be1b8eeb6
--- /dev/null
+++ b/themes/Sylvia/icon/play.png
Binary files differ
diff --git a/themes/Sylvia/icon/preferences.png b/themes/Sylvia/icon/preferences.png
new file mode 100644
index 000000000..8634b5159
--- /dev/null
+++ b/themes/Sylvia/icon/preferences.png
Binary files differ
diff --git a/themes/Sylvia/icon/rating-stars.gif b/themes/Sylvia/icon/rating-stars.gif
new file mode 100644
index 000000000..4059e0329
--- /dev/null
+++ b/themes/Sylvia/icon/rating-stars.gif
Binary files differ
diff --git a/themes/Sylvia/icon/rating-stars.png b/themes/Sylvia/icon/rating-stars.png
new file mode 100644
index 000000000..dba59ef00
--- /dev/null
+++ b/themes/Sylvia/icon/rating-stars.png
Binary files differ
diff --git a/themes/Sylvia/icon/recent.png b/themes/Sylvia/icon/recent.png
new file mode 100644
index 000000000..75567d689
--- /dev/null
+++ b/themes/Sylvia/icon/recent.png
Binary files differ
diff --git a/themes/Sylvia/icon/recent_by_child.png b/themes/Sylvia/icon/recent_by_child.png
new file mode 100644
index 000000000..faf5c4d5c
--- /dev/null
+++ b/themes/Sylvia/icon/recent_by_child.png
Binary files differ
diff --git a/themes/Sylvia/icon/recent_s.png b/themes/Sylvia/icon/recent_s.png
new file mode 100644
index 000000000..90b190523
--- /dev/null
+++ b/themes/Sylvia/icon/recent_s.png
Binary files differ
diff --git a/themes/Sylvia/icon/recent_s_by_child.png b/themes/Sylvia/icon/recent_s_by_child.png
new file mode 100644
index 000000000..842a513c4
--- /dev/null
+++ b/themes/Sylvia/icon/recent_s_by_child.png
Binary files differ
diff --git a/themes/Sylvia/icon/register.png b/themes/Sylvia/icon/register.png
new file mode 100644
index 000000000..677c7b9e9
--- /dev/null
+++ b/themes/Sylvia/icon/register.png
Binary files differ
diff --git a/themes/Sylvia/icon/remove_s.png b/themes/Sylvia/icon/remove_s.png
new file mode 100644
index 000000000..012efc1ad
--- /dev/null
+++ b/themes/Sylvia/icon/remove_s.png
Binary files differ
diff --git a/themes/Sylvia/icon/representative.png b/themes/Sylvia/icon/representative.png
new file mode 100644
index 000000000..02a914da1
--- /dev/null
+++ b/themes/Sylvia/icon/representative.png
Binary files differ
diff --git a/themes/Sylvia/icon/right.png b/themes/Sylvia/icon/right.png
new file mode 100644
index 000000000..6ede2ff93
--- /dev/null
+++ b/themes/Sylvia/icon/right.png
Binary files differ
diff --git a/themes/Sylvia/icon/right_unactive.png b/themes/Sylvia/icon/right_unactive.png
new file mode 100644
index 000000000..483cd7989
--- /dev/null
+++ b/themes/Sylvia/icon/right_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/save.png b/themes/Sylvia/icon/save.png
new file mode 100644
index 000000000..56515f42e
--- /dev/null
+++ b/themes/Sylvia/icon/save.png
Binary files differ
diff --git a/themes/Sylvia/icon/save_selected.png b/themes/Sylvia/icon/save_selected.png
new file mode 100644
index 000000000..24aeee308
--- /dev/null
+++ b/themes/Sylvia/icon/save_selected.png
Binary files differ
diff --git a/themes/Sylvia/icon/search_rules.png b/themes/Sylvia/icon/search_rules.png
new file mode 100644
index 000000000..cc23092a0
--- /dev/null
+++ b/themes/Sylvia/icon/search_rules.png
Binary files differ
diff --git a/themes/Sylvia/icon/slideshow.png b/themes/Sylvia/icon/slideshow.png
new file mode 100644
index 000000000..9263fdcbc
--- /dev/null
+++ b/themes/Sylvia/icon/slideshow.png
Binary files differ
diff --git a/themes/Sylvia/icon/slideshow_selected.png b/themes/Sylvia/icon/slideshow_selected.png
new file mode 100644
index 000000000..1ab04e0d4
--- /dev/null
+++ b/themes/Sylvia/icon/slideshow_selected.png
Binary files differ
diff --git a/themes/Sylvia/icon/start_filter.png b/themes/Sylvia/icon/start_filter.png
new file mode 100644
index 000000000..f8611cd83
--- /dev/null
+++ b/themes/Sylvia/icon/start_filter.png
Binary files differ
diff --git a/themes/Sylvia/icon/start_repeat.png b/themes/Sylvia/icon/start_repeat.png
new file mode 100644
index 000000000..fc58db189
--- /dev/null
+++ b/themes/Sylvia/icon/start_repeat.png
Binary files differ
diff --git a/themes/Sylvia/icon/start_repeat_grey.png b/themes/Sylvia/icon/start_repeat_grey.png
new file mode 100644
index 000000000..d135b913d
--- /dev/null
+++ b/themes/Sylvia/icon/start_repeat_grey.png
Binary files differ
diff --git a/themes/Sylvia/icon/start_slideshow.png b/themes/Sylvia/icon/start_slideshow.png
new file mode 100644
index 000000000..1ab04e0d4
--- /dev/null
+++ b/themes/Sylvia/icon/start_slideshow.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_filter.png b/themes/Sylvia/icon/stop_filter.png
new file mode 100644
index 000000000..145e64cc8
--- /dev/null
+++ b/themes/Sylvia/icon/stop_filter.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_repeat.png b/themes/Sylvia/icon/stop_repeat.png
new file mode 100644
index 000000000..f91f44843
--- /dev/null
+++ b/themes/Sylvia/icon/stop_repeat.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_repeat_pink.png b/themes/Sylvia/icon/stop_repeat_pink.png
new file mode 100644
index 000000000..9c71c7d06
--- /dev/null
+++ b/themes/Sylvia/icon/stop_repeat_pink.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_selected.png b/themes/Sylvia/icon/stop_selected.png
new file mode 100644
index 000000000..3262bbfeb
--- /dev/null
+++ b/themes/Sylvia/icon/stop_selected.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_slideshow.png b/themes/Sylvia/icon/stop_slideshow.png
new file mode 100644
index 000000000..b76c73be7
--- /dev/null
+++ b/themes/Sylvia/icon/stop_slideshow.png
Binary files differ
diff --git a/themes/Sylvia/icon/stop_unactive.png b/themes/Sylvia/icon/stop_unactive.png
new file mode 100644
index 000000000..99dccf926
--- /dev/null
+++ b/themes/Sylvia/icon/stop_unactive.png
Binary files differ
diff --git a/themes/Sylvia/icon/tag_cloud.png b/themes/Sylvia/icon/tag_cloud.png
new file mode 100644
index 000000000..988e5415a
--- /dev/null
+++ b/themes/Sylvia/icon/tag_cloud.png
Binary files differ
diff --git a/themes/Sylvia/icon/tag_cloud_grey.png b/themes/Sylvia/icon/tag_cloud_grey.png
new file mode 100644
index 000000000..90e32bc60
--- /dev/null
+++ b/themes/Sylvia/icon/tag_cloud_grey.png
Binary files differ
diff --git a/themes/Sylvia/icon/tag_letters.png b/themes/Sylvia/icon/tag_letters.png
new file mode 100644
index 000000000..eaab2ff4a
--- /dev/null
+++ b/themes/Sylvia/icon/tag_letters.png
Binary files differ
diff --git a/themes/Sylvia/icon/tag_letters_grey.png b/themes/Sylvia/icon/tag_letters_grey.png
new file mode 100644
index 000000000..9ec2fcfd4
--- /dev/null
+++ b/themes/Sylvia/icon/tag_letters_grey.png
Binary files differ
diff --git a/themes/Sylvia/icon/tag_letters_pink.png b/themes/Sylvia/icon/tag_letters_pink.png
new file mode 100644
index 000000000..21d5faba9
--- /dev/null
+++ b/themes/Sylvia/icon/tag_letters_pink.png
Binary files differ
diff --git a/themes/Sylvia/icon/up.png b/themes/Sylvia/icon/up.png
new file mode 100644
index 000000000..c997af2f5
--- /dev/null
+++ b/themes/Sylvia/icon/up.png
Binary files differ
diff --git a/themes/Sylvia/icon/validate_s.png b/themes/Sylvia/icon/validate_s.png
new file mode 100644
index 000000000..adea3d580
--- /dev/null
+++ b/themes/Sylvia/icon/validate_s.png
Binary files differ
diff --git a/themes/Sylvia/images/bottom-left-bg.jpg b/themes/Sylvia/images/bottom-left-bg.jpg
new file mode 100644
index 000000000..3d8a5eed2
--- /dev/null
+++ b/themes/Sylvia/images/bottom-left-bg.jpg
Binary files differ
diff --git a/themes/Sylvia/images/cat_bottom-left.gif b/themes/Sylvia/images/cat_bottom-left.gif
new file mode 100644
index 000000000..2a042897d
--- /dev/null
+++ b/themes/Sylvia/images/cat_bottom-left.gif
Binary files differ
diff --git a/themes/Sylvia/images/cat_bottom-right.gif b/themes/Sylvia/images/cat_bottom-right.gif
new file mode 100644
index 000000000..901f31d52
--- /dev/null
+++ b/themes/Sylvia/images/cat_bottom-right.gif
Binary files differ
diff --git a/themes/Sylvia/images/cat_top-left.gif b/themes/Sylvia/images/cat_top-left.gif
new file mode 100644
index 000000000..1ea57346e
--- /dev/null
+++ b/themes/Sylvia/images/cat_top-left.gif
Binary files differ
diff --git a/themes/Sylvia/images/cat_top-right.gif b/themes/Sylvia/images/cat_top-right.gif
new file mode 100644
index 000000000..7eb5c491e
--- /dev/null
+++ b/themes/Sylvia/images/cat_top-right.gif
Binary files differ
diff --git a/themes/Sylvia/images/fillet.gif b/themes/Sylvia/images/fillet.gif
new file mode 100644
index 000000000..6da64117b
--- /dev/null
+++ b/themes/Sylvia/images/fillet.gif
Binary files differ
diff --git a/themes/Sylvia/images/header_msgs-bg.gif b/themes/Sylvia/images/header_msgs-bg.gif
new file mode 100644
index 000000000..0879e1b79
--- /dev/null
+++ b/themes/Sylvia/images/header_msgs-bg.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuBox_bottom.gif b/themes/Sylvia/images/menuBox_bottom.gif
new file mode 100644
index 000000000..72c91b117
--- /dev/null
+++ b/themes/Sylvia/images/menuBox_bottom.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuBox_sides.gif b/themes/Sylvia/images/menuBox_sides.gif
new file mode 100644
index 000000000..853772da3
--- /dev/null
+++ b/themes/Sylvia/images/menuBox_sides.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuBox_top.gif b/themes/Sylvia/images/menuBox_top.gif
new file mode 100644
index 000000000..3c80b3cf9
--- /dev/null
+++ b/themes/Sylvia/images/menuBox_top.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuId_bottom.gif b/themes/Sylvia/images/menuId_bottom.gif
new file mode 100644
index 000000000..e6d1faa1d
--- /dev/null
+++ b/themes/Sylvia/images/menuId_bottom.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuId_sides.gif b/themes/Sylvia/images/menuId_sides.gif
new file mode 100644
index 000000000..68923cba2
--- /dev/null
+++ b/themes/Sylvia/images/menuId_sides.gif
Binary files differ
diff --git a/themes/Sylvia/images/menuId_top.gif b/themes/Sylvia/images/menuId_top.gif
new file mode 100644
index 000000000..5243a4097
--- /dev/null
+++ b/themes/Sylvia/images/menuId_top.gif
Binary files differ
diff --git a/themes/Sylvia/images/top-left-bg.jpg b/themes/Sylvia/images/top-left-bg.jpg
new file mode 100644
index 000000000..98aa1d6a5
--- /dev/null
+++ b/themes/Sylvia/images/top-left-bg.jpg
Binary files differ
diff --git a/themes/Sylvia/images/transparent.gif b/themes/Sylvia/images/transparent.gif
new file mode 100644
index 000000000..2fb4189a1
--- /dev/null
+++ b/themes/Sylvia/images/transparent.gif
Binary files differ
diff --git a/themes/Sylvia/index.php b/themes/Sylvia/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/Sylvia/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/Sylvia/local_head.tpl b/themes/Sylvia/local_head.tpl
new file mode 100644
index 000000000..932b5d2da
--- /dev/null
+++ b/themes/Sylvia/local_head.tpl
@@ -0,0 +1,3 @@
+<!--[if IE]>
+ <link rel="stylesheet" href="{$ROOT_URL}themes/Sylvia/theme-ie.css" type="text/css">
+<![endif]-->
diff --git a/themes/Sylvia/mail-css.tpl b/themes/Sylvia/mail-css.tpl
new file mode 100644
index 000000000..df0f7067f
--- /dev/null
+++ b/themes/Sylvia/mail-css.tpl
@@ -0,0 +1,15 @@
+/* Theme Sylvia mail css */
+
+body {ldelim} background-color:#111; color:#666;}
+#the_page {ldelim} }
+#content {ldelim} }
+#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.jpg) no-repeat scroll left bottom;
+min-height: 220px; height: 220px; width: 100%; min-width: 100%; padding: 10px 100px 30px 100px; }
+h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;}
+img {ldelim} margin: 16px; border: 16px solid #444; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {ldelim} padding: 15px; border: 0; background-color:#222;-moz-border-radius: 4px; border-radius: 4px 4px; }
+a {ldelim} color: #f70; background-color: transparent; border:0; text-decoration: none;}
+a:hover {ldelim} color: #F33; border-bottom: 1px solid #FF3363;}
+a.thumblnk:hover {ldelim} border:0;}
+a.Piwigo {ldelim} font-family: verdana, arial, helvetica, sans-serif; color : #F33; text-decoration: none; border: 0; }
+a.Piwigo:hover {ldelim} border-bottom: 1px solid #FF3363; } \ No newline at end of file
diff --git a/themes/Sylvia/theme-ie.css b/themes/Sylvia/theme-ie.css
new file mode 100644
index 000000000..e92e5b34d
--- /dev/null
+++ b/themes/Sylvia/theme-ie.css
@@ -0,0 +1,12 @@
+#content .thumbnailCategory div.description .text {
+ scrollbar-face-color:#222;
+ scrollbar-shadow-color:#444;
+ scrollbar-highlight-color:#000;
+ scrollbar-darkshadow-color:#333;
+ scrollbar-track-color:#111;
+ scrollbar-arrow-color:#f70;
+}
+
+#debug { word-wrap:break-word; }
+/* IE6... Hacks: */
+/*\*/ * html #menubar #mbIdentification .button { margin-right:25px; } /* */ \ No newline at end of file
diff --git a/themes/Sylvia/theme.css b/themes/Sylvia/theme.css
new file mode 100644
index 000000000..b4182391e
--- /dev/null
+++ b/themes/Sylvia/theme.css
@@ -0,0 +1,429 @@
+.content div.thumbnailCategory div.illustration {
+ width:165px !important; /* Usable range 162px-360px , optimal : Thumbnail width + 40px */
+}
+#comments div.thumbnailCategory div.illustration {
+ width:220px !important; /* Usable range 219px-360px , optimal : Thumbnail width + 95px */
+}
+#comments .thumbnailCategories hr {display:none;}
+#comments form.filter input[type="submit"] { margin-top:1.8em; }
+/* Sylvia Theme is close to the Roma Admin theme */
+BODY, H1, H3, DT, INPUT.rateButtonSelected, H2, #menubar DT {
+ color:#666;
+}
+#imageHeaderBar, #imageToolBar A:hover {
+ background-color: transparent;
+}
+BODY {
+ background:#111 url(images/bottom-left-bg.jpg) no-repeat fixed left bottom;
+ margin:0;
+ min-height: 100%;
+ height: 100%;
+ padding:0;
+}
+#the_page {
+ background:transparent url(images/top-left-bg.jpg) no-repeat scroll left top;
+ left:0;
+ margin:0;
+ padding:0;
+ position:absolute;
+ top:0;
+ z-index:0;
+ width: 100%;
+ min-width: 100%;
+}
+#theHeader {
+ min-height:110px;
+ height:110px;
+}
+#mbIdentification p, .totalImages {
+ color:#333;
+}
+.header_msgs {
+ background:transparent url(images/header_msgs-bg.gif) repeat scroll left top;
+ border:0;
+ color:#333;
+ font-size:24px;
+ left:0;
+ margin:0;
+ padding:10px 0 6px 0;
+ position:absolute;
+ text-align:center;
+ top:0;
+ width:100%;
+ z-index:99;
+}
+.header_notes {
+ background:transparent url(images/header_msgs-bg.gif) repeat scroll left top;
+ border:0 none;
+ color:#333;
+ font-size:16px;
+ margin:0;
+ padding:0;
+ position:absolute;
+ top:0;
+ width:100%;
+ z-index:99;
+}
+#menubar DL {
+ background:transparent url(images/menuBox_top.gif) no-repeat scroll left top;
+ margin:0 0 5px 40px;
+ padding:0;
+ width: 231px;
+ min-width: 231px;
+ border: 0;
+ min-height: 32px;
+ overflow-x: hidden;
+}
+#imageHeaderBar H2 {
+ border: 0;
+}
+#menubar DT {
+ background-color:#111;
+ border:0;
+ display:inline;
+ margin-left:8px;
+ text-align:left;
+}
+#menubar DD {
+ background:transparent url(images/menuBox_bottom.gif) no-repeat scroll left bottom;
+ margin:14px 0 0 0;
+ padding:0 0 22px;
+ width: 231px;
+ min-width: 231px;
+ border: 0;
+ overflow-x: hidden;
+}
+#menubar DD P {
+ background:transparent url(images/menuBox_sides.gif) repeat-y scroll left bottom;
+ padding: 2px 16px 0;
+ margin: 0;
+}
+#menubar UL, #menubar #mbCategories p, #menubar .illustration {
+ background:transparent url(images/menuBox_sides.gif) repeat-y scroll left bottom;
+ margin:0;
+}
+#menubar DT A {
+ font-size: 100%;
+}
+#menubar UL {
+ color:#333;
+ font-size: 16px;
+ line-height: 15px;
+}
+#menubar LI {
+ padding-left: 12px;
+}
+#menubar LI UL {
+ background: transparent url(images/transparent.gif);
+}
+#menubar A, .menuInfoCat {
+ font-size: 13px;
+}
+#menubar form {
+ background:transparent url(images/menuBox_sides.gif) repeat-y scroll left bottom;
+ margin:0;
+}
+#menubar DL#mbIdentification {
+ background:transparent url(images/menuId_top.gif) no-repeat scroll left top !important;
+}
+#menubar #mbIdentification DD {
+ background:transparent url(images/menuId_bottom.gif) no-repeat scroll left bottom;
+}
+#menubar #mbIdentification UL, #menubar #mbIdentification p, #menubar #mbIdentification .illustration {
+ background:transparent url(images/menuId_sides.gif) repeat-y scroll left bottom;
+}
+#menubar #mbIdentification form {
+ background:transparent url(images/menuId_sides.gif) repeat-y scroll left bottom;
+}
+#menubar #mbIdentification .actions, #menubar #mbIdentification form p {
+ background:transparent none repeat-y scroll left bottom;
+}
+#menubar #mbIdentification p {
+ padding: 2px 16px 0;
+ margin: 0;
+}
+#menubar p {
+ padding: 16px 16px 0;
+}
+#menubar .button {
+ position:relative;
+ right:9px;
+ top:16px;
+ height:16px;
+ width:16px;
+}
+#menubar #mbIdentification .button {
+ height:24px;
+ width:24px;
+ right:0px;
+ top:-40px;
+}
+#menubar #mbIdentification fieldset {
+ border:0;
+ margin:0 24px 0 23px;
+}
+#menubar #mbIdentification legend {
+ display: none;
+}
+#menubar #menuTagCloud {
+ margin: 0;
+ padding: 0 8px 0 16px;
+}
+
+.content {
+ background:#222 url(images/fillet.gif) repeat-x scroll left top;
+ min-height:466px;
+}
+
+.content {
+ border: 1px solid #000;
+ border-top: 0;
+ margin:21px 7px 0 290px;
+ padding-top:7px;
+}
+.content h2 {
+ margin:0;
+ padding:0px 10px 15px 15px;
+ border:0;
+}
+#menubar form {
+ background:transparent url(images/menuBox_sides.gif) repeat-y scroll left bottom;
+ margin:0;
+}
+.content ul.thumbnailCategories li {
+ background:#222 url(images/cat_bottom-right.gif) no-repeat scroll right bottom;
+ width:49%;
+ margin: 0;
+ padding:0;
+}
+.content div.thumbnailCategory {
+ background:transparent url(images/cat_bottom-left.gif) no-repeat scroll left bottom;
+ padding: 0;
+ margin:0;
+}
+.content .thumbnailCategory div.illustration {
+ background:transparent url(images/cat_top-left.gif) no-repeat scroll left top;
+ padding: 0 0 0 10px;
+ margin: 0 !important;
+}
+.content .thumbnailCategory div.illustration a {
+ display: block;
+ margin: 0;
+ padding:20px 0 0 8px;
+}
+.content .thumbnailCategory div.description {
+ background:transparent url(images/cat_top-right.gif) no-repeat scroll right top;
+ margin: 0;
+ padding:15px 10px 3px 0;
+ overflow-x: hidden !important;
+}
+.content .thumbnailCategory div.description .text {
+ display:block;
+ margin:10px 2px 0 0;
+ overflow: auto;
+ overflow-x:hidden;
+ padding:0 0 5px;
+}
+.content div.thumbnailCategory div.description p.dates {
+ margin: 0 15px 0 15px;
+ text-align: right;
+}
+.content .thumbnailCategory div.description H3 {
+ display: block;
+}
+.content ul.thumbnailCategories li:hover {
+ background-color:#111;
+}
+.content .navigationBar {
+ color:#666;
+}
+.infos {
+ color:#f70;
+ border:0;
+ background-color: transparent;
+ margin-left:125px;
+ padding:5px 0px 0pt 10pt;
+ min-height: 48px;
+ text-align:left;
+}
+.infos li, .errors li {
+ list-style-type:none;
+}
+.errors {
+ color:#f33;
+ border:0;
+ background: transparent url(icon/errors.png) no-repeat scroll right top;
+ margin-left:125px;
+ padding:5px 0px 0pt 10pt;
+ min-height: 48px;
+ text-align:left;
+ font-weight:bold;
+}
+#menubar #menuTagCloud {
+ background:transparent url(images/menuBox_sides.gif) repeat-y scroll left bottom;
+ margin:0;
+ padding: 0 12px;
+}
+H2 {
+ border-bottom: 1px solid #000000;
+}
+#qsearchInput {
+ color:#999;
+}
+FIELDSET, INPUT, SELECT, TEXTAREA {
+ border: 1px solid #666;
+}
+input[type="text"], input[type="password"], input[type="button"], input[type="submit"], input[type="reset"], input[type="file"] {
+ background-color:#444;
+ color:#999;
+} /* stupid Line but needed due to inpact on other themes and deadline of Piwigo 2.0 */
+input[type="file"] {
+ background-color:#222;
+ border: 1px solid #666;
+}
+INPUT, select, textarea {
+ color:#999;
+ background-color:#444;
+}
+input[type="radio"], input[type="checkbox"], input[type="button"].rateButtonStarEmpty, input[type="button"].rateButtonStarFull {
+ background-color: transparent;
+}
+#qsearchInput:focus, input:focus, select:focus, textarea:focus, input.focus, form .focus {
+ background-color:#444;
+ color:#999;
+}
+.content UL.thumbnails SPAN.wrap2 {
+ border: 1px solid #666; /* thumbnails border color and style */
+ border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
+}
+.content UL.thumbnails SPAN.wrap2:hover {
+ color:#666;
+ background-color:#111;
+ border:1px solid #ff3363; /* thumbnails border color when mouse cursor is over it */
+}
+#comments ul.actions li, #comments ul.actions li:hover {
+ background:transparent none;
+ padding: 0 22px;
+ clear:both;
+ list-style-type:none;
+}
+span.calItem {
+ border:1px solid #666;
+ margin:0 5px;
+ padding:2px 5px 0 8px;
+}
+span.calItemEmpty, td.calDayCellEmpty, td.calDayCellFull {
+ border:1px solid #666;
+}
+A, INPUT.rateButton {
+ color:#f70;
+ border-width: 0;
+}
+A:hover, A:active {
+ color:#f33;
+ border-bottom: 1px solid #FF3363;
+ cursor: pointer;
+}
+a.external {
+ color:#FF3363;
+ border:0;
+ text-decoration: none;
+}
+a.external:hover {
+ color:#FF7700;
+ border:0;
+}
+a.Piwigo {
+ font-family: verdana, arial, helvetica, sans-serif !important;
+ font-size: 11px; font-weight: normal; letter-spacing: 0;
+ color : #F33; text-decoration: none; border: 0; }
+a.Piwigo:hover span.Piwigo {
+ border-bottom: 1px solid #FF3363;
+}
+#theImage A, .illustration A, A.navThumb, A.navThumb {
+ border-bottom-width: 0;
+}
+#imageToolBar {
+ padding:0 7%;
+}
+#imageHeaderBar .imageNumber {
+ margin-right:7%;
+}
+#imageHeaderBar .browsePath {
+ margin-left:7%;
+}
+*, *:focus, *:active, input:active, a:active, input:focus, a:focus {
+ outline: none;
+}
+#debug {
+ margin: 15px 15px 5px 248px;
+ font-size:12px;
+ clear: both;
+}
+.rateButtonStarFull, .rateButtonStarEmpty {
+ background-image: url('icon/rating-stars.gif');
+}
+#menubar #mbIdentification fieldset div input[type="text"] {
+ margin: 0 0 3px;
+ width: 174px;
+ display: inline;
+}
+input[type="button"], input[type="submit"], input[type="reset"] {
+ color:#ff3363;
+ background-color:#222;
+ border-color:#ff3363;
+}
+input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover {
+ color:#999;
+ border-color:#666;
+}
+.titrePage img.button[alt="x"] { margin: 0 3px 3px; }
+
+#thePicturePage .thumbnailCategory {
+ padding: 15px 2px 6px 12px;
+ border: 1px solid #666;
+}
+#thePicturePage .thumbnailCategory .date, #thePicturePage .thumbnailCategory .author {
+ font-weight:bold;
+}
+#thePicturePage .thumbnailCategories {
+ padding-left: 12px;
+ padding-right: 12px;
+}
+#thePicturePage .odd {
+ background-color: #222;
+ border-top:0 !important;
+}
+#addComment fieldset {
+ color: #f70;
+ border-color: #f70;
+}
+#addComment fieldset label {
+ color: #666;
+}
+#theCommentsPage .content ul.thumbnailCategories li,
+#theCommentsPage .content div.thumbnailCategory ,
+#theCommentsPage .content div.thumbnailCategory div.description,
+#theCommentsPage .content .thumbnailCategory div.illustration {
+ background-image: none;
+}
+#theCommentsPage .content div.thumbnailCategory {
+ padding: 15px 2px 6px 12px;
+ border: 1px solid #666;
+}
+#theCommentsPage .content .odd {
+ background-color: #222;
+ border-top:0 !important;
+}
+#theCommentsPage .content .even {
+ background-color: #111;
+}
+#theCommentsPage .content ul.thumbnailCategories li:hover {
+ background-color: transparent;
+}
+#theCommentsPage div#comments {
+ padding: 0 0 5px 10px;
+}
+tr.tagLine, fieldset.tagLetter, legend.tagLetterLegend {
+ border-color: #666666;
+}
diff --git a/themes/Sylvia/themeconf.inc.php b/themes/Sylvia/themeconf.inc.php
new file mode 100644
index 000000000..97af90564
--- /dev/null
+++ b/themes/Sylvia/themeconf.inc.php
@@ -0,0 +1,8 @@
+<?php
+$themeconf = array(
+ 'theme' => 'Sylvia',
+ 'parent' => 'default',
+ 'icon_dir' => 'themes/Sylvia/icon',
+ 'mime_icon_dir' => 'themes/Sylvia/icon/mimetypes/',
+);
+?>
diff --git a/themes/clear/index.php b/themes/clear/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/clear/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/clear/mail-css.tpl b/themes/clear/mail-css.tpl
new file mode 100644
index 000000000..298926540
--- /dev/null
+++ b/themes/clear/mail-css.tpl
@@ -0,0 +1,12 @@
+/* Theme clear mail css */
+
+body {ldelim} background-color:#fff; color:#696969;}
+#the_page {ldelim} background: #fff url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+color: #333;}
+h2 {ldelim} background-color: #ddd;}
+img {ldelim} margin: 16px; border: 16px solid #aaa; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#faebd7; -moz-border-radius: 4px; border-radius: 4px 4px; }
+a {ldelim} color: #369; background: transparent; }
+a:hover {ldelim} color: #ddd; }
diff --git a/themes/clear/theme.css b/themes/clear/theme.css
new file mode 100644
index 000000000..c407e95de
--- /dev/null
+++ b/themes/clear/theme.css
@@ -0,0 +1,77 @@
+
+/* text color */
+BODY, H1, H2, H3, DT,
+INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
+ color:#696969; /* dimgray */
+}
+
+/* backgrounds */
+BODY, H3 {
+ background-color: #ffffff; /* white */
+}
+
+H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover {
+ background-color: #d3d3d3;
+}
+
+#menubar DL, .content, #imageToolBar, .header_notes {
+ background-color: #eeeeee;
+}
+
+/* borders */
+#menubar DL, .content, #imageToolBar {
+ border: 1px solid #d3d3d3;
+}
+
+#theImage IMG {
+ border: 3px solid #d3d3d3;
+}
+
+.content UL.thumbnail IMG {
+ border: 1px solid #a0a0a0;
+}
+
+FIELDSET, INPUT, SELECT, TEXTAREA,
+.content DIV.thumbnailCategory {
+ border: 1px solid gray;
+}
+
+.content UL.thumbnails SPAN.wrap2 {
+ border: 1px solid #aaaaaa; /* thumbnails border color and style */
+ border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
+}
+
+.content UL.thumbnails SPAN.wrap2:hover,
+.content UL.thumbnailCategories DIV.thumbnailCategory:hover,
+.content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
+ background-color: #faebd7;
+ border-color: yellow; /* thumbnails border color when mouse cursor is over it */
+ color: black;
+}
+
+/* links */
+A, INPUT.rateButton {
+ color: #005e89;
+ background: transparent;
+}
+
+A:hover, INPUT.rateButton:hover {
+ color: #858460;
+}
+
+#imageToolBar A, #imageToolBar A:hover {
+ border-bottom: none;
+}
+
+A.navThumb, A.navThumb:hover {
+ border-bottom: none;
+}
+
+/*calendar elements*/
+SPAN.calItem, SPAN.calItemEmpty
+{
+ border: 1px solid silver;
+}
+
+#qsearchInput { color: #d3d3d3; }
+#qsearchInput:focus { color: #005e89; } \ No newline at end of file
diff --git a/themes/clear/themeconf.inc.php b/themes/clear/themeconf.inc.php
new file mode 100644
index 000000000..771a5be7b
--- /dev/null
+++ b/themes/clear/themeconf.inc.php
@@ -0,0 +1,6 @@
+<?php
+$themeconf = array(
+ 'theme' => 'clear',
+ 'parent' => 'default',
+);
+?>
diff --git a/themes/dark/images/index.php b/themes/dark/images/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/dark/images/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/dark/images/tableh1_bg.png b/themes/dark/images/tableh1_bg.png
new file mode 100644
index 000000000..c7785d0f6
--- /dev/null
+++ b/themes/dark/images/tableh1_bg.png
Binary files differ
diff --git a/themes/dark/images/tableh2_bg.png b/themes/dark/images/tableh2_bg.png
new file mode 100644
index 000000000..d8c29f93d
--- /dev/null
+++ b/themes/dark/images/tableh2_bg.png
Binary files differ
diff --git a/themes/dark/index.php b/themes/dark/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/dark/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/dark/mail-css.tpl b/themes/dark/mail-css.tpl
new file mode 100644
index 000000000..26b51578b
--- /dev/null
+++ b/themes/dark/mail-css.tpl
@@ -0,0 +1,12 @@
+/* Theme dark mail css */
+
+body {ldelim} background-color:#444; color:#fff;}
+#the_page {ldelim} background: #444 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+color: #69c;}
+h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);}
+img {ldelim} margin: 16px; border: 16px solid #111; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#444;-moz-border-radius: 4px; border-radius: 4px 4px; }
+a {ldelim} color: #fff48e; background: transparent;border-bottom:1px dotted #005e89; }
+a:hover {ldelim} color: #fff48e;}
diff --git a/themes/dark/theme.css b/themes/dark/theme.css
new file mode 100644
index 000000000..eea9562cb
--- /dev/null
+++ b/themes/dark/theme.css
@@ -0,0 +1,76 @@
+
+/* text color */
+BODY, H1, H3,
+INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
+ color:#d0d0d0;
+}
+
+H2, #menubar DT {
+ color: #fff48e;
+}
+
+
+/* backgrounds */
+
+BODY, H3, #imageHeaderBar, #imageToolBar A:hover {
+ background-color: #2f2f2f;
+}
+
+#menubar DL, .content, #imageToolBar, .header_notes {
+ background-color: #505050;
+}
+
+H2, #menubar DT {
+ background-image: url(images/tableh1_bg.png);
+}
+
+#imageHeaderBar H2 {
+ background-image: none;
+ background-color: transparent;
+ border: none;
+}
+
+#imageHeaderBar {
+ background-image: url(images/tableh2_bg.png);
+ background-repeat: repeat-x;
+ background-position: center;
+ border-top: 1px solid #000;
+}
+
+/* borders */
+#menubar DL, .content{
+ border: 1px solid #000;
+}
+
+H2, #menubar DT, #imageToolBar {
+ border-bottom: 1px solid #000;
+}
+
+FIELDSET, INPUT, SELECT, TEXTAREA,
+.content DIV.thumbnailCategory {
+ border: 1px solid gray;
+}
+
+.content UL.thumbnails SPAN.wrap2 {
+ border: 1px solid #aaaaaa; /* thumbnails border color and style */
+ border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
+}
+
+.content UL.thumbnails SPAN.wrap2:hover,
+.content UL.thumbnailCategories DIV.thumbnailCategory:hover,
+.content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
+ background-color: #faebd7;
+ border-color: yellow; /* thumbnails border color when mouse cursor is over it */
+ color: black;
+}
+
+
+/* links */
+A, INPUT.rateButton {
+ color: #fff;
+ border: none;
+}
+
+A:hover {
+ color: #FFF48E;
+} \ No newline at end of file
diff --git a/themes/dark/themeconf.inc.php b/themes/dark/themeconf.inc.php
new file mode 100644
index 000000000..48ed9577c
--- /dev/null
+++ b/themes/dark/themeconf.inc.php
@@ -0,0 +1,6 @@
+<?php
+$themeconf = array(
+ 'theme' => 'dark',
+ 'parent' => 'default',
+);
+?>
diff --git a/themes/default/content.css b/themes/default/content.css
new file mode 100644
index 000000000..11023f104
--- /dev/null
+++ b/themes/default/content.css
@@ -0,0 +1,197 @@
+.content {
+ margin-right: 1em;
+ margin-bottom: 1em; /* when it's longer than menu bar */
+}
+
+BODY#theCommentsPage .content,
+BODY#theUploadPage .content,
+BODY#theRegisterPage .content,
+BODY#theIdentificationPage .content,
+BODY#theProfilePage .content,
+BODY#theSearchPage .content,
+BODY#theAboutPage .content,
+BODY#thePopuphelpPage .content,
+BODY#thePasswordPage .content,
+BODY#theNotificationPage .content,
+BODY#theTagsPage .content,
+BODY#theNBMPage .content
+{
+ margin: 1em;
+}
+
+.content H2 { margin-bottom: 3px;} /*<- for IE otherwise calendar select is displaced to middle of page*/
+
+.content .navigationBar, .content .additional_info, .content .calendarBar {
+ margin: 8px 4px;
+ text-align: center;
+}
+
+.content .pageNumberSelected {
+ font-style: italic;
+ font-weight: bold;
+}
+
+.content .additional_info {
+ font-size: 110%;
+}
+
+
+/* actions */
+UL.categoryActions {
+ margin: 0 2px;
+ width: auto;
+ padding: 0;
+ text-indent: 0;
+ list-style: none;
+ text-align: center;
+}
+
+.content DIV.titrePage UL.categoryActions {
+ float: right;
+ text-align: center;
+}
+
+.content DIV.titrePage {
+ padding: 0 0 3px;
+}
+
+.content UL.categoryActions LI {
+ display: inline;
+}
+
+.content UL.categoryActions A IMG, UL.categoryActions A {
+ border: none;
+ margin-bottom: -5px;
+}
+
+/* begin chronology/calendar elements*/
+.content DIV.calendarViews {
+ display: block;
+ float: right;
+ margin: 2px 0 0;
+}
+
+SPAN.calItem, SPAN.calItemEmpty {
+ font-weight: bold;
+ margin: 0 1px;
+}
+
+SPAN.calItem A { border:0 }
+
+.content DIV.calendarCalBar {
+ margin: 10px 10px;
+ text-align: left;
+}
+
+SPAN.calCalHead {
+ font-weight: bold;
+ font-size: 110%;
+ margin: 0 2px;
+}
+
+SPAN.calCal { margin: 0 2px; }
+
+/* nice looking month calendar*/
+TABLE.calMonth {
+ border: none;
+ border-collapse: collapse;
+ margin-bottom: 10px; /*<-IE ignores this */
+}
+
+TD.calDayCellFull, TD.calDayCellEmpty, TD.calDayCellBlank {
+ vertical-align: top;
+ font-weight: bold;
+ font-size: 18px;
+}
+
+TD.calDayHead {
+ font-weight: bold;
+ font-size: 12px;
+ text-align: center;
+}
+
+DIV.calImg {
+ overflow: hidden;
+ vertical-align: bottom;
+ z-index: 1;
+ position: relative; /*<- this required by IE*/
+}
+
+.calImg img {
+ position: relative;
+ border: 0;
+}
+
+.calBackDate {
+ padding-left: 4px;
+ padding-top: 0px;
+ z-index: 2;
+ position: absolute;
+ vertical-align: top;
+ color: #000;
+}
+
+.calForeDate {
+ padding-left: 5px;
+ padding-top: 1px;
+ z-index: 3;
+ position: absolute;
+ vertical-align: top;
+ color: #fff;
+}
+
+/* Category thumbnails on main page, CSS code inspired from MOD subcatify */
+.content UL.thumbnailCategories {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ overflow: hidden;
+ width: 100%;
+}
+
+.content UL.thumbnailCategories LI {
+ margin:0;
+ padding:0;
+ float:left;
+}
+
+.content DIV.thumbnailCategory {
+ display:block;
+ padding: 2px 0px 0px 2px;
+ margin: 5px;
+}
+
+.content DIV.thumbnailCategory DIV.description {
+ font-size: 90%;
+ overflow: auto;
+ /*width: inherit;*/
+}
+
+.content DIV.thumbnailCategory DIV.description H3 {
+ text-align: left;
+ background: transparent;
+ margin: 0;
+ padding: 0.1em;
+ font-size: 120%;
+}
+
+.content DIV.thumbnailCategory DIV.description P {
+ margin: 0;
+}
+
+.content DIV.thumbnailCategory DIV.illustration {
+ text-align: left;
+ margin: 2px 0 0 2px;
+ float: left;
+}
+
+
+/* User comments */
+DIV#comments {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+DIV#comments DIV.description {
+ font-size: 100%;
+}
diff --git a/themes/default/default-colors.css b/themes/default/default-colors.css
new file mode 100644
index 000000000..cc094cf0e
--- /dev/null
+++ b/themes/default/default-colors.css
@@ -0,0 +1,109 @@
+
+/* others */
+
+#imageToolBar * {
+ background: inherit;
+}
+
+/* So that non-links are slightly greyed out */
+.content .navigationBar, SPAN.calItemEmpty, TD.calDayCellEmpty {
+ color: #b0b0b0;
+}
+
+/* Tables & forms */
+
+/* IE <= 6 is so bad with this that you can't merge with the following rule */
+INPUT[type="text"], INPUT[type="password"], INPUT[type="button"],
+INPUT[type="submit"], INPUT[type="reset"], INPUT[type="file"] {
+ color:black;
+ background-color: #d3d3d3; /* lightgrey */
+}
+
+INPUT.text, INPUT.password, INPUT.button,
+INPUT.submit, INPUT.reset, INPUT.file,
+SELECT, TEXTAREA {
+ color:black;
+ background-color: #d3d3d3; /* lightgrey */
+}
+
+INPUT:focus, SELECT:focus, TEXTAREA:focus, INPUT.focus, FORM .focus {
+ background-color: #f5f5f5; /* whitesmoke */
+}
+
+/* some theme set a border on INPUT which is not pretty for radio/checkbox */
+INPUT[type="radio"], INPUT[type="checkbox"] {
+ border: none; /* <= Opera needs this */
+}
+
+INPUT.radio, INPUT.checkbox {
+ border: none; /* <= IE6 needs this */
+}
+
+/* rate buttons displayed like links */
+INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rateButtonStarEmpty {
+ color:inherit;
+ background-color:transparent !important; /* Konqueror doesn't accept transparent here */
+}
+
+.errors { /* Errors display */
+ color: red;
+ background-color: #ffe1e1;
+ font-weight: bold;
+ margin: 5px;
+ border: 1px solid red;
+ background-image: url(icon/admin/errors.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ padding: 10px 50px 10px 10px;
+}
+
+/**
+ * Informations box in administration
+ */
+.infos {
+ color: #002000;
+ background-color: #98fb98; /* palegreen */
+ background-image: url(icon/admin/infos.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ margin: 5px;
+ padding: 10px 50px 10px 10px;
+}
+
+/**
+ * Header message like upgrade or adviser mode
+ */
+.header_msgs {
+ text-align:center;
+ font-weight: bold;
+ color:#696969; /* dimgray */
+ background-color: #d3d3d3;
+ margin: 1px;
+ padding: 1px;
+}
+
+/**
+ * Header notes box in public/administration
+ */
+.header_notes {
+ border: 1px solid #aaaaaa; /* border color and style */
+ text-align: center;
+ background-image: url(icon/note.png);
+ background-repeat: no-repeat;
+ background-position: top left;
+ font-weight: bold;
+ margin: 14px;
+ padding: 5px 00px 0px 0px;
+}
+
+LEGEND {
+ font-style: italic;
+}
+
+/*calendar*/
+SPAN.calItem, SPAN.calItemEmpty,
+TD.calDayCellEmpty, TD.calDayCellFull {
+ border: 1px solid gray;
+}
+
+
diff --git a/themes/default/default-layout.css b/themes/default/default-layout.css
new file mode 100644
index 000000000..fda1c4f6e
--- /dev/null
+++ b/themes/default/default-layout.css
@@ -0,0 +1,314 @@
+BODY {
+ margin: 5px;
+ padding: 0;
+ font-size: 0.8em;
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+
+H1 {
+ text-align: center;
+ font-size: 150%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0.5em 0 1em 0;
+}
+
+H2 {
+ margin: 0;
+ padding: 5px 0.5em 5px 0.5em;
+ text-align: left;
+ font-size: 120%;
+}
+
+A {
+ text-decoration:none;
+ border-bottom: 1px dotted #005e89;
+}
+A:hover {
+ border-bottom: 1px solid #858460;
+}
+
+IMG {
+ border: none;
+}
+
+HR.separation {
+ visibility: hidden;
+ clear: both;
+}
+
+#copyright {
+ clear: both;
+ font-size: 83%;
+ text-align: center;
+ margin: 0 0 10px 0;
+}
+
+INPUT, SELECT {
+ margin: 0;
+ font-size: 1em; /* <= some browsers don't set it correctly */
+}
+
+TABLE { /* horizontaly centered */
+ margin-left: auto;
+ margin-right: auto;
+}
+
+
+FORM { padding: 0; margin: 0; }
+
+FORM P {
+ text-align: center;
+ margin-top: 2em;
+ margin-bottom: 2em;
+}
+
+FORM FIELDSET P {
+ margin-top: 1em;
+ margin-bottom: 0;
+}
+
+SELECT.categoryList {
+ height: 20em;
+ width: 500px;
+}
+
+
+/**
+ * Filter forms are displayed label by label with the input (or select...)
+ * below the label. Use an UL to make a group (radiobox for instance).
+ * Use a SPAN to group objects in line
+ */
+FIELDSET {
+ padding: 1em;
+ margin: 1em;
+ overflow: hidden; /* <- makes Opera happy */
+}
+
+FORM.filter FIELDSET UL {
+ margin: 0;
+}
+FORM.filter FIELDSET UL,
+FORM.filter FIELDSET LABEL {
+ display: block;
+ float: left;
+ margin-right: 1em;
+ padding: 0;
+}
+
+FORM.filter FIELDSET LI {
+ list-style: none;
+ margin-bottom: 0.5em;
+}
+
+FORM.filter FIELDSET LI LABEL {
+ display: inline;
+ float: none;
+}
+
+FORM.filter FIELDSET UL.tagSelection LABEL {
+ display: inline;
+ float: none;
+ margin-right:0.5em;/*reduce from above*/
+}
+
+/* cannot use FIELDSET>LABEL because of IE<=6 */
+FORM.filter FIELDSET LABEL INPUT,
+FORM.filter FIELDSET LABEL SELECT,
+FORM.filter FIELDSET LABEL SPAN,
+FORM.filter FIELDSET LABEL TEXTAREA {
+ display: block;
+ margin: 0.5em 0;
+}
+FORM.filter FIELDSET * LABEL INPUT,
+FORM.filter FIELDSET * LABEL SELECT,
+FORM.filter FIELDSET * LABEL TEXTAREA,
+FORM.filter FIELDSET LABEL SPAN INPUT,
+FORM.filter FIELDSET LABEL SPAN SELECT,
+FORM.filter FIELDSET LABEL SPAN TEXTAREA {
+ display: inline;
+ vertical-align: top;
+ margin: 0 0.5em 0 0;
+}
+
+FORM.filter FIELDSET UL.tagSelection LI LABEL INPUT {
+ margin-right:0;
+}
+
+/* following declaration is important to avoid strange FF behaviour */
+FORM.filter FIELDSET LABEL SPAN SELECT {
+ margin: 0;
+}
+
+FORM.filter FIELDSET P
+{
+ clear: left;
+ display: block;
+}
+
+FORM.filter INPUT[type="submit"] {
+ margin-top: 1em;
+}
+
+FORM.properties UL {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+FORM.properties LI {
+ margin-bottom: 0.5em;
+ padding: 0;
+ line-height: 1.8em;
+ clear: left;
+}
+
+FORM.properties SPAN.property {
+ font-weight: bold;
+ float: left;
+ width: 50%;
+ text-align: right;
+ margin: 0;
+ padding: 0 0.5em 0 0;
+}
+
+/* button tools */
+UL.actions {
+ text-indent: 0;
+ list-style: none;
+}
+UL.actions LI {
+ display: inline;
+}
+UL.actions A, UL.actions IMG {
+ border: none;
+}
+
+UL.tagSelection {
+ width: 99%;
+ margin: 1em 0 1em 0;
+ padding: 0;
+}
+
+UL.tagSelection LI {
+ display: inline;
+ white-space: nowrap;
+}
+
+#fullTagCloud {
+ font-size: 120%;
+ text-align: justify;
+ padding: 0;
+ margin: 1em 2em 1em 2em;
+}
+
+#fullTagCloud SPAN {
+ white-space: nowrap;
+ margin: 0 2px;
+}
+
+
+.tagLevel5 { font-size: 150%; }
+.tagLevel4 { font-size: 140%; }
+.tagLevel3 { font-size: 120%; }
+.tagLevel2 { font-size: 100%; }
+.tagLevel1 { font-size: 90%; }
+
+
+/* Popup help page */
+BODY#thePopuphelpPage #copyright {
+ display: none;
+}
+
+#theNotificationPage p { padding: 0.5em; }
+BODY#thePopuphelpPage .content P {
+ text-align: justify;
+ padding: 0.5em;
+}
+
+BODY#thePopuphelpPage .content OL LI,
+BODY#thePopuphelpPage .content UL LI
+{
+ margin-bottom: 0.5em;
+}
+
+TR.tagLine {
+ border-bottom: 1px solid #ddd;
+}
+TD.nbEntries {
+ text-align: right;
+ font-style: italic;
+ font-size: 90%;
+}
+
+FIELDSET.tagLetter {
+ border: 1px solid #d3d3d3;
+ width: 200px;
+ margin: 0.5em;
+ padding: 10px;
+}
+
+LEGEND.tagLetterLegend {
+ border: 1px solid #d3d3d3;
+ font-size:120%;
+ font-weight: bold;
+ padding: 0 5px;
+ font-style: normal;
+}
+
+TABLE.tagLetterContent {
+ width:100%;
+ font-size:80%;
+ border-collapse : collapse;
+}
+
+#theHeader {text-align: center;}
+
+#theNotificationPage DL,
+#thePopuphelpPage DL { margin: 0 25px 25px; }
+.content #comments UL.thumbnailCategories LI { width:99%; }
+/* jQuery datepicker */
+IMG.ui-datepicker-trigger {
+ cursor : pointer;
+}
+
+/* Set the width of the menubar for the galery */
+#menubar {
+ width: 18em;
+}
+.content {
+ margin-left: 20em; /* = #menubar width + 2em */
+}
+/* Set minimum width of the page before getting a scrollbar */
+/* IE5 and IE6 don't get that */
+BODY {
+ min-width: 60em; /* ~ 3* #menubar width */
+}
+BODY#thePopuphelpPage {
+ min-width: 0;
+}
+
+/* Set some sizes according to your maximum thumbnail width and height */
+.content UL.thumbnails SPAN,
+.content UL.thumbnails SPAN.wrap2 A,
+.content UL.thumbnails LABEL,
+.content DIV.thumbnailCategory DIV.illustration {
+ width: 140px; /* max thumbnail width + 2px */
+}
+.content UL.thumbnails SPAN.wrap2,
+.content DIV.thumbnailCategory DIV.description {
+ height: 140px; /* max thumbnail height + 2px */
+}
+
+
+/* Category thumbnails on main page */
+.content UL.thumbnailCategories LI {
+ width: 49.7%; /* 49.7% for 2 per line, 33.2% for 3 per line*/
+}
+
+/* Set defaults for thumbnails legend */
+.content UL.thumbnails SPAN.thumbLegend {
+ display: block; /* display: none; if you don't want legend */
+ height: 4em; /* legend height (don't set auto to be Gecko friendly)*/
+}
diff --git a/themes/default/fix-ie5-ie6.css b/themes/default/fix-ie5-ie6.css
new file mode 100644
index 000000000..54018fea1
--- /dev/null
+++ b/themes/default/fix-ie5-ie6.css
@@ -0,0 +1,42 @@
+/* Issues in IE from 5 to 6 only not to be used with IE7 */
+
+/* fix IE with another layout for thumbnails */
+.content UL.thumbnails SPAN.wrap2 {
+ display: block;
+ position: relative;
+ text-align: left;
+}
+.content UL.thumbnails SPAN.wrap2 A,
+.content UL.thumbnails SPAN.wrap2 SPAN {
+ overflow: visible;
+ position: absolute;
+ top: 50%;
+ text-align: center;
+}
+
+.content UL.thumbnails IMG.thumbnail {
+ position: relative;
+ top: -50%;
+ /*\*//*/
+ margin-top: -40%;
+ /**/
+}
+
+/* to avoid vanishing objects in IE6 */
+H1, #theHeader {
+ width: 100%; /* <- useless but seems to make IE6 happy */
+}
+.content {
+ height: 1em; /* for IE6 it's like min-height */
+}
+
+/* fix category thumbnails on main page */
+.content UL.thumbnailCategories {
+ width: 99%; /* buggy IE box model */
+}
+
+
+/* fix quickconnect layout */
+FORM#quickconnect FIELDSET {
+ width: 99%; /* correct an ugly 1 or 2 px misalignement with IE */
+}
diff --git a/themes/default/fix-ie7.css b/themes/default/fix-ie7.css
new file mode 100644
index 000000000..70ddf7e8b
--- /dev/null
+++ b/themes/default/fix-ie7.css
@@ -0,0 +1,21 @@
+/* fix IE with another layout for thumbnails */
+
+.content UL.thumbnails SPAN.wrap2 {
+ display: block;
+ position: relative;
+ text-align: left;
+}
+.content UL.thumbnails SPAN.wrap2 A,
+.content UL.thumbnails SPAN.wrap2 SPAN {
+ overflow: visible;
+ position: absolute;
+ top: 50%;
+ text-align: center;
+}
+
+.content UL.thumbnails IMG.thumbnail {
+ position: relative;
+ top: -50%;
+ margin-top: 2%;
+}
+
diff --git a/themes/default/fix-khtml.css b/themes/default/fix-khtml.css
new file mode 100644
index 000000000..a0377886c
--- /dev/null
+++ b/themes/default/fix-khtml.css
@@ -0,0 +1,17 @@
+/* Issue in Safari/Konqueror only */
+/* If H2 has a 0 margin-top categoryActions doesn't float right but overwrites H2 */
+.content>DIV.titrePage>H2 {
+ margin: 1px 0 0 0; /* add an arbitrary margin-top */
+}
+
+.content>div.titrePage {
+ position: relative;
+ top: -1px; /* move the container up by the same amount */
+ margin-bottom: 5px;
+}
+
+#menubar #menuTagCloud SPAN
+{
+ display: inline-block;/* required for Safari 3.1 - otherwise overflows on the right */
+}
+
diff --git a/themes/default/icon/add_tag.png b/themes/default/icon/add_tag.png
new file mode 100644
index 000000000..9051a1d26
--- /dev/null
+++ b/themes/default/icon/add_tag.png
Binary files differ
diff --git a/themes/default/icon/admin/errors.png b/themes/default/icon/admin/errors.png
new file mode 100644
index 000000000..3c8a37df5
--- /dev/null
+++ b/themes/default/icon/admin/errors.png
Binary files differ
diff --git a/themes/default/icon/admin/index.php b/themes/default/icon/admin/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/icon/admin/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/icon/admin/infos.png b/themes/default/icon/admin/infos.png
new file mode 100644
index 000000000..dc8c8a457
--- /dev/null
+++ b/themes/default/icon/admin/infos.png
Binary files differ
diff --git a/themes/default/icon/caddie_add.png b/themes/default/icon/caddie_add.png
new file mode 100644
index 000000000..eb20f4e06
--- /dev/null
+++ b/themes/default/icon/caddie_add.png
Binary files differ
diff --git a/themes/default/icon/calendar.png b/themes/default/icon/calendar.png
new file mode 100644
index 000000000..e0a44a13d
--- /dev/null
+++ b/themes/default/icon/calendar.png
Binary files differ
diff --git a/themes/default/icon/calendar_created.png b/themes/default/icon/calendar_created.png
new file mode 100644
index 000000000..14a84c43c
--- /dev/null
+++ b/themes/default/icon/calendar_created.png
Binary files differ
diff --git a/themes/default/icon/category_children.png b/themes/default/icon/category_children.png
new file mode 100644
index 000000000..7205c3f61
--- /dev/null
+++ b/themes/default/icon/category_children.png
Binary files differ
diff --git a/themes/default/icon/category_edit.png b/themes/default/icon/category_edit.png
new file mode 100644
index 000000000..0f3b619ed
--- /dev/null
+++ b/themes/default/icon/category_edit.png
Binary files differ
diff --git a/themes/default/icon/category_representant_random.png b/themes/default/icon/category_representant_random.png
new file mode 100644
index 000000000..dfa69846f
--- /dev/null
+++ b/themes/default/icon/category_representant_random.png
Binary files differ
diff --git a/themes/default/icon/datepicker.png b/themes/default/icon/datepicker.png
new file mode 100644
index 000000000..bbb299207
--- /dev/null
+++ b/themes/default/icon/datepicker.png
Binary files differ
diff --git a/themes/default/icon/dec_period.png b/themes/default/icon/dec_period.png
new file mode 100644
index 000000000..107cd16ec
--- /dev/null
+++ b/themes/default/icon/dec_period.png
Binary files differ
diff --git a/themes/default/icon/dec_period_unactive.png b/themes/default/icon/dec_period_unactive.png
new file mode 100644
index 000000000..5bc67affd
--- /dev/null
+++ b/themes/default/icon/dec_period_unactive.png
Binary files differ
diff --git a/themes/default/icon/del_all_favorites.png b/themes/default/icon/del_all_favorites.png
new file mode 100644
index 000000000..cfc609749
--- /dev/null
+++ b/themes/default/icon/del_all_favorites.png
Binary files differ
diff --git a/themes/default/icon/del_favorite.png b/themes/default/icon/del_favorite.png
new file mode 100644
index 000000000..cfc609749
--- /dev/null
+++ b/themes/default/icon/del_favorite.png
Binary files differ
diff --git a/themes/default/icon/delete.png b/themes/default/icon/delete.png
new file mode 100644
index 000000000..af10be03e
--- /dev/null
+++ b/themes/default/icon/delete.png
Binary files differ
diff --git a/themes/default/icon/edit.png b/themes/default/icon/edit.png
new file mode 100644
index 000000000..9c755cda1
--- /dev/null
+++ b/themes/default/icon/edit.png
Binary files differ
diff --git a/themes/default/icon/exit.png b/themes/default/icon/exit.png
new file mode 100644
index 000000000..2aafbb4cb
--- /dev/null
+++ b/themes/default/icon/exit.png
Binary files differ
diff --git a/themes/default/icon/favicon.ico b/themes/default/icon/favicon.ico
new file mode 100644
index 000000000..d7a1d89fd
--- /dev/null
+++ b/themes/default/icon/favicon.ico
Binary files differ
diff --git a/themes/default/icon/favorite.png b/themes/default/icon/favorite.png
new file mode 100644
index 000000000..58befd9e3
--- /dev/null
+++ b/themes/default/icon/favorite.png
Binary files differ
diff --git a/themes/default/icon/first.png b/themes/default/icon/first.png
new file mode 100644
index 000000000..2b8db1cff
--- /dev/null
+++ b/themes/default/icon/first.png
Binary files differ
diff --git a/themes/default/icon/first_unactive.png b/themes/default/icon/first_unactive.png
new file mode 100644
index 000000000..f0c0364f2
--- /dev/null
+++ b/themes/default/icon/first_unactive.png
Binary files differ
diff --git a/themes/default/icon/flat.png b/themes/default/icon/flat.png
new file mode 100644
index 000000000..43584e825
--- /dev/null
+++ b/themes/default/icon/flat.png
Binary files differ
diff --git a/themes/default/icon/help.png b/themes/default/icon/help.png
new file mode 100644
index 000000000..c76f68292
--- /dev/null
+++ b/themes/default/icon/help.png
Binary files differ
diff --git a/themes/default/icon/home.png b/themes/default/icon/home.png
new file mode 100644
index 000000000..cce450d85
--- /dev/null
+++ b/themes/default/icon/home.png
Binary files differ
diff --git a/themes/default/icon/inc_period.png b/themes/default/icon/inc_period.png
new file mode 100644
index 000000000..28fef3d1b
--- /dev/null
+++ b/themes/default/icon/inc_period.png
Binary files differ
diff --git a/themes/default/icon/inc_period_unactive.png b/themes/default/icon/inc_period_unactive.png
new file mode 100644
index 000000000..f45507dce
--- /dev/null
+++ b/themes/default/icon/inc_period_unactive.png
Binary files differ
diff --git a/themes/default/icon/index.php b/themes/default/icon/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/icon/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/icon/last.png b/themes/default/icon/last.png
new file mode 100644
index 000000000..12e1367a7
--- /dev/null
+++ b/themes/default/icon/last.png
Binary files differ
diff --git a/themes/default/icon/last_unactive.png b/themes/default/icon/last_unactive.png
new file mode 100644
index 000000000..90469d5c4
--- /dev/null
+++ b/themes/default/icon/last_unactive.png
Binary files differ
diff --git a/themes/default/icon/left.png b/themes/default/icon/left.png
new file mode 100644
index 000000000..63d306c9c
--- /dev/null
+++ b/themes/default/icon/left.png
Binary files differ
diff --git a/themes/default/icon/left_unactive.png b/themes/default/icon/left_unactive.png
new file mode 100644
index 000000000..0aefc64e4
--- /dev/null
+++ b/themes/default/icon/left_unactive.png
Binary files differ
diff --git a/themes/default/icon/lost_password.png b/themes/default/icon/lost_password.png
new file mode 100644
index 000000000..ad6d71422
--- /dev/null
+++ b/themes/default/icon/lost_password.png
Binary files differ
diff --git a/themes/default/icon/metadata.png b/themes/default/icon/metadata.png
new file mode 100644
index 000000000..d5d8fa6dc
--- /dev/null
+++ b/themes/default/icon/metadata.png
Binary files differ
diff --git a/themes/default/icon/mimetypes/avi.png b/themes/default/icon/mimetypes/avi.png
new file mode 100644
index 000000000..065f0b282
--- /dev/null
+++ b/themes/default/icon/mimetypes/avi.png
Binary files differ
diff --git a/themes/default/icon/mimetypes/index.php b/themes/default/icon/mimetypes/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/icon/mimetypes/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/icon/mimetypes/mp3.png b/themes/default/icon/mimetypes/mp3.png
new file mode 100644
index 000000000..afb7e1b0a
--- /dev/null
+++ b/themes/default/icon/mimetypes/mp3.png
Binary files differ
diff --git a/themes/default/icon/mimetypes/mpg.png b/themes/default/icon/mimetypes/mpg.png
new file mode 100644
index 000000000..f7dbd2388
--- /dev/null
+++ b/themes/default/icon/mimetypes/mpg.png
Binary files differ
diff --git a/themes/default/icon/mimetypes/ogg.png b/themes/default/icon/mimetypes/ogg.png
new file mode 100644
index 000000000..ead3f62c3
--- /dev/null
+++ b/themes/default/icon/mimetypes/ogg.png
Binary files differ
diff --git a/themes/default/icon/mimetypes/zip.png b/themes/default/icon/mimetypes/zip.png
new file mode 100644
index 000000000..1f08fe1a3
--- /dev/null
+++ b/themes/default/icon/mimetypes/zip.png
Binary files differ
diff --git a/themes/default/icon/normal_mode.png b/themes/default/icon/normal_mode.png
new file mode 100644
index 000000000..92d27a234
--- /dev/null
+++ b/themes/default/icon/normal_mode.png
Binary files differ
diff --git a/themes/default/icon/note.png b/themes/default/icon/note.png
new file mode 100644
index 000000000..5849f791b
--- /dev/null
+++ b/themes/default/icon/note.png
Binary files differ
diff --git a/themes/default/icon/pause.png b/themes/default/icon/pause.png
new file mode 100644
index 000000000..6a3928c51
--- /dev/null
+++ b/themes/default/icon/pause.png
Binary files differ
diff --git a/themes/default/icon/play.png b/themes/default/icon/play.png
new file mode 100644
index 000000000..dfde7e96a
--- /dev/null
+++ b/themes/default/icon/play.png
Binary files differ
diff --git a/themes/default/icon/preferences.png b/themes/default/icon/preferences.png
new file mode 100644
index 000000000..0f3b619ed
--- /dev/null
+++ b/themes/default/icon/preferences.png
Binary files differ
diff --git a/themes/default/icon/rating-stars.gif b/themes/default/icon/rating-stars.gif
new file mode 100644
index 000000000..535443e06
--- /dev/null
+++ b/themes/default/icon/rating-stars.gif
Binary files differ
diff --git a/themes/default/icon/recent.png b/themes/default/icon/recent.png
new file mode 100644
index 000000000..78c1428ca
--- /dev/null
+++ b/themes/default/icon/recent.png
Binary files differ
diff --git a/themes/default/icon/recent_by_child.png b/themes/default/icon/recent_by_child.png
new file mode 100644
index 000000000..48e2b4bf7
--- /dev/null
+++ b/themes/default/icon/recent_by_child.png
Binary files differ
diff --git a/themes/default/icon/register.png b/themes/default/icon/register.png
new file mode 100644
index 000000000..d1dd3c834
--- /dev/null
+++ b/themes/default/icon/register.png
Binary files differ
diff --git a/themes/default/icon/remove_s.png b/themes/default/icon/remove_s.png
new file mode 100644
index 000000000..c78c38f17
--- /dev/null
+++ b/themes/default/icon/remove_s.png
Binary files differ
diff --git a/themes/default/icon/representative.png b/themes/default/icon/representative.png
new file mode 100644
index 000000000..f1141d91b
--- /dev/null
+++ b/themes/default/icon/representative.png
Binary files differ
diff --git a/themes/default/icon/right.png b/themes/default/icon/right.png
new file mode 100644
index 000000000..f998098e4
--- /dev/null
+++ b/themes/default/icon/right.png
Binary files differ
diff --git a/themes/default/icon/right_unactive.png b/themes/default/icon/right_unactive.png
new file mode 100644
index 000000000..cf2f9614c
--- /dev/null
+++ b/themes/default/icon/right_unactive.png
Binary files differ
diff --git a/themes/default/icon/save.png b/themes/default/icon/save.png
new file mode 100644
index 000000000..b4b9da08b
--- /dev/null
+++ b/themes/default/icon/save.png
Binary files differ
diff --git a/themes/default/icon/search_rules.png b/themes/default/icon/search_rules.png
new file mode 100644
index 000000000..300186647
--- /dev/null
+++ b/themes/default/icon/search_rules.png
Binary files differ
diff --git a/themes/default/icon/start_filter.png b/themes/default/icon/start_filter.png
new file mode 100644
index 000000000..3d81a4d2e
--- /dev/null
+++ b/themes/default/icon/start_filter.png
Binary files differ
diff --git a/themes/default/icon/start_repeat.png b/themes/default/icon/start_repeat.png
new file mode 100644
index 000000000..74272979e
--- /dev/null
+++ b/themes/default/icon/start_repeat.png
Binary files differ
diff --git a/themes/default/icon/start_slideshow.png b/themes/default/icon/start_slideshow.png
new file mode 100644
index 000000000..9733eb445
--- /dev/null
+++ b/themes/default/icon/start_slideshow.png
Binary files differ
diff --git a/themes/default/icon/stop_filter.png b/themes/default/icon/stop_filter.png
new file mode 100644
index 000000000..1ff012e96
--- /dev/null
+++ b/themes/default/icon/stop_filter.png
Binary files differ
diff --git a/themes/default/icon/stop_repeat.png b/themes/default/icon/stop_repeat.png
new file mode 100644
index 000000000..f1cc1b564
--- /dev/null
+++ b/themes/default/icon/stop_repeat.png
Binary files differ
diff --git a/themes/default/icon/stop_slideshow.png b/themes/default/icon/stop_slideshow.png
new file mode 100644
index 000000000..7b8d3ac26
--- /dev/null
+++ b/themes/default/icon/stop_slideshow.png
Binary files differ
diff --git a/themes/default/icon/tag_cloud.png b/themes/default/icon/tag_cloud.png
new file mode 100644
index 000000000..79d7bc250
--- /dev/null
+++ b/themes/default/icon/tag_cloud.png
Binary files differ
diff --git a/themes/default/icon/tag_letters.png b/themes/default/icon/tag_letters.png
new file mode 100644
index 000000000..d452db7ec
--- /dev/null
+++ b/themes/default/icon/tag_letters.png
Binary files differ
diff --git a/themes/default/icon/up.png b/themes/default/icon/up.png
new file mode 100644
index 000000000..0c9cda5b1
--- /dev/null
+++ b/themes/default/icon/up.png
Binary files differ
diff --git a/themes/default/icon/validate_s.png b/themes/default/icon/validate_s.png
new file mode 100644
index 000000000..400bf8a24
--- /dev/null
+++ b/themes/default/icon/validate_s.png
Binary files differ
diff --git a/themes/default/index.php b/themes/default/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/js/datepicker.js b/themes/default/js/datepicker.js
new file mode 100644
index 000000000..743cf65cd
--- /dev/null
+++ b/themes/default/js/datepicker.js
@@ -0,0 +1,191 @@
+// initialize controls
+// buttonImageName: Directory and name of calendar picture
+// day, month, year: selectors of visible date controls
+// linked_date: selector of hidden linked dates control
+// checked_on_change: selector of control to change "checked" attribut
+// min_linked_date: selector of hidden linked date control witch give min value
+// max_linked_date: selector of hidden linked date control witch give max value
+function pwg_common_initialization_datepicker(buttonImageName, day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
+{
+ // return formated date with control values
+ function pwg_get_fmt_from_ctrls()
+ {
+ return $(year).val() + "-" + $(month).val() + "-" + $(day).val();
+ }
+
+ // return if linked_date is valid date
+ function is_valid_linked_value(linked_date_name)
+ {
+ array_date = $(linked_date_name).val().split('-');
+ return (
+ (array_date.length == 3) &&
+ (array_date[0] != "") &&
+ (array_date[1] != "") && (array_date[1] != "0") &&
+ (array_date[2] != "") && (array_date[2] != "0")
+ )
+ }
+
+ // Action on change date value
+ function pwg_on_date_change()
+ {
+ pwg_check_date();
+ if (checked_on_change != null)
+ {
+ $(checked_on_change).attr("checked", "true");
+ }
+ }
+
+ // In order to desable element of list
+ function pwg_disabled_selection()
+ {
+ array_date = $(linked_date).val().split('-');
+ y = array_date[0];
+ m = array_date[1];
+
+ // Init list
+ $(day + " option").attr("disabled", "");
+ $(month + " option").attr("disabled", "");
+
+ var daysInMonth = 32 - new Date(y, m - 1, 32).getDate();
+ $(day + " option:gt(" + (daysInMonth) +")").attr("disabled", "disabled");
+
+ if ((min_linked_date != null) && (is_valid_linked_value(min_linked_date) == true))
+ {
+ date_cmp = min_linked_date;
+ op_cmp = "lt";
+ }
+ else if ((max_linked_date != null) && (is_valid_linked_value(max_linked_date) == true))
+ {
+ date_cmp = max_linked_date;
+ op_cmp = "gt";
+ }
+ else
+ {
+ date_cmp = null;
+ op_cmp = null;
+ }
+
+ if (op_cmp != null)
+ {
+ array_date = $(date_cmp).val().split('-');
+ y_cmp = array_date[0];
+ m_cmp = array_date[1];
+ d_cmp = array_date[2];
+
+ if (y == y_cmp)
+ {
+ $(month + " option:" + op_cmp + "(" + (m_cmp) +")").attr("disabled", "disabled");
+ if (op_cmp == "lt")
+ {
+ $(month + " option:eq(" + (0) +")").attr("disabled", "");
+ }
+
+ if (m == m_cmp)
+ {
+ $(day + " option:" + op_cmp + "(" + (d_cmp) +")").attr("disabled", "disabled");
+ if (op_cmp == "lt")
+ {
+ $(day + " option:eq(" + (0) +")").attr("disabled", "");
+ }
+ }
+ }
+ }
+ }
+
+ // Prevent selection of invalid dates through the select controls
+ function pwg_check_date()
+ {
+ last_date = $(linked_date).val();
+
+ $(linked_date).val(pwg_get_fmt_from_ctrls());
+
+ if ((min_linked_date != null) && (is_valid_linked_value(min_linked_date)))
+ {
+ cancel = ($(min_linked_date).datepicker("getDate") > $(linked_date).datepicker("getDate"));
+ }
+ else if ((max_linked_date != null) && (is_valid_linked_value(max_linked_date)))
+ {
+ cancel = ($(max_linked_date).datepicker("getDate") < $(linked_date).datepicker("getDate"));
+ }
+ else
+ {
+ cancel = false;
+ }
+
+ if (cancel)
+ {
+ array_date = last_date.split('-');
+ $(year).val(array_date[0]);
+ $(month).val(array_date[1]);
+ $(day).val(array_date[2]);
+ // check again
+ pwg_check_date();
+ }
+ }
+
+ jQuery().ready(function(){
+ // Init hidden value
+ $(linked_date).val(pwg_get_fmt_from_ctrls());
+
+ // Init Datepicker
+ jQuery(linked_date).datepicker({
+ dateFormat:'yy-m-d',
+ beforeShow:
+ // Prepare to show a date picker linked to three select controls
+ function readLinked(input) {
+ if (min_linked_date != null)
+ {
+ return {minDate: $(min_linked_date).datepicker("getDate")};
+ }
+ else if (max_linked_date != null)
+ {
+ return {maxDate: $(max_linked_date).datepicker("getDate")};
+ }
+ else
+ {
+ return {};
+ }
+ },
+ onSelect:
+ // Update three select controls to match a date picker selection
+ function updateLinked(date) {
+ if (date.length == 0)
+ {
+ $(year).val("");
+ $(month).val("0");
+ $(day).val("0");
+ }
+ else
+ {
+ array_date = date.split('-');
+ $(year).val(array_date[0]);
+ $(month).val(array_date[1]);
+ $(day).val(array_date[2]);
+ }
+ pwg_on_date_change();
+ },
+ showOn: "both",
+ buttonImage: buttonImageName,
+ buttonImageOnly: true,
+ buttonText: ""
+ });
+
+ // Check showed controls
+ jQuery(day + ", " + month + ", " + year).change(
+ function ()
+ {
+ pwg_on_date_change();
+ });
+
+ // Check showed controls
+ jQuery(day + ", " + month + ", " + year).focus(
+ function ()
+ {
+ pwg_disabled_selection();
+ });
+
+ // In order to init linked input
+ pwg_check_date();
+ });
+
+}
diff --git a/themes/default/js/jquery.js b/themes/default/js/jquery.js
new file mode 100644
index 000000000..109701084
--- /dev/null
+++ b/themes/default/js/jquery.js
@@ -0,0 +1,6078 @@
+/*!
+ * jQuery JavaScript Library v1.4.1
+ * 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: Mon Jan 25 19:43:33 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+
+ // Used for trimming whitespace
+ rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwnProperty = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ indexOf = Array.prototype.indexOf;
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+ }
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ if ( elem ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && /^\w+$/.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.isArray( selector ) ?
+ this.setArray( selector ) :
+ jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.1",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery( elems || null );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Force the current matched set of elements to become
+ // the specified array of elements (destroying the stack in the process)
+ // You should use pushStack() in order to do this, but maintain the stack
+ setArray: function( elems ) {
+ // Resetting the length to 0, then using the native Array push
+ // is a super-fast way to populate an object with array-like properties
+ this.length = 0;
+ push.apply( this, elems );
+
+ return this;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging object literal values or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
+ var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
+ : jQuery.isArray(copy) ? [] : {};
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // Handle when the DOM is ready
+ ready: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 13 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn, i = 0;
+ while ( (fn = readyList[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Reset the list of functions
+ readyList = null;
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ return jQuery.ready();
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return toString.call(obj) === "[object Function]";
+ },
+
+ isArray: function( obj ) {
+ return toString.call(obj) === "[object Array]";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor
+ && !hasOwnProperty.call(obj, "constructor")
+ && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwnProperty.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] || document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ trim: function( text ) {
+ return (text || "").replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length, j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [];
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ if ( !inv !== !callback( elems[ i ], i ) ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch( error ) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+function evalScript( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+}
+
+// Mutifunctional method to get and set values to a collection
+// The value/s can be optionally by executed if its a function
+function access( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : null;
+}
+
+function now() {
+ return (new Date).getTime();
+}
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + now();
+
+ div.style.display = "none";
+ div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0];
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+
+ // Will be defined later
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null
+ };
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
+ // (IE doesn't support this, fails, and uses .text instead)
+ if ( window[ id ] ) {
+ jQuery.support.scriptEval = true;
+ delete window[ id ];
+ }
+
+ root.removeChild( script );
+
+ if ( div.attachEvent && div.fireEvent ) {
+ div.attachEvent("onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ jQuery.support.noCloneEvent = false;
+ div.detachEvent("onclick", click);
+ });
+ div.cloneNode(true).fireEvent("onclick");
+ }
+
+ div = document.createElement("div");
+ div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
+
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+ // Figure out if the W3C box model works as expected
+ // document.body must exist before we can do this
+ jQuery(function() {
+ var div = document.createElement("div");
+ div.style.width = div.style.paddingLeft = "1px";
+
+ document.body.appendChild( div );
+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+ document.body.removeChild( div ).style.display = 'none';
+ div = null;
+ });
+
+ // Technique from Juriy Zaytsev
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
+ };
+
+ jQuery.support.submitBubbles = eventSupported("submit");
+ jQuery.support.changeBubbles = eventSupported("change");
+
+ // release memory in IE
+ root = script = div = all = a = null;
+})();
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
+var expando = "jQuery" + now(), uuid = 0, windowData = {};
+var emptyObject = {};
+
+jQuery.extend({
+ cache: {},
+
+ expando:expando,
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ "object": true,
+ "applet": true
+ },
+
+ data: function( elem, name, data ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var id = elem[ expando ], cache = jQuery.cache, thisCache;
+
+ // Handle the case where there's no name immediately
+ if ( !name && !id ) {
+ return null;
+ }
+
+ // Compute a unique ID for the element
+ if ( !id ) {
+ id = ++uuid;
+ }
+
+ // Avoid generating a new cache unless none exists and we
+ // want to manipulate it.
+ if ( typeof name === "object" ) {
+ elem[ expando ] = id;
+ thisCache = cache[ id ] = jQuery.extend(true, {}, name);
+ } else if ( cache[ id ] ) {
+ thisCache = cache[ id ];
+ } else if ( typeof data === "undefined" ) {
+ thisCache = emptyObject;
+ } else {
+ thisCache = cache[ id ] = {};
+ }
+
+ // Prevent overriding the named cache with undefined values
+ if ( data !== undefined ) {
+ elem[ expando ] = id;
+ thisCache[ name ] = data;
+ }
+
+ return typeof name === "string" ? thisCache[ name ] : thisCache;
+ },
+
+ removeData: function( elem, name ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
+
+ // If we want to remove a specific section of the element's data
+ if ( name ) {
+ if ( thisCache ) {
+ // Remove the section of cache data
+ delete thisCache[ name ];
+
+ // If we've removed all the data, remove the element's cache
+ if ( jQuery.isEmptyObject(thisCache) ) {
+ jQuery.removeData( elem );
+ }
+ }
+
+ // Otherwise, we want to remove all of the element's data
+ } else {
+ // Clean up the element expando
+ try {
+ delete elem[ expando ];
+ } catch( e ) {
+ // IE has trouble directly removing the expando
+ // but it's ok with using removeAttribute
+ if ( elem.removeAttribute ) {
+ elem.removeAttribute( expando );
+ }
+ }
+
+ // Completely remove the data cache
+ delete cache[ id ];
+ }
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ if ( typeof key === "undefined" && this.length ) {
+ return jQuery.data( this[0] );
+
+ } else if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ var parts = key.split(".");
+ parts[1] = parts[1] ? "." + parts[1] : "";
+
+ if ( value === undefined ) {
+ var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+ if ( data === undefined && this.length ) {
+ data = jQuery.data( this[0], key );
+ }
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ } else {
+ return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
+ jQuery.data( this, key, value );
+ });
+ }
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ if ( !elem ) {
+ return;
+ }
+
+ type = (type || "fx") + "queue";
+ var q = jQuery.data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( !data ) {
+ return q || [];
+ }
+
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery.data( elem, type, jQuery.makeArray(data) );
+
+ } else {
+ q.push( data );
+ }
+
+ return q;
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ), fn = queue.shift();
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift("inprogress");
+ }
+
+ fn.call(elem, function() {
+ jQuery.dequeue(elem, type);
+ });
+ }
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ }
+
+ if ( data === undefined ) {
+ return jQuery.queue( this[0], type );
+ }
+ return this.each(function( i, elem ) {
+ var queue = jQuery.queue( this, type, data );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function() {
+ var elem = this;
+ setTimeout(function() {
+ jQuery.dequeue( elem, type );
+ }, time );
+ });
+ },
+
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ }
+});
+var rclass = /[\n\t]/g,
+ rspace = /\s+/,
+ rreturn = /\r/g,
+ rspecialurl = /href|src|style/,
+ rtype = /(button|input)/i,
+ rfocusable = /(button|input|object|select|textarea)/i,
+ rclickable = /^(a|area)$/i,
+ rradiocheck = /radio|checkbox/;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, name, value, true, jQuery.attr );
+ },
+
+ removeAttr: function( name, fn ) {
+ return this.each(function(){
+ jQuery.attr( this, name, "" );
+ if ( this.nodeType === 1 ) {
+ this.removeAttribute( name );
+ }
+ });
+ },
+
+ addClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.addClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ var classNames = (value || "").split( rspace );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className ) {
+ elem.className = value;
+
+ } else {
+ var className = " " + elem.className + " ";
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+ elem.className += " " + classNames[c];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.removeClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( (value && typeof value === "string") || value === undefined ) {
+ var classNames = (value || "").split(rspace);
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ var className = (" " + elem.className + " ").replace(rclass, " ");
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[c] + " ", " ");
+ }
+ elem.className = className.substring(1, className.length - 1);
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value, isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className, i = 0, self = jQuery(this),
+ state = stateVal,
+ classNames = value.split( rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery.data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ";
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ if ( value === undefined ) {
+ var elem = this[0];
+
+ if ( elem ) {
+ if ( jQuery.nodeName( elem, "option" ) ) {
+ return (elem.attributes.value || {}).specified ? elem.value : elem.text;
+ }
+
+ // We need to handle select boxes special
+ if ( jQuery.nodeName( elem, "select" ) ) {
+ var index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+ var option = options[ i ];
+
+ if ( option.selected ) {
+ // Get the specifc value for the option
+ value = jQuery(option).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ }
+
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+
+
+ // Everything else, we just grab the value
+ return (elem.value || "").replace(rreturn, "");
+
+ }
+
+ return undefined;
+ }
+
+ var isFunction = jQuery.isFunction(value);
+
+ return this.each(function(i) {
+ var self = jQuery(this), val = value;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call(this, i, self.val());
+ }
+
+ // Typecast each time if the value is a Function and the appended
+ // value is therefore different each time.
+ if ( typeof val === "number" ) {
+ val += "";
+ }
+
+ if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+ this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+ } else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = jQuery.makeArray(val);
+
+ jQuery( "option", this ).each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ this.selectedIndex = -1;
+ }
+
+ } else {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attr: function( elem, name, value, pass ) {
+ // don't set attributes on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery(elem)[name](value);
+ }
+
+ var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
+ // Whether we are setting (or getting)
+ set = value !== undefined;
+
+ // Try to normalize/fix the name
+ name = notxml && jQuery.props[ name ] || name;
+
+ // Only do all the following if this is a node (faster for style)
+ if ( elem.nodeType === 1 ) {
+ // These attributes require special treatment
+ var special = rspecialurl.test( name );
+
+ // Safari mis-reports the default selected property of an option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
+
+ // If applicable, access the attribute via the DOM 0 way
+ if ( name in elem && notxml && !special ) {
+ if ( set ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ }
+
+ elem[ name ] = value;
+ }
+
+ // browsers index elements by id/name on forms, give priority to attributes.
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+ return elem.getAttributeNode( name ).nodeValue;
+ }
+
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+
+ return elem[ name ];
+ }
+
+ if ( !jQuery.support.style && notxml && name === "style" ) {
+ if ( set ) {
+ elem.style.cssText = "" + value;
+ }
+
+ return elem.style.cssText;
+ }
+
+ if ( set ) {
+ // convert the value to a string (all browsers do this but IE) see #1070
+ elem.setAttribute( name, "" + value );
+ }
+
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
+ // Some attributes require a special call on IE
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return attr === null ? undefined : attr;
+ }
+
+ // elem is actually elem.style ... set the style
+ // Using attr for specific style information is now deprecated. Use style insead.
+ return jQuery.style( elem, name, value );
+ }
+});
+var fcleanup = function( nm ) {
+ return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
+ return "\\" + ch;
+ });
+};
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function( elem, types, handler, data ) {
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
+ elem = window;
+ }
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // if data is passed, bind to handler
+ if ( data !== undefined ) {
+ // Create temporary function pointer to original handler
+ var fn = handler;
+
+ // Create unique handler function, wrapped around original handler
+ handler = jQuery.proxy( fn );
+
+ // Store data in unique handler
+ handler.data = data;
+ }
+
+ // Init the element's event structure
+ var events = jQuery.data( elem, "events" ) || jQuery.data( elem, "events", {} ),
+ handle = jQuery.data( elem, "handle" ), eventHandle;
+
+ if ( !handle ) {
+ eventHandle = function() {
+ // Handle the second event of a trigger and when
+ // an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+
+ handle = jQuery.data( elem, "handle", eventHandle );
+ }
+
+ // If no handle is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !handle ) {
+ return;
+ }
+
+ // Add elem as a property of the handle function
+ // This is to prevent a memory leak with non-native
+ // event in IE.
+ handle.elem = elem;
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = types.split( /\s+/ );
+
+ var type, i = 0;
+
+ while ( (type = types[ i++ ]) ) {
+ // Namespaced event handlers
+ var namespaces = type.split(".");
+ type = namespaces.shift();
+
+ if ( i > 1 ) {
+ handler = jQuery.proxy( handler );
+
+ if ( data !== undefined ) {
+ handler.data = data;
+ }
+ }
+
+ handler.type = namespaces.slice(0).sort().join(".");
+
+ // Get the current list of functions bound to this event
+ var handlers = events[ type ],
+ special = this.special[ type ] || {};
+
+ // Init the event handler queue
+ if ( !handlers ) {
+ handlers = events[ type ] = {};
+
+ // Check for a special event handler
+ // Only use addEventListener/attachEvent if the special
+ // events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, handler) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, handle, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, handle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers );
+ if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
+ modifiedHandler.guid = modifiedHandler.guid || handler.guid;
+ modifiedHandler.data = modifiedHandler.data || handler.data;
+ modifiedHandler.type = modifiedHandler.type || handler.type;
+ handler = modifiedHandler;
+ }
+ }
+
+ // Add the function to the element's handler list
+ handlers[ handler.guid ] = handler;
+
+ // Keep track of which events have been used, for global triggering
+ this.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler ) {
+ // don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ var events = jQuery.data( elem, "events" ), ret, type, fn;
+
+ if ( events ) {
+ // Unbind all events for the element
+ if ( types === undefined || (typeof types === "string" && types.charAt(0) === ".") ) {
+ for ( type in events ) {
+ this.remove( elem, type + (types || "") );
+ }
+ } else {
+ // types is actually an event object here
+ if ( types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(/\s+/);
+ var i = 0;
+ while ( (type = types[ i++ ]) ) {
+ // Namespaced event handlers
+ var namespaces = type.split(".");
+ type = namespaces.shift();
+ var all = !namespaces.length,
+ cleaned = jQuery.map( namespaces.slice(0).sort(), fcleanup ),
+ namespace = new RegExp("(^|\\.)" + cleaned.join("\\.(?:.*\\.)?") + "(\\.|$)"),
+ special = this.special[ type ] || {};
+
+ if ( events[ type ] ) {
+ // remove the given handler for the given type
+ if ( handler ) {
+ fn = events[ type ][ handler.guid ];
+ delete events[ type ][ handler.guid ];
+
+ // remove all handlers for the given type
+ } else {
+ for ( var handle in events[ type ] ) {
+ // Handle the removal of namespaced events
+ if ( all || namespace.test( events[ type ][ handle ].type ) ) {
+ delete events[ type ][ handle ];
+ }
+ }
+ }
+
+ if ( special.remove ) {
+ special.remove.call( elem, namespaces, fn);
+ }
+
+ // remove generic event handler if no more handlers exist
+ for ( ret in events[ type ] ) {
+ break;
+ }
+ if ( !ret ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, jQuery.data( elem, "handle" ), false );
+ } else if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, jQuery.data( elem, "handle" ) );
+ }
+ }
+ ret = null;
+ delete events[ type ];
+ }
+ }
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ for ( ret in events ) {
+ break;
+ }
+ if ( !ret ) {
+ var handle = jQuery.data( elem, "handle" );
+ if ( handle ) {
+ handle.elem = null;
+ }
+ jQuery.removeData( elem, "events" );
+ jQuery.removeData( elem, "handle" );
+ }
+ }
+ },
+
+ // bubbling is internal
+ trigger: function( event, data, elem /*, bubbling */ ) {
+ // Event object or event type
+ var type = event.type || event,
+ bubbling = arguments[3];
+
+ if ( !bubbling ) {
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[expando] ? event :
+ // Object literal
+ jQuery.extend( jQuery.Event(type), event ) :
+ // Just the event type (string)
+ jQuery.Event(type);
+
+ if ( type.indexOf("!") >= 0 ) {
+ event.type = type = type.slice(0, -1);
+ event.exclusive = true;
+ }
+
+ // Handle a global trigger
+ if ( !elem ) {
+ // Don't bubble custom events when global (to avoid too much overhead)
+ event.stopPropagation();
+
+ // Only trigger if we've ever bound an event for it
+ if ( this.global[ type ] ) {
+ jQuery.each( jQuery.cache, function() {
+ if ( this.events && this.events[type] ) {
+ jQuery.event.trigger( event, data, this.handle.elem );
+ }
+ });
+ }
+ }
+
+ // Handle triggering a single element
+
+ // don't do events on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ // Clean up in case it is reused
+ event.result = undefined;
+ event.target = elem;
+
+ // Clone the incoming data, if any
+ data = jQuery.makeArray( data );
+ data.unshift( event );
+ }
+
+ event.currentTarget = elem;
+
+ // Trigger the event, it is assumed that "handle" is a function
+ var handle = jQuery.data( elem, "handle" );
+ if ( handle ) {
+ handle.apply( elem, data );
+ }
+
+ var parent = elem.parentNode || elem.ownerDocument;
+
+ // Trigger an inline bound script
+ try {
+ if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+ if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+ event.result = false;
+ }
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (e) {}
+
+ if ( !event.isPropagationStopped() && parent ) {
+ jQuery.event.trigger( event, data, parent, true );
+
+ } else if ( !event.isDefaultPrevented() ) {
+ var target = event.target, old,
+ isClick = jQuery.nodeName(target, "a") && type === "click";
+
+ if ( !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+ try {
+ if ( target[ type ] ) {
+ // Make sure that we don't accidentally re-trigger the onFOO events
+ old = target[ "on" + type ];
+
+ if ( old ) {
+ target[ "on" + type ] = null;
+ }
+
+ this.triggered = true;
+ target[ type ]();
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (e) {}
+
+ if ( old ) {
+ target[ "on" + type ] = old;
+ }
+
+ this.triggered = false;
+ }
+ }
+ },
+
+ handle: function( event ) {
+ // returned undefined or false
+ var all, handlers;
+
+ event = arguments[0] = jQuery.event.fix( event || window.event );
+ event.currentTarget = this;
+
+ // Namespaced event handlers
+ var namespaces = event.type.split(".");
+ event.type = namespaces.shift();
+
+ // Cache this now, all = true means, any handler
+ all = !namespaces.length && !event.exclusive;
+
+ var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
+
+ handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
+
+ for ( var j in handlers ) {
+ var handler = handlers[ j ];
+
+ // Filter the functions by class
+ if ( all || namespace.test(handler.type) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handler;
+ event.data = handler.data;
+
+ var ret = handler.apply( this, arguments );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+
+ }
+ }
+
+ return event.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( event ) {
+ if ( event[ expando ] ) {
+ return event;
+ }
+
+ // store a copy of the original event object
+ // and "clone" to set read-only properties
+ var originalEvent = event;
+ event = jQuery.Event( originalEvent );
+
+ for ( var i = this.props.length, prop; i; ) {
+ prop = this.props[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary
+ if ( !event.target ) {
+ event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ }
+
+ // check if target is a textnode (safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && event.fromElement ) {
+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+ }
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && event.clientX != null ) {
+ var doc = document.documentElement, body = document.body;
+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+ }
+
+ // Add which for key events
+ if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
+ event.which = event.charCode || event.keyCode;
+ }
+
+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+ if ( !event.metaKey && event.ctrlKey ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && event.button !== undefined ) {
+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ }
+
+ return event;
+ },
+
+ // Deprecated, use jQuery.guid instead
+ guid: 1E8,
+
+ // Deprecated, use jQuery.proxy instead
+ proxy: jQuery.proxy,
+
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady,
+ teardown: jQuery.noop
+ },
+
+ live: {
+ add: function( proxy, data, namespaces, live ) {
+ jQuery.extend( proxy, data || {} );
+
+ proxy.guid += data.selector + data.live;
+ data.liveProxy = proxy;
+
+ jQuery.event.add( this, data.live, liveHandler, data );
+
+ },
+
+ remove: function( namespaces ) {
+ if ( namespaces.length ) {
+ var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
+
+ jQuery.each( (jQuery.data(this, "events").live || {}), function() {
+ if ( name.test(this.type) ) {
+ remove++;
+ }
+ });
+
+ if ( remove < 1 ) {
+ jQuery.event.remove( this, namespaces[0], liveHandler );
+ }
+ }
+ },
+ special: {}
+ },
+ beforeunload: {
+ setup: function( data, namespaces, fn ) {
+ // We only want to do this special case on windows
+ if ( this.setInterval ) {
+ this.onbeforeunload = fn;
+ }
+
+ return false;
+ },
+ teardown: function( namespaces, fn ) {
+ if ( this.onbeforeunload === fn ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ }
+};
+
+jQuery.Event = function( src ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = now();
+
+ // Mark it as fixed
+ this[ expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+ }
+ // otherwise set the returnValue property of the original event to false (IE)
+ e.returnValue = false;
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ parent = parent.parentNode;
+
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) {
+ break;
+ }
+ }
+
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
+
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+ event.type = event.data;
+ jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ setup: function( data ) {
+ jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+ },
+ teardown: function( data ) {
+ jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+ }
+ };
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+jQuery.event.special.submit = {
+ setup: function( data, namespaces, fn ) {
+ if ( this.nodeName.toLowerCase() !== "form" ) {
+ jQuery.event.add(this, "click.specialSubmit." + fn.guid, function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ } else {
+ return false;
+ }
+ },
+
+ remove: function( namespaces, fn ) {
+ jQuery.event.remove( this, "click.specialSubmit" + (fn ? "."+fn.guid : "") );
+ jQuery.event.remove( this, "keypress.specialSubmit" + (fn ? "."+fn.guid : "") );
+ }
+};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+var formElems = /textarea|input|select/i;
+
+function getVal( elem ) {
+ var type = elem.type, val = elem.value;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ val = elem.checked;
+
+ } else if ( type === "select-multiple" ) {
+ val = elem.selectedIndex > -1 ?
+ jQuery.map( elem.options, function( elem ) {
+ return elem.selected;
+ }).join("-") :
+ "";
+
+ } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ val = elem.selectedIndex;
+ }
+
+ return val;
+}
+
+function testChange( e ) {
+ var elem = e.target, data, val;
+
+ if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
+ return;
+ }
+
+ data = jQuery.data( elem, "_change_data" );
+ val = getVal(elem);
+
+ // the current data will be also retrieved by beforeactivate
+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
+ jQuery.data( elem, "_change_data", val );
+ }
+
+ if ( data === undefined || val === data ) {
+ return;
+ }
+
+ if ( data != null || val ) {
+ e.type = "change";
+ return jQuery.event.trigger( e, arguments[1], elem );
+ }
+}
+
+jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
+
+ click: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information/focus[in] is not needed anymore
+ beforeactivate: function( e ) {
+ var elem = e.target;
+
+ if ( elem.nodeName.toLowerCase() === "input" && elem.type === "radio" ) {
+ jQuery.data( elem, "_change_data", getVal(elem) );
+ }
+ }
+ },
+ setup: function( data, namespaces, fn ) {
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange." + fn.guid, changeFilters[type] );
+ }
+
+ return formElems.test( this.nodeName );
+ },
+ remove: function( namespaces, fn ) {
+ for ( var type in changeFilters ) {
+ jQuery.event.remove( this, type + ".specialChange" + (fn ? "."+fn.guid : ""), changeFilters[type] );
+ }
+
+ return formElems.test( this.nodeName );
+ }
+};
+
+var changeFilters = jQuery.event.special.change.filters;
+
+}
+
+function trigger( type, elem, args ) {
+ args[0].type = type;
+ return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ this.addEventListener( orig, handler, true );
+ },
+ teardown: function() {
+ this.removeEventListener( orig, handler, true );
+ }
+ };
+
+ function handler( e ) {
+ e = jQuery.event.fix( e );
+ e.type = fix;
+ return jQuery.event.handle.call( this, e );
+ }
+ });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+ jQuery.fn[ name ] = function( type, data, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" ) {
+ for ( var key in type ) {
+ this[ name ](key, data, type[key], fn);
+ }
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
+
+ var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+ jQuery( this ).unbind( event, handler );
+ return fn.apply( this, arguments );
+ }) : fn;
+
+ return type === "unload" && name !== "one" ?
+ this.one( type, data, fn ) :
+ this.each(function() {
+ jQuery.event.add( this, type, handler, data );
+ });
+ };
+});
+
+jQuery.fn.extend({
+ unbind: function( type, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" && !type.preventDefault ) {
+ for ( var key in type ) {
+ this.unbind(key, type[key]);
+ }
+ return this;
+ }
+
+ return this.each(function() {
+ jQuery.event.remove( this, type, fn );
+ });
+ },
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ var event = jQuery.Event( type );
+ event.preventDefault();
+ event.stopPropagation();
+ jQuery.event.trigger( event, data, this[0] );
+ return event.result;
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments, i = 1;
+
+ // link all the functions, so any of them can unbind this click handler
+ while ( i < args.length ) {
+ jQuery.proxy( fn, args[ i++ ] );
+ }
+
+ return this.click( jQuery.proxy( fn, function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ }));
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+jQuery.each(["live", "die"], function( i, name ) {
+ jQuery.fn[ name ] = function( types, data, fn ) {
+ var type, i = 0;
+
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
+
+ types = (types || "").split( /\s+/ );
+
+ while ( (type = types[ i++ ]) != null ) {
+ type = type === "focus" ? "focusin" : // focus --> focusin
+ type === "blur" ? "focusout" : // blur --> focusout
+ type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support
+ type;
+
+ if ( name === "live" ) {
+ // bind live handler
+ jQuery( this.context ).bind( liveConvert( type, this.selector ), {
+ data: data, selector: this.selector, live: type
+ }, fn );
+
+ } else {
+ // unbind live handler
+ jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );
+ }
+ }
+
+ return this;
+ }
+});
+
+function liveHandler( event ) {
+ var stop, elems = [], selectors = [], args = arguments,
+ related, match, fn, elem, j, i, l, data,
+ live = jQuery.extend({}, jQuery.data( this, "events" ).live);
+
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861)
+ if ( event.button && event.type === "click" ) {
+ return;
+ }
+
+ for ( j in live ) {
+ fn = live[j];
+ if ( fn.live === event.type ||
+ fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {
+
+ data = fn.data;
+ if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
+ !data.beforeFilter[event.type](event)) ) {
+ selectors.push( fn.selector );
+ }
+ } else {
+ delete live[j];
+ }
+ }
+
+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+ for ( i = 0, l = match.length; i < l; i++ ) {
+ for ( j in live ) {
+ fn = live[j];
+ elem = match[i].elem;
+ related = null;
+
+ if ( match[i].selector === fn.selector ) {
+ // Those two events require additional checking
+ if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
+ related = jQuery( event.relatedTarget ).closest( fn.selector )[0];
+ }
+
+ if ( !related || related !== elem ) {
+ elems.push({ elem: elem, fn: fn });
+ }
+ }
+ }
+ }
+
+ for ( i = 0, l = elems.length; i < l; i++ ) {
+ match = elems[i];
+ event.currentTarget = match.elem;
+ event.data = match.fn.data;
+ if ( match.fn.apply( match.elem, args ) === false ) {
+ stop = false;
+ break;
+ }
+ }
+
+ return stop;
+}
+
+function liveConvert( type, selector ) {
+ return "live." + (type ? type + "." : "") + selector.replace(/\./g, "`").replace(/ /g, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( fn ) {
+ return fn ? this.bind( name, fn ) : this.trigger( name );
+ };
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
+});
+
+// Prevent memory leaks in IE
+// Window isn't included so as not to unbind existing unload events
+// More info:
+// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
+if ( window.attachEvent && !window.addEventListener ) {
+ window.attachEvent("onunload", function() {
+ for ( var id in jQuery.cache ) {
+ if ( jQuery.cache[ id ].handle ) {
+ // Try/Catch is to handle iframes being unloaded, see #4280
+ try {
+ jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+ } catch(e) {}
+ }
+ }
+ });
+}
+/*!
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function(){
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function(selector, context, results, seed) {
+ results = results || [];
+ var origContext = context = context || document;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context );
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set );
+ }
+ }
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+ var ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+ }
+
+ if ( context ) {
+ var ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+ set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray(set);
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ var cur = parts.pop(), pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+ } else if ( context && context.nodeType === 1 ) {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+ } else {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function(results){
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort(sortOrder);
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[i-1] ) {
+ results.splice(i--, 1);
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function(expr, set){
+ return Sizzle(expr, null, null, set);
+};
+
+Sizzle.find = function(expr, context, isXML){
+ var set, match;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var type = Expr.order[i], match;
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ var left = match[1];
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace(/\\/g, "");
+ set = Expr.find[ type ]( match, context, isXML );
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = context.getElementsByTagName("*");
+ }
+
+ return {set: set, expr: expr};
+};
+
+Sizzle.filter = function(expr, set, inplace, not){
+ var old = expr, result = [], curLoop = set, match, anyFound,
+ isXMLFilter = set && set[0] && isXML(set[0]);
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ var filter = Expr.filter[ type ], found, item, left = match[1];
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ var pass = not ^ !!found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+ } else {
+ curLoop[i] = false;
+ }
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+ throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\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(elem){
+ return elem.getAttribute("href");
+ }
+ },
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !/\W/.test(part),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+ ">": function(checkSet, part){
+ var isPartStr = typeof part === "string";
+
+ if ( isPartStr && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+ } else {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+ "": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ var nodeCheck = part = part.toLowerCase();
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ },
+ "~": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ var nodeCheck = part = part.toLowerCase();
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ }
+ },
+ find: {
+ ID: function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? [m] : [];
+ }
+ },
+ NAME: function(match, context){
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [], results = context.getElementsByName(match[1]);
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+ TAG: function(match, context){
+ return context.getElementsByTagName(match[1]);
+ }
+ },
+ preFilter: {
+ CLASS: function(match, curLoop, inplace, result, not, isXML){
+ match = " " + match[1].replace(/\\/g, "") + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+ ID: function(match){
+ return match[1].replace(/\\/g, "");
+ },
+ TAG: function(match, curLoop){
+ return match[1].toLowerCase();
+ },
+ CHILD: function(match){
+ if ( match[1] === "nth" ) {
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+ ATTR: function(match, curLoop, inplace, result, not, isXML){
+ var name = match[1].replace(/\\/g, "");
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+ PSEUDO: function(match, curLoop, inplace, result, not){
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+ return false;
+ }
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+ POS: function(match){
+ match.unshift( true );
+ return match;
+ }
+ },
+ filters: {
+ enabled: function(elem){
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+ disabled: function(elem){
+ return elem.disabled === true;
+ },
+ checked: function(elem){
+ return elem.checked === true;
+ },
+ selected: function(elem){
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ elem.parentNode.selectedIndex;
+ return elem.selected === true;
+ },
+ parent: function(elem){
+ return !!elem.firstChild;
+ },
+ empty: function(elem){
+ return !elem.firstChild;
+ },
+ has: function(elem, i, match){
+ return !!Sizzle( match[3], elem ).length;
+ },
+ header: function(elem){
+ return /h\d/i.test( elem.nodeName );
+ },
+ text: function(elem){
+ return "text" === elem.type;
+ },
+ radio: function(elem){
+ return "radio" === elem.type;
+ },
+ checkbox: function(elem){
+ return "checkbox" === elem.type;
+ },
+ file: function(elem){
+ return "file" === elem.type;
+ },
+ password: function(elem){
+ return "password" === elem.type;
+ },
+ submit: function(elem){
+ return "submit" === elem.type;
+ },
+ image: function(elem){
+ return "image" === elem.type;
+ },
+ reset: function(elem){
+ return "reset" === elem.type;
+ },
+ button: function(elem){
+ return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+ },
+ input: function(elem){
+ return /input|select|textarea|button/i.test(elem.nodeName);
+ }
+ },
+ setFilters: {
+ first: function(elem, i){
+ return i === 0;
+ },
+ last: function(elem, i, match, array){
+ return i === array.length - 1;
+ },
+ even: function(elem, i){
+ return i % 2 === 0;
+ },
+ odd: function(elem, i){
+ return i % 2 === 1;
+ },
+ lt: function(elem, i, match){
+ return i < match[3] - 0;
+ },
+ gt: function(elem, i, match){
+ return i > match[3] - 0;
+ },
+ nth: function(elem, i, match){
+ return match[3] - 0 === i;
+ },
+ eq: function(elem, i, match){
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function(elem, match, i, array){
+ var name = match[1], filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var i = 0, l = not.length; i < l; i++ ) {
+ if ( not[i] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+ } else {
+ Sizzle.error( "Syntax error, unrecognized expression: " + name );
+ }
+ },
+ CHILD: function(elem, match){
+ var type = match[1], node = elem;
+ switch (type) {
+ case 'only':
+ case 'first':
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ if ( type === "first" ) {
+ return true;
+ }
+ node = elem;
+ case 'last':
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ return true;
+ case 'nth':
+ var first = match[2], last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ var doneName = match[0],
+ parent = elem.parentNode;
+
+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+ var count = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+ parent.sizcache = doneName;
+ }
+
+ var diff = elem.nodeIndex - last;
+ if ( first === 0 ) {
+ return diff === 0;
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+ ID: function(elem, match){
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+ TAG: function(elem, match){
+ return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+ },
+ CLASS: function(elem, match){
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+ ATTR: function(elem, match){
+ var name = match[1],
+ result = Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+ POS: function(elem, match, i, array){
+ var name = match[2], filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS;
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
+ return "\\" + (num - 0 + 1);
+ }));
+}
+
+var makeArray = function(array, results) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 );
+
+// Provide a fallback method if it does not work
+} catch(e){
+ makeArray = function(array, results) {
+ var ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var i = 0, l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+ } else {
+ for ( var i = 0; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( "sourceIndex" in document.documentElement ) {
+ sortOrder = function( a, b ) {
+ if ( !a.sourceIndex || !b.sourceIndex ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return a.sourceIndex ? -1 : 1;
+ }
+
+ var ret = a.sourceIndex - b.sourceIndex;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( document.createRange ) {
+ sortOrder = function( a, b ) {
+ if ( !a.ownerDocument || !b.ownerDocument ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return a.ownerDocument ? -1 : 1;
+ }
+
+ var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
+ aRange.setStart(a, 0);
+ aRange.setEnd(a, 0);
+ bRange.setStart(b, 0);
+ bRange.setEnd(b, 0);
+ var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+function getText( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date).getTime();
+ form.innerHTML = "<a name='" + id + "'/>";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ var root = document.documentElement;
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+ }
+ };
+
+ Expr.filter.ID = function(elem, match){
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+ root = form = null; // release memory in IE
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function(match, context){
+ var results = context.getElementsByTagName(match[1]);
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "<a href='#'></a>";
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+ Expr.attrHandle.href = function(elem){
+ return elem.getAttribute("href", 2);
+ };
+ }
+
+ div = null; // release memory in IE
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle, div = document.createElement("div");
+ div.innerHTML = "<p class='TEST'></p>";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function(query, context, extra, seed){
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && context.nodeType === 9 && !isXML(context) ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(e){}
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ div = null; // release memory in IE
+ })();
+}
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function(match, context, isXML) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ div = null; // release memory in IE
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+var contains = document.compareDocumentPosition ? function(a, b){
+ return a.compareDocumentPosition(b) & 16;
+} : function(a, b){
+ return a !== b && (a.contains ? a.contains(b) : true);
+};
+
+var isXML = function(elem){
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function(selector, context){
+ var tmpSet = [], later = "", match,
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.getText = getText;
+jQuery.isXMLDoc = isXML;
+jQuery.contains = contains;
+
+return;
+
+window.Sizzle = Sizzle;
+
+})();
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ slice = Array.prototype.slice;
+
+// Implement the identical functionality for filter and not
+var winnow = function( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return !!qualifier.call( elem, i, elem ) === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var ret = this.pushStack( "", "find", selector ), length = 0;
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( var n = length; n < ret.length; n++ ) {
+ for ( var r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target );
+ return this.filter(function() {
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && jQuery.filter( selector, this ).length > 0;
+ },
+
+ closest: function( selectors, context ) {
+ if ( jQuery.isArray( selectors ) ) {
+ var ret = [], cur = this[0], match, matches = {}, selector;
+
+ if ( cur && selectors.length ) {
+ for ( var i = 0, l = selectors.length; i < l; i++ ) {
+ selector = selectors[i];
+
+ if ( !matches[selector] ) {
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ jQuery( selector, context || this.context ) :
+ selector;
+ }
+ }
+
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ for ( selector in matches ) {
+ match = matches[selector];
+
+ if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+ ret.push({ selector: selector, elem: cur });
+ delete matches[selector];
+ }
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ return ret;
+ }
+
+ var pos = jQuery.expr.match.POS.test( selectors ) ?
+ jQuery( selectors, context || this.context ) : null;
+
+ return this.map(function( i, cur ) {
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
+ return cur;
+ }
+ cur = cur.parentNode;
+ }
+ return null;
+ });
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ if ( !elem || typeof elem === "string" ) {
+ return jQuery.inArray( this[0],
+ // If it receives a string, the selector is used
+ // If it receives nothing, the siblings are used
+ elem ? jQuery( elem ) : this.parent().children() );
+ }
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context || this.context ) :
+ jQuery.makeArray( selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return jQuery.nth( elem, 2, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return jQuery.nth( elem, 2, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( elem.parentNode.firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.makeArray( elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, slice.call(arguments).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [], cur = elem[dir];
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ nth: function( cur, result, dir, elem ) {
+ result = result || 1;
+ var num = 0;
+
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
+ break;
+ }
+ }
+
+ return cur;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
+ rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&\w+;/,
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // checked="checked" or checked (html5)
+ fcloseTag = function( all, front, tag ) {
+ return rselfClosing.test( tag ) ?
+ all :
+ front + "></" + tag + ">";
+ },
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ area: [ 1, "<map>", "</map>" ],
+ _default: [ 0, "", "" ]
+ };
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+ text: function( text ) {
+ if ( jQuery.isFunction(text) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.text( text.call(this, i, self.text()) );
+ });
+ }
+
+ if ( typeof text !== "object" && text !== undefined ) {
+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+ }
+
+ return jQuery.getText( this );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append(this);
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ), contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ return this.each(function() {
+ jQuery( this ).wrapAll( html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ } else if ( arguments.length ) {
+ var set = jQuery(arguments[0]);
+ set.push.apply( set, this.toArray() );
+ return this.pushStack( set, "before", arguments );
+ }
+ },
+
+ after: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ } else if ( arguments.length ) {
+ var set = this.pushStack( this, "after", arguments );
+ set.push.apply( set, jQuery(arguments[0]).toArray() );
+ return set;
+ }
+ },
+
+ clone: function( events ) {
+ // Do the clone
+ var ret = this.map(function() {
+ if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
+ // IE copies events bound via attachEvent when
+ // using cloneNode. Calling detachEvent on the
+ // clone will also remove the events from the orignal
+ // In order to get around this, we use innerHTML.
+ // Unfortunately, this means some modifications to
+ // attributes in IE that are actually only stored
+ // as properties will not be copied (such as the
+ // the name attribute on an input).
+ var html = this.outerHTML, ownerDocument = this.ownerDocument;
+ if ( !html ) {
+ var div = ownerDocument.createElement("div");
+ div.appendChild( this.cloneNode(true) );
+ html = div.innerHTML;
+ }
+
+ return jQuery.clean([html.replace(rinlinejQuery, "")
+ .replace(rleadingWhitespace, "")], ownerDocument)[0];
+ } else {
+ return this.cloneNode(true);
+ }
+ });
+
+ // Copy the events from the original to the clone
+ if ( events === true ) {
+ cloneCopyEvent( this, ret );
+ cloneCopyEvent( this.find("*"), ret.find("*") );
+ }
+
+ // Return the cloned set
+ return ret;
+ },
+
+ html: function( value ) {
+ if ( value === undefined ) {
+ return this[0] && this[0].nodeType === 1 ?
+ this[0].innerHTML.replace(rinlinejQuery, "") :
+ null;
+
+ // See if we can take a shortcut and just use innerHTML
+ } else if ( typeof value === "string" && !/<script/i.test( value ) &&
+ (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+ !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+ value = value.replace(rxhtmlTag, fcloseTag);
+
+ try {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( this[i].nodeType === 1 ) {
+ jQuery.cleanData( this[i].getElementsByTagName("*") );
+ this[i].innerHTML = value;
+ }
+ }
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {
+ this.empty().append( value );
+ }
+
+ } else if ( jQuery.isFunction( value ) ) {
+ this.each(function(i){
+ var self = jQuery(this), old = self.html();
+ self.empty().append(function(){
+ return value.call( this, i, old );
+ });
+ });
+
+ } else {
+ this.empty().append( value );
+ }
+
+ return this;
+ },
+
+ replaceWith: function( value ) {
+ if ( this[0] && this[0].parentNode ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( !jQuery.isFunction( value ) ) {
+ value = jQuery( value ).detach();
+
+ } else {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
+ });
+ }
+
+ return this.each(function() {
+ var next = this.nextSibling, parent = this.parentNode;
+
+ jQuery(this).remove();
+
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ } else {
+ return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
+ }
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+ var results, first, value = args[0], scripts = [];
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback, true );
+ });
+ }
+
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call(this, i, table ? self.html() : undefined);
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( this[0] ) {
+ // If we're in a fragment, just use that instead of building a new one
+ if ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {
+ results = { fragment: args[0].parentNode };
+ } else {
+ results = buildFragment( args, this, scripts );
+ }
+
+ first = results.fragment.firstChild;
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ callback.call(
+ table ?
+ root(this[i], first) :
+ this[i],
+ results.cacheable || this.length > 1 || i > 0 ?
+ results.fragment.cloneNode(true) :
+ results.fragment
+ );
+ }
+ }
+
+ if ( scripts ) {
+ jQuery.each( scripts, evalScript );
+ }
+ }
+
+ return this;
+
+ function root( elem, cur ) {
+ return jQuery.nodeName(elem, "table") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+ }
+ }
+});
+
+function cloneCopyEvent(orig, ret) {
+ var i = 0;
+
+ ret.each(function() {
+ if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
+ return;
+ }
+
+ var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( var type in events ) {
+ for ( var handler in events[ type ] ) {
+ jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
+ }
+ }
+ }
+ });
+}
+
+function buildFragment( args, nodes, scripts ) {
+ var fragment, cacheable, cacheresults, doc;
+
+ // webkit does not clone 'checked' attribute of radio inputs on cloneNode, so don't cache if string has a checked
+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+ cacheable = true;
+ cacheresults = jQuery.fragments[ args[0] ];
+ if ( cacheresults ) {
+ if ( cacheresults !== 1 ) {
+ fragment = cacheresults;
+ }
+ }
+ }
+
+ if ( !fragment ) {
+ doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+ fragment = doc.createDocumentFragment();
+ jQuery.clean( args, doc, fragment, scripts );
+ }
+
+ if ( cacheable ) {
+ jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+}
+
+jQuery.fragments = {};
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var ret = [], insert = jQuery( selector );
+
+ for ( var i = 0, l = insert.length; i < l; i++ ) {
+ var elems = (i > 0 ? this.clone(true) : this).get();
+ jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
+ ret = ret.concat( elems );
+ }
+ return this.pushStack( ret, name, insert.selector );
+ };
+});
+
+jQuery.each({
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
+ if ( !keepData && this.nodeType === 1 ) {
+ jQuery.cleanData( this.getElementsByTagName("*") );
+ jQuery.cleanData( [ this ] );
+ }
+
+ if ( this.parentNode ) {
+ this.parentNode.removeChild( this );
+ }
+ }
+ },
+
+ empty: function() {
+ // Remove element nodes and prevent memory leaks
+ if ( this.nodeType === 1 ) {
+ jQuery.cleanData( this.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( this.firstChild ) {
+ this.removeChild( this.firstChild );
+ }
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function() {
+ return this.each( fn, arguments );
+ };
+});
+
+jQuery.extend({
+ clean: function( elems, context, fragment, scripts ) {
+ context = context || document;
+
+ // !context.createElement fails in IE with an error but returns typeof 'object'
+ if ( typeof context.createElement === "undefined" ) {
+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+ }
+
+ var ret = [];
+
+ jQuery.each(elems, function( i, elem ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ return;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" && !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+
+ } else if ( typeof elem === "string" ) {
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, fcloseTag);
+
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+ wrap = wrapMap[ tag ] || wrapMap._default,
+ depth = wrap[0],
+ div = context.createElement("div");
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ var hasBody = rtbody.test(elem),
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( var j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = jQuery.makeArray( div.childNodes );
+ }
+
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ ret = jQuery.merge( ret, elem );
+ }
+
+ });
+
+ if ( fragment ) {
+ for ( var i = 0; ret[i]; i++ ) {
+ if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+ } else {
+ if ( ret[i].nodeType === 1 ) {
+ ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+ }
+ fragment.appendChild( ret[i] );
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ cleanData: function( elems ) {
+ for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {
+ jQuery.event.remove( elem );
+ jQuery.removeData( elem );
+ }
+ }
+});
+// exclude the following css properties to add px
+var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
+ ralpha = /alpha\([^)]*\)/,
+ ropacity = /opacity=([^)]*)/,
+ rfloat = /float/i,
+ rdashAlpha = /-([a-z])/ig,
+ rupper = /([A-Z])/g,
+ rnumpx = /^-?\d+(?:px)?$/i,
+ rnum = /^-?\d/,
+
+ cssShow = { position: "absolute", visibility: "hidden", display:"block" },
+ cssWidth = [ "Left", "Right" ],
+ cssHeight = [ "Top", "Bottom" ],
+
+ // cache check for defaultView.getComputedStyle
+ getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
+ // normalize float css property
+ styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn.css = function( name, value ) {
+ return access( this, name, value, true, function( elem, name, value ) {
+ if ( value === undefined ) {
+ return jQuery.curCSS( elem, name );
+ }
+
+ if ( typeof value === "number" && !rexclude.test(name) ) {
+ value += "px";
+ }
+
+ jQuery.style( elem, name, value );
+ });
+};
+
+jQuery.extend({
+ style: function( elem, name, value ) {
+ // don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ // ignore negative width and height values #1599
+ if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
+ value = undefined;
+ }
+
+ var style = elem.style || elem, set = value !== undefined;
+
+ // IE uses filters for opacity
+ if ( !jQuery.support.opacity && name === "opacity" ) {
+ if ( set ) {
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // Set the alpha filter to set the opacity
+ var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
+ var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
+ style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
+ }
+
+ return style.filter && style.filter.indexOf("opacity=") >= 0 ?
+ (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
+ "";
+ }
+
+ // Make sure we're using the right name for getting the float value
+ if ( rfloat.test( name ) ) {
+ name = styleFloat;
+ }
+
+ name = name.replace(rdashAlpha, fcamelCase);
+
+ if ( set ) {
+ style[ name ] = value;
+ }
+
+ return style[ name ];
+ },
+
+ css: function( elem, name, force, extra ) {
+ if ( name === "width" || name === "height" ) {
+ var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
+
+ function getWH() {
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+ if ( extra === "border" ) {
+ return;
+ }
+
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
+ }
+
+ if ( extra === "margin" ) {
+ val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
+ } else {
+ val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
+ }
+ });
+ }
+
+ if ( elem.offsetWidth !== 0 ) {
+ getWH();
+ } else {
+ jQuery.swap( elem, props, getWH );
+ }
+
+ return Math.max(0, Math.round(val));
+ }
+
+ return jQuery.curCSS( elem, name, force );
+ },
+
+ curCSS: function( elem, name, force ) {
+ var ret, style = elem.style, filter;
+
+ // IE uses filters for opacity
+ if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
+ ret = ropacity.test(elem.currentStyle.filter || "") ?
+ (parseFloat(RegExp.$1) / 100) + "" :
+ "";
+
+ return ret === "" ?
+ "1" :
+ ret;
+ }
+
+ // Make sure we're using the right name for getting the float value
+ if ( rfloat.test( name ) ) {
+ name = styleFloat;
+ }
+
+ if ( !force && style && style[ name ] ) {
+ ret = style[ name ];
+
+ } else if ( getComputedStyle ) {
+
+ // Only "float" is needed here
+ if ( rfloat.test( name ) ) {
+ name = "float";
+ }
+
+ name = name.replace( rupper, "-$1" ).toLowerCase();
+
+ var defaultView = elem.ownerDocument.defaultView;
+
+ if ( !defaultView ) {
+ return null;
+ }
+
+ var computedStyle = defaultView.getComputedStyle( elem, null );
+
+ if ( computedStyle ) {
+ ret = computedStyle.getPropertyValue( name );
+ }
+
+ // We should always get a number back from opacity
+ if ( name === "opacity" && ret === "" ) {
+ ret = "1";
+ }
+
+ } else if ( elem.currentStyle ) {
+ var camelCase = name.replace(rdashAlpha, fcamelCase);
+
+ ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+ // Remember the original values
+ var left = style.left, rsLeft = elem.runtimeStyle.left;
+
+ // Put in the new values to get a computed value out
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ callback.call( elem );
+
+ // Revert the old values
+ for ( var name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+ }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ var width = elem.offsetWidth, height = elem.offsetHeight,
+ skip = elem.nodeName.toLowerCase() === "tr";
+
+ return width === 0 && height === 0 && !skip ?
+ true :
+ width > 0 && height > 0 && !skip ?
+ false :
+ jQuery.curCSS(elem, "display") === "none";
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+var jsc = now(),
+ rscript = /<script(.|\s)*?\/script>/gi,
+ rselectTextarea = /select|textarea/i,
+ rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
+ jsre = /=\?(&|$)/,
+ rquery = /\?/,
+ rts = /(\?|&)_=.*?(&|$)/,
+ rurl = /^(\w+:)?\/\/([^\/?#]+)/,
+ r20 = /%20/g;
+
+jQuery.fn.extend({
+ // Keep a copy of the old load
+ _load: jQuery.fn.load,
+
+ load: function( url, params, callback ) {
+ if ( typeof url !== "string" ) {
+ return this._load( url );
+
+ // Don't do a request if no elements are being requested
+ } else if ( !this.length ) {
+ return this;
+ }
+
+ var off = url.indexOf(" ");
+ if ( off >= 0 ) {
+ var selector = url.slice(off, url.length);
+ url = url.slice(0, off);
+ }
+
+ // Default to a GET request
+ var type = "GET";
+
+ // If the second parameter was provided
+ if ( params ) {
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+ // We assume that it's the callback
+ callback = params;
+ params = null;
+
+ // Otherwise, build a param string
+ } else if ( typeof params === "object" ) {
+ params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+ type = "POST";
+ }
+ }
+
+ var self = this;
+
+ // Request the remote document
+ jQuery.ajax({
+ url: url,
+ type: type,
+ dataType: "html",
+ data: params,
+ complete: function( res, status ) {
+ // If successful, inject the HTML into all the matched elements
+ if ( status === "success" || status === "notmodified" ) {
+ // See if a selector was specified
+ self.html( selector ?
+ // Create a dummy div to hold the results
+ jQuery("<div />")
+ // inject the contents of the document in, removing the scripts
+ // to avoid any 'Permission Denied' errors in IE
+ .append(res.responseText.replace(rscript, ""))
+
+ // Locate the specified elements
+ .find(selector) :
+
+ // If not, just inject the full result
+ res.responseText );
+ }
+
+ if ( callback ) {
+ self.each( callback, [res.responseText, status, res] );
+ }
+ }
+ });
+
+ return this;
+ },
+
+ serialize: function() {
+ return jQuery.param(this.serializeArray());
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ return this.elements ? jQuery.makeArray(this.elements) : this;
+ })
+ .filter(function() {
+ return this.name && !this.disabled &&
+ (this.checked || rselectTextarea.test(this.nodeName) ||
+ rinput.test(this.type));
+ })
+ .map(function( i, elem ) {
+ var val = jQuery(this).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray(val) ?
+ jQuery.map( val, function( val, i ) {
+ return { name: elem.name, value: val };
+ }) :
+ { name: elem.name, value: val };
+ }).get();
+ }
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) {
+ jQuery.fn[o] = function( f ) {
+ return this.bind(o, f);
+ };
+});
+
+jQuery.extend({
+
+ get: function( url, data, callback, type ) {
+ // shift arguments if data argument was omited
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = null;
+ }
+
+ return jQuery.ajax({
+ type: "GET",
+ url: url,
+ data: data,
+ success: callback,
+ dataType: type
+ });
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get(url, null, callback, "script");
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get(url, data, callback, "json");
+ },
+
+ post: function( url, data, callback, type ) {
+ // shift arguments if data argument was omited
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = {};
+ }
+
+ return jQuery.ajax({
+ type: "POST",
+ url: url,
+ data: data,
+ success: callback,
+ dataType: type
+ });
+ },
+
+ ajaxSetup: function( settings ) {
+ jQuery.extend( jQuery.ajaxSettings, settings );
+ },
+
+ ajaxSettings: {
+ url: location.href,
+ global: true,
+ type: "GET",
+ contentType: "application/x-www-form-urlencoded",
+ processData: true,
+ async: true,
+ /*
+ timeout: 0,
+ data: null,
+ username: null,
+ password: null,
+ traditional: false,
+ */
+ // Create the request object; Microsoft failed to properly
+ // implement the XMLHttpRequest in IE7 (can't request local files),
+ // so we use the ActiveXObject when it is available
+ // This function can be overriden by calling jQuery.ajaxSetup
+ xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
+ function() {
+ return new window.XMLHttpRequest();
+ } :
+ function() {
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch(e) {}
+ },
+ accepts: {
+ xml: "application/xml, text/xml",
+ html: "text/html",
+ script: "text/javascript, application/javascript",
+ json: "application/json, text/javascript",
+ text: "text/plain",
+ _default: "*/*"
+ }
+ },
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajax: function( origSettings ) {
+ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
+
+ var jsonp, status, data,
+ callbackContext = origSettings && origSettings.context || s,
+ type = s.type.toUpperCase();
+
+ // convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Handle JSONP Parameter Callbacks
+ if ( s.dataType === "jsonp" ) {
+ if ( type === "GET" ) {
+ if ( !jsre.test( s.url ) ) {
+ s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?";
+ }
+ } else if ( !s.data || !jsre.test(s.data) ) {
+ s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
+ }
+ s.dataType = "json";
+ }
+
+ // Build temporary JSONP function
+ if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
+ jsonp = s.jsonpCallback || ("jsonp" + jsc++);
+
+ // Replace the =? sequence both in the query string and the data
+ if ( s.data ) {
+ s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
+ }
+
+ s.url = s.url.replace(jsre, "=" + jsonp + "$1");
+
+ // We need to make sure
+ // that a JSONP style response is executed properly
+ s.dataType = "script";
+
+ // Handle JSONP-style loading
+ window[ jsonp ] = window[ jsonp ] || function( tmp ) {
+ data = tmp;
+ success();
+ complete();
+ // Garbage collect
+ window[ jsonp ] = undefined;
+
+ try {
+ delete window[ jsonp ];
+ } catch(e) {}
+
+ if ( head ) {
+ head.removeChild( script );
+ }
+ };
+ }
+
+ if ( s.dataType === "script" && s.cache === null ) {
+ s.cache = false;
+ }
+
+ if ( s.cache === false && type === "GET" ) {
+ var ts = now();
+
+ // try replacing _= if it is there
+ var ret = s.url.replace(rts, "$1_=" + ts + "$2");
+
+ // if nothing was replaced, add timestamp to the end
+ s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
+ }
+
+ // If data is available, append data to url for get requests
+ if ( s.data && type === "GET" ) {
+ s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
+ }
+
+ // Watch for a new set of requests
+ if ( s.global && ! jQuery.active++ ) {
+ jQuery.event.trigger( "ajaxStart" );
+ }
+
+ // Matches an absolute URL, and saves the domain
+ var parts = rurl.exec( s.url ),
+ remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
+
+ // If we're requesting a remote document
+ // and trying to load JSON or Script with a GET
+ if ( s.dataType === "script" && type === "GET" && remote ) {
+ var head = document.getElementsByTagName("head")[0] || document.documentElement;
+ var script = document.createElement("script");
+ script.src = s.url;
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ // Handle Script loading
+ if ( !jsonp ) {
+ var done = false;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function() {
+ if ( !done && (!this.readyState ||
+ this.readyState === "loaded" || this.readyState === "complete") ) {
+ done = true;
+ success();
+ complete();
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+ if ( head && script.parentNode ) {
+ head.removeChild( script );
+ }
+ }
+ };
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709 and #4378).
+ head.insertBefore( script, head.firstChild );
+
+ // We handle everything using the script element injection
+ return undefined;
+ }
+
+ var requestDone = false;
+
+ // Create the request object
+ var xhr = s.xhr();
+
+ if ( !xhr ) {
+ return;
+ }
+
+ // Open the socket
+ // Passing null username, generates a login popup on Opera (#2865)
+ if ( s.username ) {
+ xhr.open(type, s.url, s.async, s.username, s.password);
+ } else {
+ xhr.open(type, s.url, s.async);
+ }
+
+ // Need an extra try/catch for cross domain requests in Firefox 3
+ try {
+ // Set the correct header, if data is being sent
+ if ( s.data || origSettings && origSettings.contentType ) {
+ xhr.setRequestHeader("Content-Type", s.contentType);
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[s.url] ) {
+ xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
+ }
+
+ if ( jQuery.etag[s.url] ) {
+ xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
+ }
+ }
+
+ // Set header so the called script knows that it's an XMLHttpRequest
+ // Only send the header if it's not a remote XHR
+ if ( !remote ) {
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
+ s.accepts[ s.dataType ] + ", */*" :
+ s.accepts._default );
+ } catch(e) {}
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
+ // Handle the global AJAX counter
+ if ( s.global && ! --jQuery.active ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+
+ // close opended socket
+ xhr.abort();
+ return false;
+ }
+
+ if ( s.global ) {
+ trigger("ajaxSend", [xhr, s]);
+ }
+
+ // Wait for a response to come back
+ var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
+ // The request was aborted
+ if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
+ // Opera doesn't call onreadystatechange before this point
+ // so we simulate the call
+ if ( !requestDone ) {
+ complete();
+ }
+
+ requestDone = true;
+ if ( xhr ) {
+ xhr.onreadystatechange = jQuery.noop;
+ }
+
+ // The transfer is complete and the data is available, or the request timed out
+ } else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) {
+ requestDone = true;
+ xhr.onreadystatechange = jQuery.noop;
+
+ status = isTimeout === "timeout" ?
+ "timeout" :
+ !jQuery.httpSuccess( xhr ) ?
+ "error" :
+ s.ifModified && jQuery.httpNotModified( xhr, s.url ) ?
+ "notmodified" :
+ "success";
+
+ var errMsg;
+
+ if ( status === "success" ) {
+ // Watch for, and catch, XML document parse errors
+ try {
+ // process the data (runs the xml through httpData regardless of callback)
+ data = jQuery.httpData( xhr, s.dataType, s );
+ } catch(err) {
+ status = "parsererror";
+ errMsg = err;
+ }
+ }
+
+ // Make sure that the request was successful or notmodified
+ if ( status === "success" || status === "notmodified" ) {
+ // JSONP handles its own success callback
+ if ( !jsonp ) {
+ success();
+ }
+ } else {
+ jQuery.handleError(s, xhr, status, errMsg);
+ }
+
+ // Fire the complete handlers
+ complete();
+
+ if ( isTimeout === "timeout" ) {
+ xhr.abort();
+ }
+
+ // Stop memory leaks
+ if ( s.async ) {
+ xhr = null;
+ }
+ }
+ };
+
+ // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
+ // Opera doesn't fire onreadystatechange at all on abort
+ try {
+ var oldAbort = xhr.abort;
+ xhr.abort = function() {
+ if ( xhr ) {
+ oldAbort.call( xhr );
+ }
+
+ onreadystatechange( "abort" );
+ };
+ } catch(e) { }
+
+ // Timeout checker
+ if ( s.async && s.timeout > 0 ) {
+ setTimeout(function() {
+ // Check to see if the request is still happening
+ if ( xhr && !requestDone ) {
+ onreadystatechange( "timeout" );
+ }
+ }, s.timeout);
+ }
+
+ // Send the data
+ try {
+ xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
+ } catch(e) {
+ jQuery.handleError(s, xhr, null, e);
+ // Fire the complete handlers
+ complete();
+ }
+
+ // firefox 1.5 doesn't fire statechange for sync requests
+ if ( !s.async ) {
+ onreadystatechange();
+ }
+
+ function success() {
+ // If a local callback was specified, fire it and pass it the data
+ if ( s.success ) {
+ s.success.call( callbackContext, data, status, xhr );
+ }
+
+ // Fire the global callback
+ if ( s.global ) {
+ trigger( "ajaxSuccess", [xhr, s] );
+ }
+ }
+
+ function complete() {
+ // Process result
+ if ( s.complete ) {
+ s.complete.call( callbackContext, xhr, status);
+ }
+
+ // The request was completed
+ if ( s.global ) {
+ trigger( "ajaxComplete", [xhr, s] );
+ }
+
+ // Handle the global AJAX counter
+ if ( s.global && ! --jQuery.active ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ }
+
+ function trigger(type, args) {
+ (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
+ }
+
+ // return XMLHttpRequest to allow aborting the request etc.
+ return xhr;
+ },
+
+ handleError: function( s, xhr, status, e ) {
+ // If a local callback was specified, fire it
+ if ( s.error ) {
+ s.error.call( s.context || s, xhr, status, e );
+ }
+
+ // Fire the global callback
+ if ( s.global ) {
+ (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
+ }
+ },
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Determines if an XMLHttpRequest was successful or not
+ httpSuccess: function( xhr ) {
+ try {
+ // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
+ return !xhr.status && location.protocol === "file:" ||
+ // Opera returns 0 when status is 304
+ ( xhr.status >= 200 && xhr.status < 300 ) ||
+ xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
+ } catch(e) {}
+
+ return false;
+ },
+
+ // Determines if an XMLHttpRequest returns NotModified
+ httpNotModified: function( xhr, url ) {
+ var lastModified = xhr.getResponseHeader("Last-Modified"),
+ etag = xhr.getResponseHeader("Etag");
+
+ if ( lastModified ) {
+ jQuery.lastModified[url] = lastModified;
+ }
+
+ if ( etag ) {
+ jQuery.etag[url] = etag;
+ }
+
+ // Opera returns 0 when status is 304
+ return xhr.status === 304 || xhr.status === 0;
+ },
+
+ httpData: function( xhr, type, s ) {
+ var ct = xhr.getResponseHeader("content-type") || "",
+ xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
+ data = xml ? xhr.responseXML : xhr.responseText;
+
+ if ( xml && data.documentElement.nodeName === "parsererror" ) {
+ jQuery.error( "parsererror" );
+ }
+
+ // Allow a pre-filtering function to sanitize the response
+ // s is checked to keep backwards compatibility
+ if ( s && s.dataFilter ) {
+ data = s.dataFilter( data, type );
+ }
+
+ // The filter can actually parse the response
+ if ( typeof data === "string" ) {
+ // Get the JavaScript object, if JSON is used.
+ if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
+ data = jQuery.parseJSON( data );
+
+ // If the type is "script", eval it in global context
+ } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
+ jQuery.globalEval( data );
+ }
+ }
+
+ return data;
+ },
+
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function( a, traditional ) {
+ var s = [];
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray(a) || a.jquery ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( var prefix in a ) {
+ buildParams( prefix, a[prefix] );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join("&").replace(r20, "+");
+
+ function buildParams( prefix, obj ) {
+ if ( jQuery.isArray(obj) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
+ }
+ });
+
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
+ // Serialize object item.
+ jQuery.each( obj, function( k, v ) {
+ buildParams( prefix + "[" + k + "]", v );
+ });
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+ }
+
+ function add( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction(value) ? value() : value;
+ s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+ }
+ }
+});
+var elemdisplay = {},
+ rfxtypes = /toggle|show|hide/,
+ rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
+ timerId,
+ fxAttrs = [
+ // height animations
+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+ // width animations
+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+ // opacity animations
+ [ "opacity" ]
+ ];
+
+jQuery.fn.extend({
+ show: function( speed, callback ) {
+ if ( speed || speed === 0) {
+ return this.animate( genFx("show", 3), speed, callback);
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var old = jQuery.data(this[i], "olddisplay");
+
+ this[i].style.display = old || "";
+
+ if ( jQuery.css(this[i], "display") === "none" ) {
+ var nodeName = this[i].nodeName, display;
+
+ if ( elemdisplay[ nodeName ] ) {
+ display = elemdisplay[ nodeName ];
+
+ } else {
+ var elem = jQuery("<" + nodeName + " />").appendTo("body");
+
+ display = elem.css("display");
+
+ if ( display === "none" ) {
+ display = "block";
+ }
+
+ elem.remove();
+
+ elemdisplay[ nodeName ] = display;
+ }
+
+ jQuery.data(this[i], "olddisplay", display);
+ }
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( var j = 0, k = this.length; j < k; j++ ) {
+ this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
+ }
+
+ return this;
+ }
+ },
+
+ hide: function( speed, callback ) {
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("hide", 3), speed, callback);
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var old = jQuery.data(this[i], "olddisplay");
+ if ( !old && old !== "none" ) {
+ jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
+ }
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( var j = 0, k = this.length; j < k; j++ ) {
+ this[j].style.display = "none";
+ }
+
+ return this;
+ }
+ },
+
+ // Save the old toggle function
+ _toggle: jQuery.fn.toggle,
+
+ toggle: function( fn, fn2 ) {
+ var bool = typeof fn === "boolean";
+
+ if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+ this._toggle.apply( this, arguments );
+
+ } else if ( fn == null || bool ) {
+ this.each(function() {
+ var state = bool ? fn : jQuery(this).is(":hidden");
+ jQuery(this)[ state ? "show" : "hide" ]();
+ });
+
+ } else {
+ this.animate(genFx("toggle", 3), fn, fn2);
+ }
+
+ return this;
+ },
+
+ fadeTo: function( speed, to, callback ) {
+ return this.filter(":hidden").css("opacity", 0).show().end()
+ .animate({opacity: to}, speed, callback);
+ },
+
+ animate: function( prop, speed, easing, callback ) {
+ var optall = jQuery.speed(speed, easing, callback);
+
+ if ( jQuery.isEmptyObject( prop ) ) {
+ return this.each( optall.complete );
+ }
+
+ return this[ optall.queue === false ? "each" : "queue" ](function() {
+ var opt = jQuery.extend({}, optall), p,
+ hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
+ self = this;
+
+ for ( p in prop ) {
+ var name = p.replace(rdashAlpha, fcamelCase);
+
+ if ( p !== name ) {
+ prop[ name ] = prop[ p ];
+ delete prop[ p ];
+ p = name;
+ }
+
+ if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
+ return opt.complete.call(this);
+ }
+
+ if ( ( p === "height" || p === "width" ) && this.style ) {
+ // Store display property
+ opt.display = jQuery.css(this, "display");
+
+ // Make sure that nothing sneaks out
+ opt.overflow = this.style.overflow;
+ }
+
+ if ( jQuery.isArray( prop[p] ) ) {
+ // Create (if needed) and add to specialEasing
+ (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
+ prop[p] = prop[p][0];
+ }
+ }
+
+ if ( opt.overflow != null ) {
+ this.style.overflow = "hidden";
+ }
+
+ opt.curAnim = jQuery.extend({}, prop);
+
+ jQuery.each( prop, function( name, val ) {
+ var e = new jQuery.fx( self, opt, name );
+
+ if ( rfxtypes.test(val) ) {
+ e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
+
+ } else {
+ var parts = rfxnum.exec(val),
+ start = e.cur(true) || 0;
+
+ if ( parts ) {
+ var end = parseFloat( parts[2] ),
+ unit = parts[3] || "px";
+
+ // We need to compute starting value
+ if ( unit !== "px" ) {
+ self.style[ name ] = (end || 1) + unit;
+ start = ((end || 1) / e.cur(true)) * start;
+ self.style[ name ] = start + unit;
+ }
+
+ // If a +=/-= token was provided, we're doing a relative animation
+ if ( parts[1] ) {
+ end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
+ }
+
+ e.custom( start, end, unit );
+
+ } else {
+ e.custom( start, val, "" );
+ }
+ }
+ });
+
+ // For JS strict compliance
+ return true;
+ });
+ },
+
+ stop: function( clearQueue, gotoEnd ) {
+ var timers = jQuery.timers;
+
+ if ( clearQueue ) {
+ this.queue([]);
+ }
+
+ this.each(function() {
+ // go in reverse order so anything added to the queue during the loop is ignored
+ for ( var i = timers.length - 1; i >= 0; i-- ) {
+ if ( timers[i].elem === this ) {
+ if (gotoEnd) {
+ // force the next step to be the last
+ timers[i](true);
+ }
+
+ timers.splice(i, 1);
+ }
+ }
+ });
+
+ // start the next in the queue if the last step wasn't forced
+ if ( !gotoEnd ) {
+ this.dequeue();
+ }
+
+ return this;
+ }
+
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show", 1),
+ slideUp: genFx("hide", 1),
+ slideToggle: genFx("toggle", 1),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, callback ) {
+ return this.animate( props, speed, callback );
+ };
+});
+
+jQuery.extend({
+ speed: function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? speed : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
+
+ // Queueing
+ opt.old = opt.complete;
+ opt.complete = function() {
+ if ( opt.queue !== false ) {
+ jQuery(this).dequeue();
+ }
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+ };
+
+ return opt;
+ },
+
+ easing: {
+ linear: function( p, n, firstNum, diff ) {
+ return firstNum + diff * p;
+ },
+ swing: function( p, n, firstNum, diff ) {
+ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
+ }
+ },
+
+ timers: [],
+
+ fx: function( elem, options, prop ) {
+ this.options = options;
+ this.elem = elem;
+ this.prop = prop;
+
+ if ( !options.orig ) {
+ options.orig = {};
+ }
+ }
+
+});
+
+jQuery.fx.prototype = {
+ // Simple function for setting a style value
+ update: function() {
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
+
+ // Set display property to block for height/width animations
+ if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
+ this.elem.style.display = "block";
+ }
+ },
+
+ // Get the current size
+ cur: function( force ) {
+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+ return this.elem[ this.prop ];
+ }
+
+ var r = parseFloat(jQuery.css(this.elem, this.prop, force));
+ return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
+ },
+
+ // Start an animation from one number to another
+ custom: function( from, to, unit ) {
+ this.startTime = now();
+ this.start = from;
+ this.end = to;
+ this.unit = unit || this.unit || "px";
+ this.now = this.start;
+ this.pos = this.state = 0;
+
+ var self = this;
+ function t( gotoEnd ) {
+ return self.step(gotoEnd);
+ }
+
+ t.elem = this.elem;
+
+ if ( t() && jQuery.timers.push(t) && !timerId ) {
+ timerId = setInterval(jQuery.fx.tick, 13);
+ }
+ },
+
+ // Simple 'show' function
+ show: function() {
+ // Remember where we started, so that we can go back to it later
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+ this.options.show = true;
+
+ // Begin the animation
+ // Make sure that we start at a small width/height to avoid any
+ // flash of content
+ this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
+
+ // Start by showing the element
+ jQuery( this.elem ).show();
+ },
+
+ // Simple 'hide' function
+ hide: function() {
+ // Remember where we started, so that we can go back to it later
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+ this.options.hide = true;
+
+ // Begin the animation
+ this.custom(this.cur(), 0);
+ },
+
+ // Each step of an animation
+ step: function( gotoEnd ) {
+ var t = now(), done = true;
+
+ if ( gotoEnd || t >= this.options.duration + this.startTime ) {
+ this.now = this.end;
+ this.pos = this.state = 1;
+ this.update();
+
+ this.options.curAnim[ this.prop ] = true;
+
+ for ( var i in this.options.curAnim ) {
+ if ( this.options.curAnim[i] !== true ) {
+ done = false;
+ }
+ }
+
+ if ( done ) {
+ if ( this.options.display != null ) {
+ // Reset the overflow
+ this.elem.style.overflow = this.options.overflow;
+
+ // Reset the display
+ var old = jQuery.data(this.elem, "olddisplay");
+ this.elem.style.display = old ? old : this.options.display;
+
+ if ( jQuery.css(this.elem, "display") === "none" ) {
+ this.elem.style.display = "block";
+ }
+ }
+
+ // Hide the element if the "hide" operation was done
+ if ( this.options.hide ) {
+ jQuery(this.elem).hide();
+ }
+
+ // Reset the properties, if the item has been hidden or shown
+ if ( this.options.hide || this.options.show ) {
+ for ( var p in this.options.curAnim ) {
+ jQuery.style(this.elem, p, this.options.orig[p]);
+ }
+ }
+
+ // Execute the complete function
+ this.options.complete.call( this.elem );
+ }
+
+ return false;
+
+ } else {
+ var n = t - this.startTime;
+ this.state = n / this.options.duration;
+
+ // Perform the easing function, defaults to swing
+ var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];
+ var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");
+ this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
+ this.now = this.start + ((this.end - this.start) * this.pos);
+
+ // Perform the next step of the animation
+ this.update();
+ }
+
+ return true;
+ }
+};
+
+jQuery.extend( jQuery.fx, {
+ tick: function() {
+ var timers = jQuery.timers;
+
+ for ( var i = 0; i < timers.length; i++ ) {
+ if ( !timers[i]() ) {
+ timers.splice(i--, 1);
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ },
+
+ stop: function() {
+ clearInterval( timerId );
+ timerId = null;
+ },
+
+ speeds: {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+ },
+
+ step: {
+ opacity: function( fx ) {
+ jQuery.style(fx.elem, "opacity", fx.now);
+ },
+
+ _default: function( fx ) {
+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+ fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+ } else {
+ fx.elem[ fx.prop ] = fx.now;
+ }
+ }
+ }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
+
+function genFx( type, num ) {
+ var obj = {};
+
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+ obj[ this ] = type;
+ });
+
+ return obj;
+}
+if ( "getBoundingClientRect" in document.documentElement ) {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0];
+
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
+ clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
+ top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
+ left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
+
+ return { top: top, left: left };
+ };
+
+} else {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0];
+
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ jQuery.offset.initialize();
+
+ var offsetParent = elem.offsetParent, prevOffsetParent = elem,
+ doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
+ body = doc.body, defaultView = doc.defaultView,
+ prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+ top = elem.offsetTop, left = elem.offsetLeft;
+
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ break;
+ }
+
+ computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+ top -= elem.scrollTop;
+ left -= elem.scrollLeft;
+
+ if ( elem === offsetParent ) {
+ top += elem.offsetTop;
+ left += elem.offsetLeft;
+
+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
+
+ prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
+ }
+
+ if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
+
+ prevComputedStyle = computedStyle;
+ }
+
+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+ top += body.offsetTop;
+ left += body.offsetLeft;
+ }
+
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ top += Math.max( docElem.scrollTop, body.scrollTop );
+ left += Math.max( docElem.scrollLeft, body.scrollLeft );
+ }
+
+ return { top: top, left: left };
+ };
+}
+
+jQuery.offset = {
+ initialize: function() {
+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
+ html = "<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>";
+
+ jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+ container.innerHTML = html;
+ body.insertBefore( container, body.firstChild );
+ innerDiv = container.firstChild;
+ checkDiv = innerDiv.firstChild;
+ td = innerDiv.nextSibling.firstChild.firstChild;
+
+ this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+ this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+ checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
+ // safari subtracts parent border width here which is 5px
+ this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+ checkDiv.style.position = checkDiv.style.top = "";
+
+ innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
+ this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+ body.removeChild( container );
+ body = container = innerDiv = checkDiv = table = td = null;
+ jQuery.offset.initialize = jQuery.noop;
+ },
+
+ bodyOffset: function( body ) {
+ var top = body.offsetTop, left = body.offsetLeft;
+
+ jQuery.offset.initialize();
+
+ if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+ top += parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0;
+ left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
+ }
+
+ return { top: top, left: left };
+ },
+
+ setOffset: function( elem, options, i ) {
+ // set position first, in-case top/left are set even on static elem
+ if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
+ elem.style.position = "relative";
+ }
+ var curElem = jQuery( elem ),
+ curOffset = curElem.offset(),
+ curTop = parseInt( jQuery.curCSS( elem, "top", true ), 10 ) || 0,
+ curLeft = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ var props = {
+ top: (options.top - curOffset.top) + curTop,
+ left: (options.left - curOffset.left) + curLeft
+ };
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+
+jQuery.fn.extend({
+ position: function() {
+ if ( !this[0] ) {
+ return null;
+ }
+
+ var elem = this[0],
+
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent(),
+
+ // Get correct offsets
+ offset = this.offset(),
+ parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+ // Subtract element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ offset.top -= parseFloat( jQuery.curCSS(elem, "marginTop", true) ) || 0;
+ offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
+
+ // Add offsetParent borders
+ parentOffset.top += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth", true) ) || 0;
+ parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
+
+ // Subtract the two offsets
+ return {
+ top: offset.top - parentOffset.top,
+ left: offset.left - parentOffset.left
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || document.body;
+ while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent;
+ });
+ }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+ var method = "scroll" + name;
+
+ jQuery.fn[ method ] = function(val) {
+ var elem = this[0], win;
+
+ if ( !elem ) {
+ return null;
+ }
+
+ if ( val !== undefined ) {
+ // Set the scroll offset
+ return this.each(function() {
+ win = getWindow( this );
+
+ if ( win ) {
+ win.scrollTo(
+ !i ? val : jQuery(win).scrollLeft(),
+ i ? val : jQuery(win).scrollTop()
+ );
+
+ } else {
+ this[ method ] = val;
+ }
+ });
+ } else {
+ win = getWindow( elem );
+
+ // Return the scroll offset
+ return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+ jQuery.support.boxModel && win.document.documentElement[ method ] ||
+ win.document.body[ method ] :
+ elem[ method ];
+ }
+ };
+});
+
+function getWindow( elem ) {
+ return ("scrollTo" in elem && elem.document) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+ var type = name.toLowerCase();
+
+ // innerHeight and innerWidth
+ jQuery.fn["inner" + name] = function() {
+ return this[0] ?
+ jQuery.css( this[0], type, false, "padding" ) :
+ null;
+ };
+
+ // outerHeight and outerWidth
+ jQuery.fn["outer" + name] = function( margin ) {
+ return this[0] ?
+ jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
+ null;
+ };
+
+ jQuery.fn[ type ] = function( size ) {
+ // Get window width or height
+ var elem = this[0];
+ if ( !elem ) {
+ return size == null ? null : this;
+ }
+
+ if ( jQuery.isFunction( size ) ) {
+ return this.each(function( i ) {
+ var self = jQuery( this );
+ self[ type ]( size.call( this, i, self[ type ]() ) );
+ });
+ }
+
+ return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+ elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
+ elem.document.body[ "client" + name ] :
+
+ // Get document width or height
+ (elem.nodeType === 9) ? // is it a document
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ Math.max(
+ elem.documentElement["client" + name],
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
+ elem.body["offset" + name], elem.documentElement["offset" + name]
+ ) :
+
+ // Get or set width or height on the element
+ size === undefined ?
+ // Get width or height on the element
+ jQuery.css( elem, type ) :
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ this.css( type, typeof size === "string" ? size : size + "px" );
+ };
+
+});
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+})(window);
diff --git a/themes/default/js/jquery.packed.js b/themes/default/js/jquery.packed.js
new file mode 100644
index 000000000..f99269ee9
--- /dev/null
+++ b/themes/default/js/jquery.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(C(1B,1d){G y=C(P,T){E 3g y.fn.8Z(P,T)},ay=1B.y,84$=1B.$,12=1B.12,6E,aD=/^[^<]*(<[\\w\\W]+>)[^>]*$|^#([\\w-]+)$/,cO=/^.[^:#\\[\\.,]*$/,aJ=/\\S/,at=/^(\\s|\\aC)+|(\\s|\\aC)+$/g,aB=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,9q=eh.9q,6T,91=14,5X=[],42,4a=7x.2T.4a,6U=7x.2T.6U,1K=3X.2T.1K,2k=3X.2T.2k,2r=3X.2T.2r;y.fn=y.2T={8Z:C(P,T){G K,6,M,2e;7(!P){E B}7(P.19){B.T=B[0]=P;B.O=1;E B}7(1a P==="1R"){K=aD.29(P);7(K&&(K[1]||!T)){7(K[1]){2e=(T?T.1Z||T:12);M=aB.29(P);7(M){7(y.87(T)){P=[12.2x(M[1])];y.fn.3x.1f(P,T,R)}Q{P=[2e.2x(M[1])]}}Q{M=8B([K[1]],[2e]);P=(M.5c?M.2v.5k(R):M.2v).47}}Q{6=12.5z(K[2]);7(6){7(6.1T!==K[2]){E 6E.2y(P)}B.O=1;B[0]=6}B.T=12;B.P=P;E B}}Q 7(!T&&/^\\w+$/.17(P)){B.P=P;B.T=12;P=12.2N(P)}Q 7(!T||T.6j){E(T||6E).2y(P)}Q{E y(T).2y(P)}}Q 7(y.1G(P)){E 6E.3l(P)}7(P.P!==1d){B.P=P.P;B.T=P.T}E y.3f(P)?B.ax(P):y.2P(P,B)},P:"",6j:"1.4.1",O:0,4j:C(){E B.O},7b:C(){E 2k.1f(B,0)},54:C(3B){E 3B==U?B.7b():(3B<0?B.2k(3B)[0]:B[3B])},3s:C(1C,J,P){G M=y(1C||U);M.9k=B;M.T=B.T;7(J==="2y"){M.P=B.P+(B.P?" ":"")+P}Q 7(J){M.P=B.P+"."+J+"("+P+")"}E M},ax:C(1C){B.O=0;1K.27(B,1C);E B},1b:C(1o,1D){E y.1b(B,1o,1D)},3l:C(fn){y.9E();7(y.6O){fn.1f(12,y)}Q 7(5X){5X.1K(fn)}E B},eq:C(i){E i===-1?B.2k(i):B.2k(i,+i+1)},2j:C(){E B.eq(0)},4o:C(){E B.eq(-1)},2k:C(){E B.3s(2k.27(B,1F),"2k",2k.1f(1F).4R(","))},2Y:C(1o){E B.3s(y.2Y(B,C(6,i){E 1o.1f(6,i,6)}))},3o:C(){E B.9k||y(U)},1K:1K,4Z:[].4Z,3S:[].3S};y.fn.8Z.2T=y.fn;y.1Q=y.fn.1Q=C(){G 1w=1F[0]||{},i=1,O=1F.O,5P=14,1e,J,2L,3R;7(1a 1w==="7S"){5P=1w;1w=1F[1]||{};i=2}7(1a 1w!=="1P"&&!y.1G(1w)){1w={}}7(O===i){1w=B;--i}V(;i<O;i++){7((1e=1F[i])!=U){V(J 1A 1e){2L=1w[J];3R=1e[J];7(1w===3R){9F}7(5P&&3R&&(y.87(3R)||y.3f(3R))){G 6z=2L&&(y.87(2L)||y.3f(2L))?2L:y.3f(3R)?[]:{};1w[J]=y.1Q(5P,6z,3R)}Q 7(3R!==1d){1w[J]=3R}}}}E 1w};y.1Q({ed:C(5P){1B.$=84$;7(5P){1B.y=ay}E y},6O:14,3l:C(){7(!y.6O){7(!12.1i){E 7N(y.3l,13)}y.6O=R;7(5X){G fn,i=0;23((fn=5X[i++])){fn.1f(12,y)}5X=U}7(y.fn.7G){y(12).7G("3l")}}},9E:C(){7(91){E}91=R;7(12.5h==="2H"){E y.3l()}7(12.4b){12.4b("42",42,14);1B.4b("76",y.3l,14)}Q 7(12.3L){12.3L("3E",42);1B.3L("9P",y.3l);G 95=14;2E{95=1B.b1==U}2G(e){}7(12.2i.bk&&95){99()}}},1G:C(25){E 4a.1f(25)==="[1P aN]"},3f:C(25){E 4a.1f(25)==="[1P 3X]"},87:C(25){7(!25||4a.1f(25)!=="[1P 7x]"||25.19||25.6A){E 14}7(25.8W&&!6U.1f(25,"8W")&&!6U.1f(25.8W.2T,"eo")){E 14}G 1X;V(1X 1A 25){}E 1X===1d||6U.1f(25,1X)},9n:C(25){V(G J 1A 25){E 14}E R},2W:C(7e){bd 7e},c3:C(I){7(1a I!=="1R"||!I){E U}7(/^[\\],:{}\\s]*$/.17(I.1H(/\\\\(?:["\\\\\\/em]|u[0-9a-fA-F]{4})/g,"@").1H(/"[^"\\\\\\n\\r]*"|R|14|U|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,"]").1H(/(?:^|:|,)(?:\\s*\\[)+/g,""))){E 1B.83&&1B.83.aG?1B.83.aG(I):(3g aN("E "+I))()}Q{y.2W("en 83: "+I)}},6y:C(){},9e:C(I){7(I&&aJ.17(I)){G 3e=12.2N("3e")[0]||12.2i,1x=12.2x("1x");1x.H="1U/4S";7(y.1Y.9g){1x.3N(12.6x(I))}Q{1x.1U=I}3e.3C(1x,3e.1S);3e.3u(1x)}},1g:C(6,J){E 6.1g&&6.1g.8c()===J.8c()},1b:C(1P,1o,1D){G J,i=0,O=1P.O,9m=O===1d||y.1G(1P);7(1D){7(9m){V(J 1A 1P){7(1o.27(1P[J],1D)===14){2z}}}Q{V(;i<O;){7(1o.27(1P[i++],1D)===14){2z}}}}Q{7(9m){V(J 1A 1P){7(1o.1f(1P[J],J,1P[J])===14){2z}}}Q{V(G N=1P[0];i<O&&1o.1f(N,i,N)!==14;N=1P[++i]){}}}E 1P},eb:C(1U){E(1U||"").1H(at,"")},2P:C(1E,1q){G M=1q||[];7(1E!=U){7(1E.O==U||1a 1E==="1R"||y.1G(1E)||(1a 1E!=="C"&&1E.6A)){1K.1f(M,1E)}Q{y.7p(M,1E)}}E M},4s:C(6,1E){7(1E.2r){E 1E.2r(6)}V(G i=0,O=1E.O;i<O;i++){7(1E[i]===6){E i}}E-1},7p:C(2j,66){G i=2j.O,j=0;7(1a 66.O==="5m"){V(G l=66.O;j<l;j++){2j[i++]=66[j]}}Q{23(66[j]!==1d){2j[i++]=66[j++]}}2j.O=i;E 2j},5Y:C(1C,1o,ar){G M=[];V(G i=0,O=1C.O;i<O;i++){7(!ar!==!1o(1C[i],i)){M.1K(1C[i])}}E M},2Y:C(1C,1o,aM){G M=[],N;V(G i=0,O=1C.O;i<O;i++){N=1o(1C[i],i,aM);7(N!=U){M[M.O]=N}}E M.7V.27([],M)},21:1,2a:C(fn,2a,6K){7(1F.O===2){7(1a 2a==="1R"){6K=fn;fn=6K[2a];2a=1d}Q 7(2a&&!y.1G(2a)){6K=2a;2a=1d}}7(!2a&&fn){2a=C(){E fn.27(6K||B,1F)}}7(fn){2a.21=fn.21=fn.21||2a.21||y.21++}E 2a},bI:C(4n){4n=4n.28();G K=/(bp)[ \\/]([\\w.]+)/.29(4n)||/(e1)(?:.*81)?[ \\/]([\\w.]+)/.29(4n)||/(e2) ([\\w.]+)/.29(4n)||!/e0/.17(4n)&&/(dZ)(?:.*? dX:([\\w.]+))?/.29(4n)||[];E{4G:K[1]||"",81:K[2]||"0"}},4G:{}});6T=y.bI(9q);7(6T.4G){y.4G[6T.4G]=R;y.4G.81=6T.81}7(y.4G.bp){y.4G.ea=R}7(2r){y.4s=C(6,1E){E 2r.1f(1E,6)}}6E=y(12);7(12.4b){42=C(){12.6X("42",42,14);y.3l()}}Q 7(12.3L){42=C(){7(12.5h==="2H"){12.7Q("3E",42);y.3l()}}}C 99(){7(y.6O){E}2E{12.2i.bk("1m")}2G(2W){7N(99,1);E}y.3l()}C c1(i,6){7(6.2L){y.6a({1n:6.2L,4W:14,36:"1x"})}Q{y.9e(6.1U||6.bA||6.3p||"")}7(6.1v){6.1v.3u(6)}}C 7t(1C,1X,N,29,fn,4m){G O=1C.O;7(1a 1X==="1P"){V(G k 1A 1X){7t(1C,k,1X[k],29,fn,N)}E 1C}7(N!==1d){29=!4m&&29&&y.1G(N);V(G i=0;i<O;i++){fn(1C[i],1X,29?N.1f(1C[i],i,fn(1C[i],1X)):N,4m)}E 1C}E O?fn(1C[0],1X):U}C 2Q(){E(3g aP).aH()}(C(){y.1Y={};G 2Z=12.2i,1x=12.2x("1x"),Y=12.2x("Y"),1T="1x"+2Q();Y.18.2c="4q";Y.3p=" <9f/><2f></2f><a 3A=\'/a\' 18=\'c0:bn;9H:1m;2o:.55;\'>a</a><3O H=\'4V\'/>";G 2K=Y.2N("*"),a=Y.2N("a")[0];7(!2K||!2K.O||!a){E}y.1Y={ak:Y.1S.19===3,2A:!Y.2N("2A").O,da:!!Y.2N("9f").O,18:/bn/.17(a.3a("18")),aW:a.3a("3A")==="/a",2o:/^0.55$/.17(a.18.2o),7y:!!a.18.7y,b7:Y.2N("3O")[0].N==="3J",b5:12.2x("33").3N(12.2x("44")).4Q,7l:14,9g:14,8j:R,5B:U};1x.H="1U/4S";2E{1x.3N(12.6x("1B."+1T+"=1;"))}2G(e){}2Z.3C(1x,2Z.1S);7(1B[1T]){y.1Y.9g=R;3q 1B[1T]}2Z.3u(1x);7(Y.3L&&Y.bG){Y.3L("9t",C 4c(){y.1Y.8j=14;Y.7Q("9t",4c)});Y.5k(R).bG("9t")}Y=12.2x("Y");Y.3p="<3O H=\'4f\' J=\'e7\' 3Q=\'3Q\'/>";G 2v=12.c9();2v.3N(Y.1S);y.1Y.7l=2v.5k(R).5k(R).an.3Q;y(C(){G Y=12.2x("Y");Y.18.2O=Y.18.dj="5g";12.1i.3N(Y);y.5B=y.1Y.5B=Y.7F===2;12.1i.3u(Y).18.2c=\'4q\';Y=U});G 8l=C(63){G el=12.2x("Y");63="3J"+63;G 7W=(63 1A el);7(!7W){el.aS(63,"E;");7W=1a el[63]==="C"}el=U;E 7W};y.1Y.aA=8l("4t");y.1Y.bg=8l("6p");2Z=1x=Y=2K=a=U})();y.3j={"V":"b9","43":"1N",e6:"aE",es:"et",bR:"eO",eP:"eN",eM:"eK",eL:"ap",eQ:"eR",eW:"eV"};G 3v="y"+2Q(),aZ=0,8k={};G b0={};y.1Q({2I:{},3v:3v,6g:{"cK":R,"1P":R,"eU":R},I:C(6,J,I){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r;7(!J&&!1T){E U}7(!1T){1T=++aZ}7(1a J==="1P"){6[3v]=1T;3r=2I[1T]=y.1Q(R,{},J)}Q 7(2I[1T]){3r=2I[1T]}Q 7(1a I==="1d"){3r=b0}Q{3r=2I[1T]={}}7(I!==1d){6[3v]=1T;3r[J]=I}E 1a J==="1R"?3r[J]:3r},50:C(6,J){7(6.1g&&y.6g[6.1g.28()]){E}6=6==1B?8k:6;G 1T=6[3v],2I=y.2I,3r=2I[1T];7(J){7(3r){3q 3r[J];7(y.9n(3r)){y.50(6)}}}Q{2E{3q 6[3v]}2G(e){7(6.8G){6.8G(3v)}}3q 2I[1T]}}});y.fn.1Q({I:C(1X,N){7(1a 1X==="1d"&&B.O){E y.I(B[0])}Q 7(1a 1X==="1P"){E B.1b(C(){y.I(B,1X)})}G 1k=1X.3d(".");1k[1]=1k[1]?"."+1k[1]:"";7(N===1d){G I=B.7G("eJ"+1k[1]+"!",[1k[0]]);7(I===1d&&B.O){I=y.I(B[0],1X)}E I===1d&&1k[1]?B.I(1k[0]):I}Q{E B.2q("eI"+1k[1]+"!",[1k[0],N]).1b(C(){y.I(B,1X,N)})}},50:C(1X){E B.1b(C(){y.50(B,1X)})}});y.1Q({2D:C(6,H,I){7(!6){E}H=(H||"fx")+"2D";G q=y.I(6,H);7(!I){E q||[]}7(!q||y.3f(I)){q=y.I(6,H,y.2P(I))}Q{q.1K(I)}E q},4K:C(6,H){H=H||"fx";G 2D=y.2D(6,H),fn=2D.4d();7(fn==="8F"){fn=2D.4d()}7(fn){7(H==="fx"){2D.8I("8F")}fn.1f(6,C(){y.4K(6,H)})}}});y.fn.1Q({2D:C(H,I){7(1a H!=="1R"){I=H;H="fx"}7(I===1d){E y.2D(B[0],H)}E B.1b(C(i,6){G 2D=y.2D(B,H,I);7(H==="fx"&&2D[0]!=="8F"){y.4K(B,H)}})},4K:C(H){E B.1b(C(){y.4K(B,H)})},ez:C(56,H){56=y.fx?y.fx.82[56]||56:56;H=H||"fx";E B.2D(H,C(){G 6=B;7N(C(){y.4K(6,H)},56)})},94:C(H){E B.2D(H||"fx",[])}});G 8E=/[\\n\\t]/g,7K=/\\s+/,bl=/\\r/g,b8=/3A|2L|18/,bb=/(3n|3O)/i,aV=/(3n|3O|1P|33|6n)/i,aU=/^(a|8n)$/i,aa=/4f|4V/;y.fn.1Q({3x:C(J,N){E 7t(B,J,N,R,y.3x)},ex:C(J,fn){E B.1b(C(){y.3x(B,J,"");7(B.19===1){B.8G(J)}})},8A:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.8A(N.1f(B,i,1s.3x("43")))})}7(N&&1a N==="1R"){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1){7(!6.1N){6.1N=N}Q{G 1N=" "+6.1N+" ";V(G c=0,cl=41.O;c<cl;c++){7(1N.2r(" "+41[c]+" ")<0){6.1N+=" "+41[c]}}}}}}E B},9u:C(N){7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.9u(N.1f(B,i,1s.3x("43")))})}7((N&&1a N==="1R")||N===1d){G 41=(N||"").3d(7K);V(G i=0,l=B.O;i<l;i++){G 6=B[i];7(6.19===1&&6.1N){7(N){G 1N=(" "+6.1N+" ").1H(8E," ");V(G c=0,cl=41.O;c<cl;c++){1N=1N.1H(" "+41[c]+" "," ")}6.1N=1N.ew(1,1N.O-1)}Q{6.1N=""}}}}E B},aR:C(N,6P){G H=1a N,b4=1a 6P==="7S";7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1s.aR(N.1f(B,i,1s.3x("43"),6P),6P)})}E B.1b(C(){7(H==="1R"){G 1N,i=0,1s=y(B),3K=6P,41=N.3d(7K);23((1N=41[i++])){3K=b4?3K:!1s.b6(1N);1s[3K?"8A":"9u"](1N)}}Q 7(H==="1d"||H==="7S"){7(B.1N){y.I(B,"ba",B.1N)}B.1N=B.1N||N===14?"":y.I(B,"ba")||""}})},b6:C(P){G 1N=" "+P+" ";V(G i=0,l=B.O;i<l;i++){7((" "+B[i].1N+" ").1H(8E," ").2r(1N)>-1){E R}}E 14},1j:C(N){7(N===1d){G 6=B[0];7(6){7(y.1g(6,"44")){E(6.eF.N||{}).bc?6.N:6.1U}7(y.1g(6,"33")){G 4p=6.5j,5D=[],1e=6.1e,4g=6.H==="33-4g";7(4p<0){E U}V(G i=4g?4p:0,58=4g?4p+1:1e.O;i<58;i++){G 44=1e[i];7(44.4Q){N=y(44).1j();7(4g){E N}5D.1K(N)}}E 5D}7(aa.17(6.H)&&!y.1Y.b7){E 6.3a("N")===U?"3J":6.N}E(6.N||"").1H(bl,"")}E 1d}G 1G=y.1G(N);E B.1b(C(i){G 1s=y(B),1j=N;7(B.19!==1){E}7(1G){1j=N.1f(B,i,1s.1j())}7(1a 1j==="5m"){1j+=""}7(y.3f(1j)&&aa.17(B.H)){B.3Q=y.4s(1s.1j(),1j)>=0}Q 7(y.1g(B,"33")){G 5D=y.2P(1j);y("44",B).1b(C(){B.4Q=y.4s(y(B).1j(),5D)>=0});7(!5D.O){B.5j=-1}}Q{B.N=1j}})}});y.1Q({7s:{1j:R,2R:R,1V:R,1U:R,I:R,2O:R,30:R,22:R},3x:C(6,J,N,4m){7(!6||6.19===3||6.19===8){E 1d}7(4m&&J 1A y.7s){E y(6)[J](N)}G 6b=6.19!==1||!y.8p(6),1l=N!==1d;J=6b&&y.3j[J]||J;7(6.19===1){G 2m=b8.17(J);7(J==="4Q"&&!y.1Y.b5){G 1M=6.1v;7(1M){1M.5j;7(1M.1v){1M.1v.5j}}}7(J 1A 6&&6b&&!2m){7(1l){7(J==="H"&&bb.17(6.1g)&&6.1v){y.2W("H dx dv\'t be ds")}6[J]=N}7(y.1g(6,"3P")&&6.5l(J)){E 6.5l(J).7n}7(J==="ap"){G 7L=6.5l("ap");E 7L&&7L.bc?7L.N:aV.17(6.1g)||aU.17(6.1g)&&6.3A?0:1d}E 6[J]}7(!y.1Y.18&&6b&&J==="18"){7(1l){6.18.aT=""+N}E 6.18.aT}7(1l){6.aS(J,""+N)}G 3x=!y.1Y.aW&&6b&&2m?6.3a(J,2):6.3a(J);E 3x===U?1d:3x}E y.18(6,J,N)}});G bi=C(aX){E aX.1H(/[^\\w\\s\\.\\|`]/g,C(ch){E"\\\\"+ch})};y.L={2M:C(6,2u,1y,I){7(6.19===3||6.19===8){E}7(6.6A&&(6!==1B&&!6.b1)){6=1B}7(!1y.21){1y.21=y.21++}7(I!==1d){G fn=1y;1y=y.2a(fn);1y.I=I}G 1I=y.I(6,"1I")||y.I(6,"1I",{}),1L=y.I(6,"1L"),7T;7(!1L){7T=C(){E 1a y!=="1d"&&!y.L.9x?y.L.1L.27(7T.6,1F):1d};1L=y.I(6,"1L",7T)}7(!1L){E}1L.6=6;2u=2u.3d(/\\s+/);G H,i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();7(i>1){1y=y.2a(1y);7(I!==1d){1y.I=I}}1y.H=24.2k(0).4Z().4R(".");G 40=1I[H],2m=B.2m[H]||{};7(!40){40=1I[H]={};7(!2m.4D||2m.4D.1f(6,I,24,1y)===14){7(6.4b){6.4b(H,1L,14)}Q 7(6.3L){6.3L("3J"+H,1L)}}}7(2m.2M){G 3W=2m.2M.1f(6,1y,I,24,40);7(3W&&y.1G(3W)){3W.21=3W.21||1y.21;3W.I=3W.I||1y.I;3W.H=3W.H||1y.H;1y=3W}}40[1y.21]=1y;B.3F[H]=R}6=U},3F:{},2p:C(6,2u,1y){7(6.19===3||6.19===8){E}G 1I=y.I(6,"1I"),M,H,fn;7(1I){7(2u===1d||(1a 2u==="1R"&&2u.dK(0)===".")){V(H 1A 1I){B.2p(6,H+(2u||""))}}Q{7(2u.H){1y=2u.1y;2u=2u.H}2u=2u.3d(/\\s+/);G i=0;23((H=2u[i++])){G 24=H.3d(".");H=24.4d();G 2K=!24.O,bC=y.2Y(24.2k(0).4Z(),bi),7Z=3g 5V("(^|\\\\.)"+bC.4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)"),2m=B.2m[H]||{};7(1I[H]){7(1y){fn=1I[H][1y.21];3q 1I[H][1y.21]}Q{V(G 1L 1A 1I[H]){7(2K||7Z.17(1I[H][1L].H)){3q 1I[H][1L]}}}7(2m.2p){2m.2p.1f(6,24,fn)}V(M 1A 1I[H]){2z}7(!M){7(!2m.5M||2m.5M.1f(6,24)===14){7(6.6X){6.6X(H,y.I(6,"1L"),14)}Q 7(6.7Q){6.7Q("3J"+H,y.I(6,"1L"))}}M=U;3q 1I[H]}}}}V(M 1A 1I){2z}7(!M){G 1L=y.I(6,"1L");7(1L){1L.6=U}y.50(6,"1I");y.50(6,"1L")}}},2q:C(L,I,6){G H=L.H||L,bD=1F[3];7(!bD){L=1a L==="1P"?L[3v]?L:y.1Q(y.57(H),L):y.57(H);7(H.2r("!")>=0){L.H=H=H.2k(0,-1);L.bo=R}7(!6){L.52();7(B.3F[H]){y.1b(y.2I,C(){7(B.1I&&B.1I[H]){y.L.2q(L,I,B.1L.6)}})}}7(!6||6.19===3||6.19===8){E 1d}L.2b=1d;L.1w=6;I=y.2P(I);I.8I(L)}L.6Q=6;G 1L=y.I(6,"1L");7(1L){1L.27(6,I)}G 1M=6.1v||6.1Z;2E{7(!(6&&6.1g&&y.6g[6.1g.28()])){7(6["3J"+H]&&6["3J"+H].27(6,I)===14){L.2b=14}}}2G(e){}7(!L.ai()&&1M){y.L.2q(L,I,1M,R)}Q 7(!L.ag()){G 1w=L.1w,26,bw=y.1g(1w,"a")&&H==="4c";7(!bw&&!(1w&&1w.1g&&y.6g[1w.1g.28()])){2E{7(1w[H]){26=1w["3J"+H];7(26){1w["3J"+H]=U}B.9x=R;1w[H]()}}2G(e){}7(26){1w["3J"+H]=26}B.9x=14}}},1L:C(L){G 2K,40;L=1F[0]=y.L.3Z(L||1B.L);L.6Q=B;G 24=L.H.3d(".");L.H=24.4d();2K=!24.O&&!L.bo;G 7Z=3g 5V("(^|\\\\.)"+24.2k(0).4Z().4R("\\\\.(?:.*\\\\.)?")+"(\\\\.|$)");40=(y.I(B,"1I")||{})[L.H];V(G j 1A 40){G 1y=40[j];7(2K||7Z.17(1y.H)){L.1y=1y;L.I=1y.I;G M=1y.27(B,1F);7(M!==1d){L.2b=M;7(M===14){L.4M();L.52()}}7(L.aj()){2z}}}E L.2b},3j:"dJ dF dA dD 3n dL 6w 9W aw 9C 6Q I dS dR 7J 1y 5S dN dO 9w dP dV dt do 9X aO dq du 6u dr dw ey av 1w as f9 g9 4Y".3d(" "),3Z:C(L){7(L[3v]){E L}G 5L=L;L=y.57(5L);V(G i=B.3j.O,1p;i;){1p=B.3j[--i];L[1p]=5L[1p]}7(!L.1w){L.1w=L.av||12}7(L.1w.19===3){L.1w=L.1w.1v}7(!L.6u&&L.7J){L.6u=L.7J===L.1w?L.as:L.7J}7(L.9X==U&&L.9W!=U){G 2e=12.2i,1i=12.1i;L.9X=L.9W+(2e&&2e.4v||1i&&1i.4v||0)-(2e&&2e.5K||1i&&1i.5K||0);L.aO=L.aw+(2e&&2e.4z||1i&&1i.4z||0)-(2e&&2e.5Q||1i&&1i.5Q||0)}7(!L.4Y&&((L.6w||L.6w===0)?L.6w:L.5S)){L.4Y=L.6w||L.5S}7(!L.9w&&L.9C){L.9w=L.9C}7(!L.4Y&&L.3n!==1d){L.4Y=(L.3n&1?1:(L.3n&2?3:(L.3n&4?2:0)))}E L},21:gb,2a:y.2a,2m:{3l:{4D:y.9E,5M:y.6y},2B:{2M:C(2a,I,24,2B){y.1Q(2a,I||{});2a.21+=I.P+I.2B;I.gd=2a;y.L.2M(B,I.2B,9M,I)},2p:C(24){7(24.O){G 2p=0,J=3g 5V("(^|\\\\.)"+24[0]+"(\\\\.|$)");y.1b((y.I(B,"1I").2B||{}),C(){7(J.17(B.H)){2p++}});7(2p<1){y.L.2p(B,24[0],9M)}}},2m:{}},gc:{4D:C(I,24,fn){7(B.6A){B.9Z=fn}E 14},5M:C(24,fn){7(B.9Z===fn){B.9Z=U}}}}};y.57=C(2L){7(!B.4M){E 3g y.57(2L)}7(2L&&2L.H){B.5L=2L;B.H=2L.H}Q{B.H=2L}B.eY=2Q();B[3v]=R};C 8d(){E 14}C 89(){E R}y.57.2T={4M:C(){B.ag=89;G e=B.5L;7(!e){E}7(e.4M){e.4M()}e.g3=14},52:C(){B.ai=89;G e=B.5L;7(!e){E}7(e.52){e.52()}e.fV=R},fU:C(){B.aj=89;B.52()},ag:8d,ai:8d,aj:8d};G a1=C(L){G 1M=L.6u;23(1M&&1M!==B){2E{1M=1M.1v}2G(e){2z}}7(1M!==B){L.H=L.I;y.L.1L.27(B,1F)}},am=C(L){L.H=L.I;y.L.1L.27(B,1F)};y.1b({6h:"bm",6M:"bv"},C(2U,3Z){y.L.2m[2U]={4D:C(I){y.L.2M(B,3Z,I&&I.P?am:a1,2U)},5M:C(I){y.L.2p(B,3Z,I&&I.P?am:a1)}}});7(!y.1Y.aA){y.L.2m.4t={4D:C(I,24,fn){7(B.1g.28()!=="3P"){y.L.2M(B,"4c.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="4t"||H==="8r")&&y(6).6v("3P").O){E 2q("4t",B,1F)}});y.L.2M(B,"9L.8f."+fn.21,C(e){G 6=e.1w,H=6.H;7((H==="1U"||H==="6o")&&y(6).6v("3P").O&&e.5S===13){E 2q("4t",B,1F)}})}Q{E 14}},2p:C(24,fn){y.L.2p(B,"4c.8f"+(fn?"."+fn.21:""));y.L.2p(B,"9L.8f"+(fn?"."+fn.21:""))}}}7(!y.1Y.bg){G 6Y=/6n|3O|33/i;C a5(6){G H=6.H,1j=6.N;7(H==="4f"||H==="4V"){1j=6.3Q}Q 7(H==="33-7D"){1j=6.5j>-1?y.2Y(6.1e,C(6){E 6.4Q}).4R("-"):""}Q 7(6.1g.28()==="33"){1j=6.5j}E 1j}C 6Z(e){G 6=e.1w,I,1j;7(!6Y.17(6.1g)||6.aE){E}I=y.I(6,"a2");1j=a5(6);7(e.H!=="6R"||6.H!=="4f"){y.I(6,"a2",1j)}7(I===1d||1j===I){E}7(I!=U||1j){e.H="6p";E y.L.2q(e,1F[1],6)}}y.L.2m.6p={3H:{6R:6Z,4c:C(e){G 6=e.1w,H=6.H;7(H==="4f"||H==="4V"||6.1g.28()==="33"){E 6Z.1f(B,e)}},bF:C(e){G 6=e.1w,H=6.H;7((e.5S===13&&6.1g.28()!=="6n")||(e.5S===32&&(H==="4V"||H==="4f"))||H==="33-7D"){E 6Z.1f(B,e)}},fZ:C(e){G 6=e.1w;7(6.1g.28()==="3O"&&6.H==="4f"){y.I(6,"a2",a5(6))}}},4D:C(I,24,fn){V(G H 1A 6I){y.L.2M(B,H+".az."+fn.21,6I[H])}E 6Y.17(B.1g)},2p:C(24,fn){V(G H 1A 6I){y.L.2p(B,H+".az"+(fn?"."+fn.21:""),6I[H])}E 6Y.17(B.1g)}};G 6I=y.L.2m.6p.3H}C 2q(H,6,1D){1D[0].H=H;E y.L.1L.27(6,1D)}7(12.4b){y.1b({9v:"a6",9A:"6R"},C(2U,3Z){y.L.2m[3Z]={4D:C(){B.4b(2U,1y,R)},5M:C(){B.6X(2U,1y,R)}};C 1y(e){e=y.L.3Z(e);e.H=3Z;E y.L.1L.1f(B,e)}})}y.1b(["8a","4g"],C(i,J){y.fn[J]=C(H,I,fn){7(1a H==="1P"){V(G 1X 1A H){B[J](1X,I,H[1X],fn)}E B}7(y.1G(I)){fn=I;I=1d}G 1y=J==="4g"?y.2a(fn,C(L){y(B).6W(L,1y);E fn.27(B,1F)}):fn;E H==="bj"&&J!=="4g"?B.4g(H,I,fn):B.1b(C(){y.L.2M(B,H,1y,I)})}});y.fn.1Q({6W:C(H,fn){7(1a H==="1P"&&!H.4M){V(G 1X 1A H){B.6W(1X,H[1X])}E B}E B.1b(C(){y.L.2p(B,H,fn)})},2q:C(H,I){E B.1b(C(){y.L.2q(H,I,B)})},7G:C(H,I){7(B[0]){G L=y.57(H);L.4M();L.52();y.L.2q(L,I,B[0]);E L.2b}},5r:C(fn){G 1D=1F,i=1;23(i<1D.O){y.2a(fn,1D[i++])}E B.4c(y.2a(fn,C(L){G 6q=(y.I(B,"6q"+fn.21)||0)%i;y.I(B,"6q"+fn.21,6q+1);L.4M();E 1D[6q].27(B,1F)||14}))},aK:C(9K,aL){E B.6h(9K).6M(aL||9K)}});y.1b(["2B","gs"],C(i,J){y.fn[J]=C(2u,I,fn){G H,i=0;7(y.1G(I)){fn=I;I=1d}2u=(2u||"").3d(/\\s+/);23((H=2u[i++])!=U){H=H==="9v"?"a6":H==="9A"?"6R":H==="aK"?2u.1K("6M")&&"6h":H;7(J==="2B"){y(B.T).8a(9U(H,B.P),{I:I,P:B.P,2B:H},fn)}Q{y(B.T).6W(9U(H,B.P),fn?{21:fn.21+B.P+H}:U)}}E B}});C 9M(L){G 62,1C=[],3h=[],1D=1F,6e,K,fn,6,j,i,l,I,2B=y.1Q({},y.I(B,"1I").2B);7(L.3n&&L.H==="4c"){E}V(j 1A 2B){fn=2B[j];7(fn.2B===L.H||fn.aI&&y.4s(L.H,fn.aI)>-1){I=fn.I;7(!(I.9O&&I.9O[L.H]&&!I.9O[L.H](L))){3h.1K(fn.P)}}Q{3q 2B[j]}}K=y(L.1w).6v(3h,L.6Q);V(i=0,l=K.O;i<l;i++){V(j 1A 2B){fn=2B[j];6=K[i].6;6e=U;7(K[i].P===fn.P){7(fn.2B==="6h"||fn.2B==="6M"){6e=y(L.6u).6v(fn.P)[0]}7(!6e||6e!==6){1C.1K({6:6,fn:fn})}}}}V(i=0,l=1C.O;i<l;i++){K=1C[i];L.6Q=K.6;L.I=K.fn.I;7(K.fn.27(K.6,1D)===14){62=14;2z}}E 62}C 9U(H,P){E"2B."+(H?H+".":"")+P.1H(/\\./g,"`").1H(/ /g,"&")}y.1b(("9A 9v a6 6R 76 fh 7Y bj 4c fi "+"fm fl fk bm bv 6h 6M "+"6p 33 4t bF 9L fb 2W").3d(" "),C(i,J){y.fn[J]=C(fn){E fn?B.8a(J,fn):B.2q(J)};7(y.7s){y.7s[J]=R}});7(1B.3L&&!1B.4b){1B.3L("f2",C(){V(G 1T 1A y.2I){7(y.2I[1T].1L){2E{y.L.2p(y.2I[1T].1L.6)}2G(e){}}}})}(C(){G 7k=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|[\'"][^\'"]*[\'"]|[^[\\]\'"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,3Y=0,4a=7x.2T.4a,49=14,9B=R;[0,0].4Z(C(){9B=14;E 0});G 1J=C(P,T,1q,4E){1q=1q||[];G aY=T=T||12;7(T.19!==1&&T.19!==9){E[]}7(!P||1a P!=="1R"){E 1q}G 1k=[],m,1l,1r,3I,9y=R,6t=2d(T),9J=P;23((7k.29(""),m=7k.29(9J))!==U){9J=m[3];1k.1K(m[1]);7(m[2]){3I=m[3];2z}}7(1k.O>1&&bs.29(P)){7(1k.O===2&&1t.3V[1k[0]]){1l=8V(1k[0]+1k[1],T)}Q{1l=1t.3V[1k[0]]?[T]:1J(1k.4d(),T);23(1k.O){P=1k.4d();7(1t.3V[P]){P+=1k.4d()}1l=8V(P,1l)}}}Q{7(!4E&&1k.O>1&&T.19===9&&!6t&&1t.K.45.17(1k[0])&&!1t.K.45.17(1k[1k.O-1])){G M=1J.2y(1k.4d(),T,6t);T=M.1z?1J.1u(M.1z,M.1l)[0]:M.1l[0]}7(T){G M=4E?{1z:1k.4e(),1l:2P(4E)}:1J.2y(1k.4e(),1k.O===1&&(1k[0]==="~"||1k[0]==="+")&&T.1v?T.1v:T,6t);1l=M.1z?1J.1u(M.1z,M.1l):M.1l;7(1k.O>0){1r=2P(1l)}Q{9y=14}23(1k.O){G 1h=1k.4e(),4e=1h;7(!1t.3V[1h]){1h=""}Q{4e=1k.4e()}7(4e==U){4e=T}1t.3V[1h](1r,4e,6t)}}Q{1r=1k=[]}}7(!1r){1r=1l}7(!1r){1J.2W(1h||P)}7(4a.1f(1r)==="[1P 3X]"){7(!9y){1q.1K.27(1q,1r)}Q 7(T&&T.19===1){V(G i=0;1r[i]!=U;i++){7(1r[i]&&(1r[i]===R||1r[i].19===1&&4r(T,1r[i]))){1q.1K(1l[i])}}}Q{V(G i=0;1r[i]!=U;i++){7(1r[i]&&1r[i].19===1){1q.1K(1l[i])}}}}Q{2P(1r,1q)}7(3I){1J(3I,aY,1q,4E);1J.8N(1q)}E 1q};1J.8N=C(1q){7(64){49=9B;1q.4Z(64);7(49){V(G i=1;i<1q.O;i++){7(1q[i]===1q[i-1]){1q.3S(i--,1)}}}}E 1q};1J.4u=C(1z,1l){E 1J(1z,U,U,1l)};1J.2y=C(1z,T,2d){G 1l,K;7(!1z){E[]}V(G i=0,l=1t.78.O;i<l;i++){G H=1t.78[i],K;7((K=1t.77[H].29(1z))){G 1m=K[1];K.3S(1,1);7(1m.73(1m.O-1)!=="\\\\"){K[1]=(K[1]||"").1H(/\\\\/g,"");1l=1t.2y[H](K,T,2d);7(1l!=U){1z=1z.1H(1t.K[H],"");2z}}}}7(!1l){1l=T.2N("*")}E{1l:1l,1z:1z}};1J.1u=C(1z,1l,3y,2F){G 26=1z,2b=[],2S=1l,K,5e,b2=1l&&1l[0]&&2d(1l[0]);23(1z&&1l.O){V(G H 1A 1t.1u){7((K=1t.77[H].29(1z))!=U&&K[2]){G 1u=1t.1u[H],5w,6f,1m=K[1];5e=14;K.3S(1,1);7(1m.73(1m.O-1)==="\\\\"){9F}7(2S===2b){2b=[]}7(1t.8u[H]){K=1t.8u[H](K,2S,3y,2b,2F,b2);7(!K){5e=5w=R}Q 7(K===R){9F}}7(K){V(G i=0;(6f=2S[i])!=U;i++){7(6f){5w=1u(6f,K,i,2S);G 4m=2F^!!5w;7(3y&&5w!=U){7(4m){5e=R}Q{2S[i]=14}}Q 7(4m){2b.1K(6f);5e=R}}}}7(5w!==1d){7(!3y){2S=2b}1z=1z.1H(1t.K[H],"");7(!5e){E[]}2z}}}7(1z===26){7(5e==U){1J.2W(1z)}Q{2z}}26=1z}E 2S};1J.2W=C(7e){bd"bz 2W, bx by: "+7e};G 1t=1J.3h={78:["45","8C","5E"],K:{45:/#((?:[\\w\\5u-\\5y-]|\\\\.)+)/,6i:/\\.((?:[\\w\\5u-\\5y-]|\\\\.)+)/,8C:/\\[J=[\'"]*((?:[\\w\\5u-\\5y-]|\\\\.)+)[\'"]*\\]/,9d:/\\[\\s*((?:[\\w\\5u-\\5y-]|\\\\.)+)\\s*(?:(\\S?=)\\s*([\'"]*)(.*?)\\3|)\\s*\\]/,5E:/^((?:[\\w\\5u-\\5y\\*-]|\\\\.)+)/,79:/:(bH|4H|4o|2j)-fJ(?:\\((7q|7E|[\\dn+-]*)\\))?/,5p:/:(4H|eq|gt|bB|2j|4o|7q|7E)(?:\\((\\d*)\\))?(?=[^-]|$)/,6N:/:((?:[\\w\\5u-\\5y-]|\\\\.)+)(?:\\(([\'"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/},77:{},8z:{"43":"1N","V":"b9"},7f:{3A:C(6){E 6.3a("3A")}},3V:{"+":C(1r,1W){G 5a=1a 1W==="1R",9c=5a&&!/\\W/.17(1W),8g=5a&&!9c;7(9c){1W=1W.28()}V(G i=0,l=1r.O,6;i<l;i++){7((6=1r[i])){23((6=6.65)&&6.19!==1){}1r[i]=8g||6&&6.1g.28()===1W?6||14:6===1W}}7(8g){1J.1u(1W,1r,R)}},">":C(1r,1W){G 5a=1a 1W==="1R";7(5a&&!/\\W/.17(1W)){1W=1W.28();V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){G 1M=6.1v;1r[i]=1M.1g.28()===1W?1M:14}}}Q{V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){1r[i]=5a?6.1v:6.1v===1W}}7(5a){1J.1u(1W,1r,R)}}},"":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("1v",1W,39,1r,5H,2d)},"~":C(1r,1W,2d){G 39=3Y++,5C=8X;7(1a 1W==="1R"&&!/\\W/.17(1W)){G 5H=1W=1W.28();5C=8Y}5C("65",1W,39,1r,5H,2d)}},2y:{45:C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?[m]:[]}},8C:C(K,T){7(1a T.bf!=="1d"){G M=[],1q=T.bf(K[1]);V(G i=0,l=1q.O;i<l;i++){7(1q[i].3a("J")===K[1]){M.1K(1q[i])}}E M.O===0?U:M}},5E:C(K,T){E T.2N(K[1])}},8u:{6i:C(K,2S,3y,2b,2F,2d){K=" "+K[1].1H(/\\\\/g,"")+" ";7(2d){E K}V(G i=0,6;(6=2S[i])!=U;i++){7(6){7(2F^(6.1N&&(" "+6.1N+" ").1H(/[\\t\\n]/g," ").2r(K)>=0)){7(!3y){2b.1K(6)}}Q 7(3y){2S[i]=14}}}E 14},45:C(K){E K[1].1H(/\\\\/g,"")},5E:C(K,2S){E K[1].28()},79:C(K){7(K[1]==="4H"){G 17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.29(K[2]==="7q"&&"2n"||K[2]==="7E"&&"2n+1"||!/\\D/.17(K[2])&&"fM+"+K[2]||K[2]);K[2]=(17[1]+(17[2]||1))-0;K[3]=17[3]-0}K[0]=3Y++;E K},9d:C(K,2S,3y,2b,2F,2d){G J=K[1].1H(/\\\\/g,"");7(!2d&&1t.8z[J]){K[1]=1t.8z[J]}7(K[2]==="~="){K[4]=" "+K[4]+" "}E K},6N:C(K,2S,3y,2b,2F){7(K[1]==="2F"){7((7k.29(K[3])||"").O>1||/^\\w/.17(K[3])){K[3]=1J(K[3],U,U,2S)}Q{G M=1J.1u(K[3],2S,3y,R^2F);7(!3y){2b.1K.27(2b,M)}E 14}}Q 7(1t.K.5p.17(K[0])||1t.K.79.17(K[0])){E R}E K},5p:C(K){K.8I(R);E K}},3H:{fu:C(6){E 6.71===14&&6.H!=="2X"},71:C(6){E 6.71===R},3Q:C(6){E 6.3Q===R},4Q:C(6){6.1v.5j;E 6.4Q===R},1M:C(6){E!!6.1S},5G:C(6){E!6.1S},cN:C(6,i,K){E!!1J(K[3],6).O},fq:C(6){E/h\\d/i.17(6.1g)},1U:C(6){E"1U"===6.H},4f:C(6){E"4f"===6.H},4V:C(6){E"4V"===6.H},7P:C(6){E"7P"===6.H},6o:C(6){E"6o"===6.H},4t:C(6){E"4t"===6.H},8r:C(6){E"8r"===6.H},bh:C(6){E"bh"===6.H},3n:C(6){E"3n"===6.H||6.1g.28()==="3n"},3O:C(6){E/3O|33|6n|3n/i.17(6.1g)}},bt:{2j:C(6,i){E i===0},4o:C(6,i,K,1E){E i===1E.O-1},7q:C(6,i){E i%2===0},7E:C(6,i){E i%2===1},bB:C(6,i,K){E i<K[3]-0},gt:C(6,i,K){E i>K[3]-0},4H:C(6,i,K){E K[3]-0===i},eq:C(6,i,K){E K[3]-0===i}},1u:{6N:C(6,K,i,1E){G J=K[1],1u=1t.3H[J];7(1u){E 1u(6,i,K,1E)}Q 7(J==="4r"){E(6.bA||6.fC||5Z([6])||"").2r(K[3])>=0}Q 7(J==="2F"){G 2F=K[3];V(G i=0,l=2F.O;i<l;i++){7(2F[i]===6){E 14}}E R}Q{1J.2W("bz 2W, bx by: "+J)}},79:C(6,K){G H=K[1],2t=6;fs(H){7r\'bH\':7r\'2j\':23((2t=2t.65)){7(2t.19===1){E 14}}7(H==="2j"){E R}2t=6;7r\'4o\':23((2t=2t.4i)){7(2t.19===1){E 14}}E R;7r\'4H\':G 2j=K[2],4o=K[3];7(2j===1&&4o===0){E R}G 39=K[0],1M=6.1v;7(1M&&(1M.5F!==39||!6.9h)){G bE=0;V(2t=1M.1S;2t;2t=2t.4i){7(2t.19===1){2t.9h=++bE}}1M.5F=39}G 4B=6.9h-4o;7(2j===0){E 4B===0}Q{E(4B%2j===0&&4B/2j>=0)}}},45:C(6,K){E 6.19===1&&6.3a("1T")===K},5E:C(6,K){E(K==="*"&&6.19===1)||6.1g.28()===K},6i:C(6,K){E(" "+(6.1N||6.3a("43"))+" ").2r(K)>-1},9d:C(6,K){G J=K[1],2b=1t.7f[J]?1t.7f[J](6):6[J]!=U?6[J]:6.3a(J),N=2b+"",H=K[2],3t=K[4];E 2b==U?H==="!=":H==="="?N===3t:H==="*="?N.2r(3t)>=0:H==="~="?(" "+N+" ").2r(3t)>=0:!3t?N&&2b!==14:H==="!="?N!==3t:H==="^="?N.2r(3t)===0:H==="$="?N.73(N.O-3t.O)===3t:H==="|="?N===3t||N.73(0,3t.O+1)===3t+"-":14},5p:C(6,K,i,1E){G J=K[2],1u=1t.bt[J];7(1u){E 1u(6,i,K,1E)}}}};G bs=1t.K.5p;V(G H 1A 1t.K){1t.K[H]=3g 5V(1t.K[H].74+/(?![^\\[]*\\])(?![^\\(]*\\))/.74);1t.77[H]=3g 5V(/(^(?:.|\\r|\\n)*?)/.74+1t.K[H].74.1H(/\\\\(\\d+)/g,C(2K,3B){E"\\\\"+(3B-0+1)}))}G 2P=C(1E,1q){1E=3X.2T.2k.1f(1E,0);7(1q){1q.1K.27(1q,1E);E 1q}E 1E};2E{3X.2T.2k.1f(12.2i.47,0)}2G(e){2P=C(1E,1q){G M=1q||[];7(4a.1f(1E)==="[1P 3X]"){3X.2T.1K.27(M,1E)}Q{7(1a 1E.O==="5m"){V(G i=0,l=1E.O;i<l;i++){M.1K(1E[i])}}Q{V(G i=0;1E[i];i++){M.1K(1E[i])}}}E M}}G 64;7(12.2i.5s){64=C(a,b){7(!a.5s||!b.5s){7(a==b){49=R}E a.5s?-1:1}G M=a.5s(b)&4?-1:a===b?0:1;7(M===0){49=R}E M}}Q 7("61"1A 12.2i){64=C(a,b){7(!a.61||!b.61){7(a==b){49=R}E a.61?-1:1}G M=a.61-b.61;7(M===0){49=R}E M}}Q 7(12.9s){64=C(a,b){7(!a.1Z||!b.1Z){7(a==b){49=R}E a.1Z?-1:1}G 7C=a.1Z.9s(),7g=b.1Z.9s();7C.au(a,0);7C.aq(a,0);7g.au(b,0);7g.aq(b,0);G M=7C.gv(gy.gz,7g);7(M===0){49=R}E M}}C 5Z(1C){G M="",6;V(G i=0;1C[i];i++){6=1C[i];7(6.19===3||6.19===4){M+=6.7n}Q 7(6.19!==8){M+=5Z(6.47)}}E M}(C(){G 3P=12.2x("Y"),1T="1x"+(3g aP).aH();3P.3p="<a J=\'"+1T+"\'/>";G 2Z=12.2i;2Z.3C(3P,2Z.1S);7(12.5z(1T)){1t.2y.45=C(K,T,2d){7(1a T.5z!=="1d"&&!2d){G m=T.5z(K[1]);E m?m.1T===K[1]||1a m.5l!=="1d"&&m.5l("1T").7n===K[1]?[m]:1d:[]}};1t.1u.45=C(6,K){G 2t=1a 6.5l!=="1d"&&6.5l("1T");E 6.19===1&&2t&&2t.7n===K}}2Z.3u(3P);2Z=3P=U})();(C(){G Y=12.2x("Y");Y.3N(12.g1(""));7(Y.2N("*").O>0){1t.2y.5E=C(K,T){G 1q=T.2N(K[1]);7(K[1]==="*"){G 6l=[];V(G i=0;1q[i];i++){7(1q[i].19===1){6l.1K(1q[i])}}1q=6l}E 1q}}Y.3p="<a 3A=\'#\'></a>";7(Y.1S&&1a Y.1S.3a!=="1d"&&Y.1S.3a("3A")!=="#"){1t.7f.3A=C(6){E 6.3a("3A",2)}}Y=U})();7(12.7A){(C(){G 70=1J,Y=12.2x("Y");Y.3p="<p 43=\'aF\'></p>";7(Y.7A&&Y.7A(".aF").O===0){E}1J=C(9G,T,3I,4E){T=T||12;7(!4E&&T.19===9&&!2d(T)){2E{E 2P(T.7A(9G),3I)}2G(e){}}E 70(9G,T,3I,4E)};V(G 1p 1A 70){1J[1p]=70[1p]}Y=U})()}(C(){G Y=12.2x("Y");Y.3p="<Y 43=\'17 e\'></Y><Y 43=\'17\'></Y>";7(!Y.6d||Y.6d("e").O===0){E}Y.an.1N="e";7(Y.6d("e").O===1){E}1t.78.3S(1,0,"6i");1t.2y.6i=C(K,T,2d){7(1a T.6d!=="1d"&&!2d){E T.6d(K[1])}};Y=U})();C 8Y(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1&&!2d){6.5F=39;6.7B=i}7(6.1g.28()===1h){K=6;2z}6=6[2J]}1r[i]=K}}}C 8X(2J,1h,39,1r,5H,2d){V(G i=0,l=1r.O;i<l;i++){G 6=1r[i];7(6){6=6[2J];G K=14;23(6){7(6.5F===39){K=1r[6.7B];2z}7(6.19===1){7(!2d){6.5F=39;6.7B=i}7(1a 1h!=="1R"){7(6===1h){K=R;2z}}Q 7(1J.1u(1h,[6]).O>0){K=6;2z}}6=6[2J]}1r[i]=K}}}G 4r=12.5s?C(a,b){E a.5s(b)&16}:C(a,b){E a!==b&&(a.4r?a.4r(b):R)};G 2d=C(6){G 2i=(6?6.1Z||6:0).2i;E 2i?2i.1g!=="g2":14};G 8V=C(P,T){G 8O=[],8P="",K,2Z=T.19?[T]:T;23((K=1t.K.6N.29(P))){8P+=K[0];P=P.1H(1t.K.6N,"")}P=1t.3V[P]?P+"*":P;V(G i=0,l=2Z.O;i<l;i++){1J(P,2Z[i],8O)}E 1J.1u(8P,8O)};y.2y=1J;y.1z=1J.3h;y.1z[":"]=y.1z.3H;y.9j=1J.8N;y.5Z=5Z;y.8p=2d;y.4r=4r;E;1B.1J=1J})();G d3=/g0$/,cU=/^(?:d4|bJ|cX)/,d1=/,/,2k=3X.2T.2k;G 97=C(53,3G,6k){7(y.1G(3G)){E y.5Y(53,C(6,i){E!!3G.1f(6,i,6)===6k})}Q 7(3G.19){E y.5Y(53,C(6,i){E(6===3G)===6k})}Q 7(1a 3G==="1R"){G 8U=y.5Y(53,C(6){E 6.19===1});7(cO.17(3G)){E y.1u(3G,8U,!6k)}Q{3G=y.1u(3G,8U)}}E y.5Y(53,C(6,i){E(y.4s(6,3G)>=0)===6k})};y.fn.1Q({2y:C(P){G M=B.3s("","2y",P),O=0;V(G i=0,l=B.O;i<l;i++){O=M.O;y.2y(P,B[i],M);7(i>0){V(G n=O;n<M.O;n++){V(G r=0;r<O;r++){7(M[r]===M[n]){M.3S(n--,1);2z}}}}}E M},cN:C(1w){G 96=y(1w);E B.1u(C(){V(G i=0,l=96.O;i<l;i++){7(y.4r(B,96[i])){E R}}})},2F:C(P){E B.3s(97(B,P,14),"2F",P)},1u:C(P){E B.3s(97(B,P,R),"1u",P)},67:C(P){E!!P&&y.1u(P,B).O>0},6v:C(3h,T){7(y.3f(3h)){G M=[],1h=B[0],K,4u={},P;7(1h&&3h.O){V(G i=0,l=3h.O;i<l;i++){P=3h[i];7(!4u[P]){4u[P]=y.1z.K.5p.17(P)?y(P,T||B.T):P}}23(1h&&1h.1Z&&1h!==T){V(P 1A 4u){K=4u[P];7(K.6j?K.4p(1h)>-1:y(1h).67(K)){M.1K({P:P,6:1h});3q 4u[P]}}1h=1h.1v}}E M}G 5q=y.1z.K.5p.17(3h)?y(3h,T||B.T):U;E B.2Y(C(i,1h){23(1h&&1h.1Z&&1h!==T){7(5q?5q.4p(1h)>-1:y(1h).67(3h)){E 1h}1h=1h.1v}E U})},4p:C(6){7(!6||1a 6==="1R"){E y.4s(B[0],6?y(6):B.1M().cZ())}E y.4s(6.6j?6[0]:6,B)},2M:C(P,T){G 1l=1a P==="1R"?y(P,T||B.T):y.2P(P),2K=y.7p(B.54(),1l);E B.3s(9o(1l[0])||9o(2K[0])?2K:y.9j(2K))},gx:C(){E B.2M(B.9k)}});C 9o(2t){E!2t||!2t.1v||2t.1v.19===11}y.1b({1M:C(6){G 1M=6.1v;E 1M&&1M.19!==11?1M:U},d4:C(6){E y.2J(6,"1v")},gn:C(6,i,3m){E y.2J(6,"1v",3m)},7m:C(6){E y.4H(6,2,"4i")},gq:C(6){E y.4H(6,2,"65")},f0:C(6){E y.2J(6,"4i")},cX:C(6){E y.2J(6,"65")},f4:C(6,i,3m){E y.2J(6,"4i",3m)},bJ:C(6,i,3m){E y.2J(6,"65",3m)},fp:C(6){E y.98(6.1v.1S,6)},cZ:C(6){E y.98(6.1S)},6V:C(6){E y.1g(6,"fF")?6.fP||6.fO.12:y.2P(6.47)}},C(J,fn){y.fn[J]=C(3m,P){G M=y.2Y(B,fn,3m);7(!d3.17(J)){P=3m}7(P&&1a P==="1R"){M=y.1u(P,M)}M=B.O>1?y.9j(M):M;7((B.O>1||d1.17(P))&&cU.17(J)){M=M.fN()}E B.3s(M,J,2k.1f(1F).4R(","))}});y.1Q({1u:C(1z,1C,2F){7(2F){1z=":2F("+1z+")"}E y.2y.4u(1z,1C)},2J:C(6,2J,3m){G 9b=[],1h=6[2J];23(1h&&1h.19!==9&&(3m===1d||1h.19!==1||!y(1h).67(3m))){7(1h.19===1){9b.1K(1h)}1h=1h[2J]}E 9b},4H:C(1h,2b,2J,6){2b=2b||1;G 3B=0;V(;1h;1h=1h[2J]){7(1h.19===1&&++3B===2b){2z}}E 1h},98:C(n,6){G r=[];V(;n;n=n.4i){7(n.19===1&&n!==6){r.1K(n)}}E r}});G 8t=/ y\\d+="(?:\\d+|U)"/g,6J=/^\\s+/,a0=/(<([\\w:]+)[^>]*?)\\/>/g,cQ=/^(?:8n|br|d7|cK|fE|fD|3O|9f|ft|6s)$/i,a4=/<([\\w:]+)/,bK=/<2A/i,bX=/<|&\\w+;/,8J=/3Q\\s*(?:[^=]|=\\s*.3Q.)/i,a3=C(2K,d6,5x){E cQ.17(5x)?2K:d6+"></"+5x+">"},34={44:[1,"<33 7D=\'7D\'>","</33>"],fr:[1,"<d5>","</d5>"],d8:[1,"<2f>","</2f>"],59:[2,"<2f><2A>","</2A></2f>"],4I:[3,"<2f><2A><59>","</59></2A></2f>"],d7:[2,"<2f><2A></2A><8m>","</8m></2f>"],8n:[1,"<2Y>","</2Y>"],4k:[0,"",""]};34.fe=34.44;34.2A=34.fy=34.8m=34.fz=34.d8;34.fB=34.4I;7(!y.1Y.da){34.4k=[1,"Y<Y>","</Y>"]}y.fn.1Q({1U:C(1U){7(y.1G(1U)){E B.1b(C(i){G 1s=y(B);1s.1U(1U.1f(B,i,1s.1U()))})}7(1a 1U!=="1P"&&1U!==1d){E B.5G().3U((B[0]&&B[0].1Z||12).6x(1U))}E y.5Z(B)},7d:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).7d(1V.1f(B,i))})}7(B[0]){G 46=y(1V,B[0].1Z).eq(0).6z(R);7(B[0].1v){46.3C(B[0])}46.2Y(C(){G 6=B;23(6.1S&&6.1S.19===1){6=6.1S}E 6}).3U(B)}E B},dd:C(1V){7(y.1G(1V)){E B.1b(C(i){y(B).dd(1V.1f(B,i))})}E B.1b(C(){G 1s=y(B),6V=1s.6V();7(6V.O){6V.7d(1V)}Q{1s.3U(1V)}})},46:C(1V){E B.1b(C(){y(B).7d(1V)})},fw:C(){E B.1M().1b(C(){7(!y.1g(B,"1i")){y(B).6D(B.47)}}).3o()},3U:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3N(6)}})},c6:C(){E B.5d(1F,R,C(6){7(B.19===1){B.3C(6,B.1S)}})},7h:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B)})}Q 7(1F.O){G 1l=y(1F[0]);1l.1K.27(1l,B.7b());E B.3s(1l,"7h",1F)}},8q:C(){7(B[0]&&B[0].1v){E B.5d(1F,14,C(6){B.1v.3C(6,B.4i)})}Q 7(1F.O){G 1l=B.3s(B,"8q",1F);1l.1K.27(1l,y(1F[0]).7b());E 1l}},6z:C(1I){G M=B.2Y(C(){7(!y.1Y.8j&&!y.8p(B)){G 1V=B.fv,1Z=B.1Z;7(!1V){G Y=1Z.2x("Y");Y.3N(B.5k(R));1V=Y.3p}E y.ac([1V.1H(8t,"").1H(6J,"")],1Z)[0]}Q{E B.5k(R)}});7(1I===R){8y(B,M);8y(B.2y("*"),M.2y("*"))}E M},1V:C(N){7(N===1d){E B[0]&&B[0].19===1?B[0].3p.1H(8t,""):U}Q 7(1a N==="1R"&&!/<1x/i.17(N)&&(y.1Y.ak||!6J.17(N))&&!34[(a4.29(N)||["",""])[1].28()]){N=N.1H(a0,a3);2E{V(G i=0,l=B.O;i<l;i++){7(B[i].19===1){y.69(B[i].2N("*"));B[i].3p=N}}}2G(e){B.5G().3U(N)}}Q 7(y.1G(N)){B.1b(C(i){G 1s=y(B),26=1s.1V();1s.5G().3U(C(){E N.1f(B,i,26)})})}Q{B.5G().3U(N)}E B},6D:C(N){7(B[0]&&B[0].1v){7(!y.1G(N)){N=y(N).cT()}Q{E B.1b(C(i){G 1s=y(B),26=1s.1V();1s.6D(N.1f(B,i,26))})}E B.1b(C(){G 7m=B.4i,1M=B.1v;y(B).2p();7(7m){y(7m).7h(N)}Q{y(1M).3U(N)}})}Q{E B.3s(y(y.1G(N)?N():N),"6D",N)}},cT:C(P){E B.2p(P,R)},5d:C(1D,2f,1o){G 1q,2j,N=1D[0],4h=[];7(!y.1Y.7l&&1F.O===3&&1a N==="1R"&&8J.17(N)){E B.1b(C(){y(B).5d(1D,2f,1o,R)})}7(y.1G(N)){E B.1b(C(i){G 1s=y(B);1D[0]=N.1f(B,i,2f?1s.1V():1d);1s.5d(1D,2f,1o)})}7(B[0]){7(1D[0]&&1D[0].1v&&1D[0].1v.19===11){1q={2v:1D[0].1v}}Q{1q=8B(1D,B,4h)}2j=1q.2v.1S;7(2j){2f=2f&&y.1g(2j,"59");V(G i=0,l=B.O;i<l;i++){1o.1f(2f?2Z(B[i],2j):B[i],1q.5c||B.O>1||i>0?1q.2v.5k(R):1q.2v)}}7(4h){y.1b(4h,c1)}}E B;C 2Z(6,1h){E y.1g(6,"2f")?(6.2N("2A")[0]||6.3N(6.1Z.2x("2A"))):6}}});C 8y(2U,M){G i=0;M.1b(C(){7(B.1g!==(2U[i]&&2U[i].1g)){E}G 7j=y.I(2U[i++]),8D=y.I(B,7j),1I=7j&&7j.1I;7(1I){3q 8D.1L;8D.1I={};V(G H 1A 1I){V(G 1y 1A 1I[H]){y.L.2M(B,H,1I[H][1y],1I[H][1y].I)}}}})}C 8B(1D,6G,4h){G 2v,5c,5A,2e;7(1D.O===1&&1a 1D[0]==="1R"&&1D[0].O<fL&&1D[0].2r("<44")<0&&(y.1Y.7l||!8J.17(1D[0]))){5c=R;5A=y.8K[1D[0]];7(5A){7(5A!==1){2v=5A}}}7(!2v){2e=(6G&&6G[0]?6G[0].1Z||6G[0]:12);2v=2e.c9();y.ac(1D,2e,2v,4h)}7(5c){y.8K[1D[0]]=5A?2v:1}E{2v:2v,5c:5c}}y.8K={};y.1b({dh:"3U",fG:"c6",3C:"7h",fH:"8q",fI:"6D"},C(J,c7){y.fn[J]=C(P){G M=[],7c=y(P);V(G i=0,l=7c.O;i<l;i++){G 1C=(i>0?B.6z(R):B).54();y.fn[c7].27(y(7c[i]),1C);M=M.7V(1C)}E B.3s(M,J,7c.P)}});y.1b({2p:C(P,bY){7(!P||y.1u(P,[B]).O){7(!bY&&B.19===1){y.69(B.2N("*"));y.69([B])}7(B.1v){B.1v.3u(B)}}},5G:C(){7(B.19===1){y.69(B.2N("*"))}23(B.1S){B.3u(B.1S)}}},C(J,fn){y.fn[J]=C(){E B.1b(fn,1F)}});y.1Q({ac:C(1C,T,2v,4h){T=T||12;7(1a T.2x==="1d"){T=T.1Z||T[0]&&T[0].1Z||12}G M=[];y.1b(1C,C(i,6){7(1a 6==="5m"){6+=""}7(!6){E}7(1a 6==="1R"&&!bX.17(6)){6=T.6x(6)}Q 7(1a 6==="1R"){6=6.1H(a0,a3);G 5x=(a4.29(6)||["",""])[1].28(),46=34[5x]||34.4k,bM=46[0],Y=T.2x("Y");Y.3p=46[1]+6+46[2];23(bM--){Y=Y.an}7(!y.1Y.2A){G ao=bK.17(6),2A=5x==="2f"&&!ao?Y.1S&&Y.1S.47:46[1]==="<2f>"&&!ao?Y.47:[];V(G j=2A.O-1;j>=0;--j){7(y.1g(2A[j],"2A")&&!2A[j].47.O){2A[j].1v.3u(2A[j])}}}7(!y.1Y.ak&&6J.17(6)){Y.3C(T.6x(6J.29(6)[0]),Y.1S)}6=y.2P(Y.47)}7(6.19){M.1K(6)}Q{M=y.7p(M,6)}});7(2v){V(G i=0;M[i];i++){7(4h&&y.1g(M[i],"1x")&&(!M[i].H||M[i].H.28()==="1U/4S")){4h.1K(M[i].1v?M[i].1v.3u(M[i]):M[i])}Q{7(M[i].19===1){M.3S.27(M,[i+1,0].7V(y.2P(M[i].2N("1x"))))}2v.3N(M[i])}}}E M},69:C(1C){V(G i=0,6,1T;(6=1C[i])!=U;i++){y.L.2p(6);y.50(6)}}});G cw=/z-?4p|f6-?f7|2o|cB|f8-?30/i,9Y=/cF\\([^)]*\\)/,a7=/2o=([^)]*)/,7v=/9H/i,7M=/-([a-z])/f5,cd=/([A-Z])/g,ck=/^-?\\d+(?:5n)?$/i,cm=/^-?\\d/,cC={31:"7z",bQ:"2X",2c:"86"},ci=["bq","eZ"],cj=["bu","f1"],5I=12.37&&12.37.5I,7w=y.1Y.7y?"7y":"7w",7O=C(2K,cx){E cx.8c()};y.fn.2R=C(J,N){E 7t(B,J,N,R,C(6,J,N){7(N===1d){E y.2C(6,J)}7(1a N==="5m"&&!cw.17(J)){N+="5n"}y.18(6,J,N)})};y.1Q({18:C(6,J,N){7(!6||6.19===3||6.19===8){E 1d}7((J==="2O"||J==="30")&&2w(N)<0){N=1d}G 18=6.18||6,1l=N!==1d;7(!y.1Y.2o&&J==="2o"){7(1l){18.cB=1;G 2o=8T(N,10)+""==="fj"?"":"cF(2o="+N*a9+")";G 1u=18.1u||y.2C(6,"1u")||"";18.1u=9Y.17(1u)?1u.1H(9Y,2o):2o}E 18.1u&&18.1u.2r("2o=")>=0?(2w(a7.29(18.1u)[1])/a9)+"":""}7(7v.17(J)){J=7w}J=J.1H(7M,7O);7(1l){18[J]=N}E 18[J]},2R:C(6,J,5N,3I){7(J==="2O"||J==="30"){G 1j,3j=cC,4Y=J==="2O"?ci:cj;C ah(){1j=J==="2O"?6.7F:6.co;7(3I==="5J"){E}y.1b(4Y,C(){7(!3I){1j-=2w(y.2C(6,"75"+B,R))||0}7(3I==="4L"){1j+=2w(y.2C(6,"4L"+B,R))||0}Q{1j-=2w(y.2C(6,"5J"+B+"aQ",R))||0}})}7(6.7F!==0){ah()}Q{y.cn(6,3j,ah)}E 4x.58(0,4x.fd(1j))}E y.2C(6,J,5N)},2C:C(6,J,5N){G M,18=6.18,1u;7(!y.1Y.2o&&J==="2o"&&6.4C){M=a7.17(6.4C.1u||"")?(2w(5V.$1)/a9)+"":"";E M===""?"1":M}7(7v.17(J)){J=7w}7(!5N&&18&&18[J]){M=18[J]}Q 7(5I){7(7v.17(J)){J="9H"}J=J.1H(cd,"-$1").28();G 37=6.1Z.37;7(!37){E U}G 3D=37.5I(6,U);7(3D){M=3D.fc(J)}7(J==="2o"&&M===""){M="1"}}Q 7(6.4C){G 9N=J.1H(7M,7O);M=6.4C[J]||6.4C[9N];7(!ck.17(M)&&cm.17(M)){G 1m=18.1m,cp=6.9Q.1m;6.9Q.1m=6.4C.1m;18.1m=9N==="ff"?"fg":(M||0);M=18.fQ+"5n";18.1m=1m;6.9Q.1m=cp}}E M},cn:C(6,1e,1o){G 26={};V(G J 1A 1e){26[J]=6.18[J];6.18[J]=1e[J]}1o.1f(6);V(G J 1A 1e){6.18[J]=26[J]}}});7(y.1z&&y.1z.3H){y.1z.3H.2X=C(6){G 2O=6.7F,30=6.co,9S=6.1g.28()==="59";E 2O===0&&30===0&&!9S?R:2O>0&&30>0&&!9S?14:y.2C(6,"2c")==="4q"};y.1z.3H.bT=C(6){E!y.1z.3H.2X(6)}}G d2=2Q(),bV=/<1x(.|\\s)*?\\/1x>/gi,c8=/33|6n/i,ca=/c0|gu|gp|go|2X|gk|5m|6o|gj|gl|gm|1U|56|1n|gw/i,51=/=\\?(&|$)/,7I=/\\?/,cP=/(\\?|&)84=.*?(&|$)/,df=/^(\\w+:)?\\/\\/([^\\/?#]+)/,dk=/%20/g;y.fn.1Q({cb:y.fn.76,76:C(1n,48,1o){7(1a 1n!=="1R"){E B.cb(1n)}Q 7(!B.O){E B}G 6H=1n.2r(" ");7(6H>=0){G P=1n.2k(6H,1n.O);1n=1n.2k(0,6H)}G H="4X";7(48){7(y.1G(48)){1o=48;48=U}Q 7(1a 48==="1P"){48=y.6s(48,y.6r.4J);H="ae"}}G 1s=B;y.6a({1n:1n,H:H,36:"1V",I:48,2H:C(6F,2h){7(2h==="3i"||2h==="af"){1s.1V(P?y("<Y />").3U(6F.7U.1H(bV,"")).2y(P):6F.7U)}7(1o){1s.1b(1o,[6F.7U,2h,6F])}}});E B},gg:C(){E y.6s(B.bO())},bO:C(){E B.2Y(C(){E B.53?y.2P(B.53):B}).1u(C(){E B.J&&!B.71&&(B.3Q||c8.17(B.1g)||ca.17(B.H))}).2Y(C(i,6){G 1j=y(B).1j();E 1j==U?U:y.3f(1j)?y.2Y(1j,C(1j,i){E{J:6.J,N:1j}}):{J:6.J,N:1j}}).54()}});y.1b("dl 8h cr cg cq cv".3d(" "),C(i,o){y.fn[o]=C(f){E B.8a(o,f)}});y.1Q({54:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I=U}E y.6a({H:"4X",1n:1n,I:I,3i:1o,36:H})},fY:C(1n,1o){E y.54(1n,U,1o,"1x")},fX:C(1n,I,1o){E y.54(1n,I,1o,"4U")},fT:C(1n,I,1o,H){7(y.1G(I)){H=H||1o;1o=I;I={}}E y.6a({H:"ae",1n:1n,I:I,3i:1o,36:H})},fS:C(db){y.1Q(y.6r,db)},6r:{1n:6c.3A,3F:R,H:"4X",9T:"8b/x-fW-3P-g4",cV:R,4W:R,1c:1B.9D&&(1B.6c.8x!=="7P:"||!1B.cS)?C(){E 3g 1B.9D()}:C(){2E{E 3g 1B.cS("ge.ga")}2G(e){}},7R:{4w:"8b/4w, 1U/4w",1V:"1U/1V",1x:"1U/4S, 8b/4S",4U:"8b/4U, 1U/4S",1U:"1U/g6",4k:"*/*"}},4N:{},4O:{},6a:C(5W){G s=y.1Q(R,{},y.6r,5W);G 35,2h,I,8e=5W&&5W.T||s,H=s.H.8c();7(s.I&&s.cV&&1a s.I!=="1R"){s.I=y.6s(s.I,s.4J)}7(s.36==="35"){7(H==="4X"){7(!51.17(s.1n)){s.1n+=(7I.17(s.1n)?"&":"?")+(s.35||"1o")+"=?"}}Q 7(!s.I||!51.17(s.I)){s.I=(s.I?s.I+"&":"")+(s.35||"1o")+"=?"}s.36="4U"}7(s.36==="4U"&&(s.I&&51.17(s.I)||51.17(s.1n))){35=s.g5||("35"+d2++);7(s.I){s.I=(s.I+"").1H(51,"="+35+"$1")}s.1n=s.1n.1H(51,"="+35+"$1");s.36="1x";1B[35]=1B[35]||C(6l){I=6l;3i();2H();1B[35]=1d;2E{3q 1B[35]}2G(e){}7(3e){3e.3u(1x)}}}7(s.36==="1x"&&s.2I===U){s.2I=14}7(s.2I===14&&H==="4X"){G 9R=2Q();G M=s.1n.1H(cP,"$g7="+9R+"$2");s.1n=M+((M===s.1n)?(7I.17(s.1n)?"&":"?")+"84="+9R:"")}7(s.I&&H==="4X"){s.1n+=(7I.17(s.1n)?"&":"?")+s.I}7(s.3F&&!y.88++){y.L.2q("dl")}G 1k=df.29(s.1n),9I=1k&&(1k[1]&&1k[1]!==6c.8x||1k[2]!==6c.g8);7(s.36==="1x"&&H==="4X"&&9I){G 3e=12.2N("3e")[0]||12.2i;G 1x=12.2x("1x");1x.2L=s.1n;7(s.cI){1x.dH=s.cI}7(!35){G 3Y=14;1x.9P=1x.3E=C(){7(!3Y&&(!B.5h||B.5h==="dI"||B.5h==="2H")){3Y=R;3i();2H();1x.9P=1x.3E=U;7(3e&&1x.1v){3e.3u(1x)}}}}3e.3C(1x,3e.1S);E 1d}G 5t=14;G 1c=s.1c();7(!1c){E}7(s.c4){1c.c5(H,s.1n,s.4W,s.c4,s.6o)}Q{1c.c5(H,s.1n,s.4W)}2E{7(s.I||5W&&5W.9T){1c.68("dE-dB",s.9T)}7(s.cG){7(y.4N[s.1n]){1c.68("bP-cz-dC",y.4N[s.1n])}7(y.4O[s.1n]){1c.68("bP-dT-dU",y.4O[s.1n])}}7(!9I){1c.68("X-dz-dQ","9D")}1c.68("dM",s.36&&s.7R[s.36]?s.7R[s.36]+", */*":s.7R.4k)}2G(e){}7(s.cy&&s.cy.1f(8e,1c,s)===14){7(s.3F&&!--y.88){y.L.2q("8h")}1c.5v();E 14}7(s.3F){2q("cv",[1c,s])}G 3E=1c.3E=C(6L){7(!1c||1c.5h===0||6L==="5v"){7(!5t){2H()}5t=R;7(1c){1c.3E=y.6y}}Q 7(!5t&&1c&&(1c.5h===4||6L==="5f")){5t=R;1c.3E=y.6y;2h=6L==="5f"?"5f":!y.cs(1c)?"2W":s.cG&&y.cA(1c,s.1n)?"af":"3i";G al;7(2h==="3i"){2E{I=y.bU(1c,s.36,s)}2G(cD){2h="8o";al=cD}}7(2h==="3i"||2h==="af"){7(!35){3i()}}Q{y.8i(s,1c,2h,al)}2H();7(6L==="5f"){1c.5v()}7(s.4W){1c=U}}};2E{G cu=1c.5v;1c.5v=C(){7(1c){cu.1f(1c)}3E("5v")}}2G(e){}7(s.4W&&s.5f>0){7N(C(){7(1c&&!5t){3E("5f")}},s.5f)}2E{1c.dy(H==="ae"||H==="dp"||H==="eX"?s.I:U)}2G(e){y.8i(s,1c,U,e);2H()}7(!s.4W){3E()}C 3i(){7(s.3i){s.3i.1f(8e,I,2h,1c)}7(s.3F){2q("cq",[1c,s])}}C 2H(){7(s.2H){s.2H.1f(8e,1c,2h)}7(s.3F){2q("cr",[1c,s])}7(s.3F&&!--y.88){y.L.2q("8h")}}C 2q(H,1D){(s.T?y(s.T):y.L).2q(H,1D)}E 1c},8i:C(s,1c,2h,e){7(s.2W){s.2W.1f(s.T||s,1c,2h,e)}7(s.3F){(s.T?y(s.T):y.L).2q("cg",[1c,s,e])}},88:0,cs:C(1c){2E{E!1c.2h&&6c.8x==="7P:"||(1c.2h>=ce&&1c.2h<eB)||1c.2h===bS||1c.2h===eA||1c.2h===0}2G(e){}E 14},cA:C(1c,1n){G 4N=1c.8s("eu-cz"),4O=1c.8s("dW");7(4N){y.4N[1n]=4N}7(4O){y.4O[1n]=4O}E 1c.2h===bS||1c.2h===0},bU:C(1c,H,s){G ct=1c.8s("eT-H")||"",4w=H==="4w"||!H&&ct.2r("4w")>=0,I=4w?1c.eS:1c.7U;7(4w&&I.2i.1g==="8o"){y.2W("8o")}7(s&&s.bZ){I=s.bZ(I,H)}7(1a I==="1R"){7(H==="4U"||!H&&ct.2r("4U")>=0){I=y.c3(I)}Q 7(H==="1x"||!H&&ct.2r("4S")>=0){y.9e(I)}}E I},6s:C(a,4J){G s=[];7(4J===1d){4J=y.6r.4J}7(y.3f(a)||a.6j){y.1b(a,C(){2M(B.J,B.N)})}Q{V(G 4A 1A a){7X(4A,a[4A])}}E s.4R("&").1H(dk,"+");C 7X(4A,25){7(y.3f(25)){y.1b(25,C(i,v){7(4J){2M(4A,v)}Q{7X(4A+"["+(1a v==="1P"||y.3f(v)?i:"")+"]",v)}})}Q 7(!4J&&25!=U&&1a 25==="1P"){y.1b(25,C(k,v){7X(4A+"["+k+"]",v)})}Q{2M(4A,25)}}C 2M(1X,N){N=y.1G(N)?N():N;s[s.O]=dg(1X)+"="+dg(N)}}});G 80={},cW=/5r|3b|38/,cY=/^([+-]=)?([\\d+-.]+)(.*)$/,6C,ab=[["30","72","e8","e9","e4"],["2O","90","e3","dj","dY"],["2o"]];y.fn.1Q({3b:C(2g,1o){7(2g||2g===0){E B.5R(5i("3b",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");B[i].18.2c=26||"";7(y.2R(B[i],"2c")==="4q"){G 1g=B[i].1g,2c;7(80[1g]){2c=80[1g]}Q{G 6=y("<"+1g+" />").dh("1i");2c=6.2R("2c");7(2c==="4q"){2c="86"}6.2p();80[1g]=2c}y.I(B[i],"5T",2c)}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c=y.I(B[j],"5T")||""}E B}},38:C(2g,1o){7(2g||2g===0){E B.5R(5i("38",3),2g,1o)}Q{V(G i=0,l=B.O;i<l;i++){G 26=y.I(B[i],"5T");7(!26&&26!=="4q"){y.I(B[i],"5T",y.2R(B[i],"2c"))}}V(G j=0,k=B.O;j<k;j++){B[j].18.2c="4q"}E B}},cL:y.fn.5r,5r:C(fn,9l){G 9p=1a fn==="7S";7(y.1G(fn)&&y.1G(9l)){B.cL.27(B,1F)}Q 7(fn==U||9p){B.1b(C(){G 3K=9p?fn:y(B).67(":2X");y(B)[3K?"3b":"38"]()})}Q{B.5R(5i("5r",3),fn,9l)}E B},ec:C(2g,7u,1o){E B.1u(":2X").2R("2o",0).3b().3o().5R({2o:7u},2g,1o)},5R:C(1p,2g,3c,1o){G 7H=y.2g(2g,3c,1o);7(y.9n(1p)){E B.1b(7H.2H)}E B[7H.2D===14?"1b":"2D"](C(){G 2s=y.1Q({},7H),p,2X=B.19===1&&y(B).67(":2X"),1s=B;V(p 1A 1p){G J=p.1H(7M,7O);7(p!==J){1p[J]=1p[p];3q 1p[p];p=J}7(1p[p]==="38"&&2X||1p[p]==="3b"&&!2X){E 2s.2H.1f(B)}7((p==="30"||p==="2O")&&B.18){2s.2c=y.2R(B,"2c");2s.4y=B.18.4y}7(y.3f(1p[p])){(2s.60=2s.60||{})[p]=1p[p][1];1p[p]=1p[p][0]}}7(2s.4y!=U){B.18.4y="2X"}2s.6S=y.1Q({},1p);y.1b(1p,C(J,1j){G e=3g y.fx(1s,2s,J);7(cW.17(1j)){e[1j==="5r"?2X?"3b":"38":1j](1p)}Q{G 1k=cY.29(1j),3w=e.1h(R)||0;7(1k){G 3o=2w(1k[2]),3M=1k[3]||"5n";7(3M!=="5n"){1s.18[J]=(3o||1)+3M;3w=((3o||1)/e.1h(R))*3w;1s.18[J]=3w+3M}7(1k[1]){3o=((1k[1]==="-="?-1:1)*3o)+3w}e.6m(3w,3o,3M)}Q{e.6m(3w,1j,"")}}});E R})},62:C(94,5o){G 2V=y.2V;7(94){B.2D([])}B.1b(C(){V(G i=2V.O-1;i>=0;i--){7(2V[i].6===B){7(5o){2V[i](R)}2V.3S(i,1)}}});7(!5o){B.4K()}E B}});y.1b({ep:5i("3b",1),er:5i("38",1),ek:5i("5r",1),ej:{2o:"3b"},ee:{2o:"38"}},C(J,3j){y.fn[J]=C(2g,1o){E B.5R(3j,2g,1o)}});y.1Q({2g:C(2g,3c,fn){G 2s=2g&&1a 2g==="1P"?2g:{2H:fn||!fn&&3c||y.1G(2g)&&2g,4F:2g,3c:fn&&3c||3c&&!y.1G(3c)&&3c};2s.4F=y.fx.6H?0:1a 2s.4F==="5m"?2s.4F:y.fx.82[2s.4F]||y.fx.82.4k;2s.26=2s.2H;2s.2H=C(){7(2s.2D!==14){y(B).4K()}7(y.1G(2s.26)){2s.26.1f(B)}};E 2s},3c:{d0:C(p,n,85,4B){E 85+4B*p},8R:C(p,n,85,4B){E((-4x.ef(p*4x.eg)/2)+0.5)*4B+85}},2V:[],fx:C(6,1e,1p){B.1e=1e;B.6=6;B.1p=1p;7(!1e.2U){1e.2U={}}}});y.fx.2T={8L:C(){7(B.1e.5b){B.1e.5b.1f(B.6,B.2Q,B)}(y.fx.5b[B.1p]||y.fx.5b.4k)(B);7((B.1p==="30"||B.1p==="2O")&&B.6.18){B.6.18.2c="86"}},1h:C(5N){7(B.6[B.1p]!=U&&(!B.6.18||B.6.18[B.1p]==U)){E B.6[B.1p]}G r=2w(y.2R(B.6,B.1p,5N));E r&&r>-ei?r:2w(y.2C(B.6,B.1p))||0},6m:C(dc,7u,3M){B.8M=2Q();B.3w=dc;B.3o=7u;B.3M=3M||B.3M||"5n";B.2Q=B.3w;B.5q=B.3K=0;G 1s=B;C t(5o){E 1s.5b(5o)}t.6=B.6;7(t()&&y.2V.1K(t)&&!6C){6C=6A(y.fx.cH,13)}},3b:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.3b=R;B.6m(B.1p==="2O"||B.1p==="30"?1:0,B.1h());y(B.6).3b()},38:C(){B.1e.2U[B.1p]=y.18(B.6,B.1p);B.1e.38=R;B.6m(B.1h(),0)},5b:C(5o){G t=2Q(),3Y=R;7(5o||t>=B.1e.4F+B.8M){B.2Q=B.3o;B.5q=B.3K=1;B.8L();B.1e.6S[B.1p]=R;V(G i 1A B.1e.6S){7(B.1e.6S[i]!==R){3Y=14}}7(3Y){7(B.1e.2c!=U){B.6.18.4y=B.1e.4y;G 26=y.I(B.6,"5T");B.6.18.2c=26?26:B.1e.2c;7(y.2R(B.6,"2c")==="4q"){B.6.18.2c="86"}}7(B.1e.38){y(B.6).38()}7(B.1e.38||B.1e.3b){V(G p 1A B.1e.6S){y.18(B.6,p,B.1e.2U[p])}}B.1e.2H.1f(B.6)}E 14}Q{G n=t-B.8M;B.3K=n/B.1e.4F;G 60=B.1e.60&&B.1e.60[B.1p];G cM=B.1e.3c||(y.3c.8R?"8R":"d0");B.5q=y.3c[60||cM](B.3K,n,0,1,B.1e.4F);B.2Q=B.3w+((B.3o-B.3w)*B.5q);B.8L()}E R}};y.1Q(y.fx,{cH:C(){G 2V=y.2V;V(G i=0;i<2V.O;i++){7(!2V[i]()){2V.3S(i--,1)}}7(!2V.O){y.fx.62()}},62:C(){e5(6C);6C=U},82:{ev:eH,eG:ce,4k:eC},5b:{2o:C(fx){y.18(fx.6,"2o",fx.2Q)},4k:C(fx){7(fx.6.18&&fx.6.18[fx.1p]!=U){fx.6.18[fx.1p]=(fx.1p==="2O"||fx.1p==="30"?4x.58(0,fx.2Q):fx.2Q)+fx.3M}Q{fx.6[fx.1p]=fx.2Q}}}});7(y.1z&&y.1z.3H){y.1z.3H.eD=C(6){E y.5Y(y.2V,C(fn){E 6===fn.6}).O}}C 5i(H,3B){G 25={};y.1b(ab.7V.27([],ab.2k(0,3B)),C(){25[B]=H});E 25}7("de"1A 12.2i){y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}G 9V=6.de(),2e=6.1Z,1i=2e.1i,4l=2e.2i,5Q=4l.5Q||1i.5Q||0,5K=4l.5K||1i.5K||0,1O=9V.1O+(1s.b3||y.1Y.5B&&4l.4z||1i.4z)-5Q,1m=9V.1m+(1s.8w||y.1Y.5B&&4l.4v||1i.4v)-5K;E{1O:1O,1m:1m}}}Q{y.fn.22=C(1e){G 6=B[0];7(1e){E B.1b(C(i){y.22.8S(B,1e,i)})}7(!6||!6.1Z){E U}7(6===6.1Z.1i){E y.22.9i(6)}y.22.7o();G 2l=6.2l,bW=6,2e=6.1Z,3D,4l=2e.2i,1i=2e.1i,37=2e.37,5O=37?37.5I(6,U):6.4C,1O=6.3T,1m=6.7a;23((6=6.1v)&&6!==1i&&6!==4l){7(y.22.8v&&5O.31==="a8"){2z}3D=37?37.5I(6,U):6.4C;1O-=6.4z;1m-=6.4v;7(6===2l){1O+=6.3T;1m+=6.7a;7(y.22.bL&&!(y.22.bN&&/^t(gh|d|h)$/i.17(6.1g))){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}bW=2l,2l=6.2l}7(y.22.c2&&3D.4y!=="bT"){1O+=2w(3D.93)||0;1m+=2w(3D.8Q)||0}5O=3D}7(5O.31==="3V"||5O.31==="9r"){1O+=1i.3T;1m+=1i.7a}7(y.22.8v&&5O.31==="a8"){1O+=4x.58(4l.4z,1i.4z);1m+=4x.58(4l.4v,1i.4v)}E{1O:1O,1m:1m}}}y.22={7o:C(){G 1i=12.1i,4T=12.2x("Y"),4P,3z,2f,4I,di=2w(y.2C(1i,"72",R))||0,1V="<Y 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\'><Y></Y></Y><2f 18=\'31:7z;1O:0;1m:0;4L:0;5J:cf cE #cc;75:0;2O:5g;30:5g;\' fo=\'0\' bR=\'0\'><59><4I></4I></59></2f>";y.1Q(4T.18,{31:"7z",1O:0,1m:0,4L:0,5J:0,2O:"5g",30:"5g",bQ:"2X"});4T.3p=1V;1i.3C(4T,1i.1S);4P=4T.1S;3z=4P.1S;4I=4P.4i.1S.1S;B.bL=(3z.3T!==5);B.bN=(4I.3T===5);3z.18.31="a8",3z.18.1O="fK";B.8v=(3z.3T===20||3z.3T===15);3z.18.31=3z.18.1O="";4P.18.4y="2X",4P.18.31="3V";B.c2=(3z.3T===-5);B.cJ=(1i.3T!==di);1i.3u(4T);1i=4T=4P=3z=2f=4I=U;y.22.7o=y.6y},9i:C(1i){G 1O=1i.3T,1m=1i.7a;y.22.7o();7(y.22.cJ){1O+=2w(y.2C(1i,"72",R))||0;1m+=2w(y.2C(1i,"90",R))||0}E{1O:1O,1m:1m}},8S:C(6,1e,i){7(/9r/.17(y.2C(6,"31"))){6.18.31="3V"}G 92=y(6),7i=92.22(),dm=8T(y.2C(6,"1O",R),10)||0,d9=8T(y.2C(6,"1m",R),10)||0;7(y.1G(1e)){1e=1e.1f(6,i,7i)}G 3j={1O:(1e.1O-7i.1O)+dm,1m:(1e.1m-7i.1m)+d9};7("cR"1A 1e){1e.cR.1f(6,3j)}Q{92.2R(3j)}}};y.fn.1Q({31:C(){7(!B[0]){E U}G 6=B[0],2l=B.2l(),22=B.22(),6B=/^1i|1V$/i.17(2l[0].1g)?{1O:0,1m:0}:2l.22();22.1O-=2w(y.2C(6,"72",R))||0;22.1m-=2w(y.2C(6,"90",R))||0;6B.1O+=2w(y.2C(2l[0],"93",R))||0;6B.1m+=2w(y.2C(2l[0],"8Q",R))||0;E{1O:22.1O-6B.1O,1m:22.1m-6B.1m}},2l:C(){E B.2Y(C(){G 2l=B.2l||12.1i;23(2l&&(!/^1i|1V$/i.17(2l.1g)&&y.2R(2l,"31")==="9r")){2l=2l.2l}E 2l})}});y.1b(["bq","bu"],C(i,J){G 5U="7Y"+J;y.fn[5U]=C(1j){G 6=B[0],3k;7(!6){E U}7(1j!==1d){E B.1b(C(){3k=9z(B);7(3k){3k.ad(!i?1j:y(3k).4v(),i?1j:y(3k).4z())}Q{B[5U]=1j}})}Q{3k=9z(6);E 3k?("8w"1A 3k)?3k[i?"b3":"8w"]:y.1Y.5B&&3k.12.2i[5U]||3k.12.1i[5U]:6[5U]}}});C 9z(6){E("ad"1A 6&&6.12)?6:6.19===9?6.37||6.f3:14}y.1b(["fa","aQ"],C(i,J){G H=J.28();y.fn["fR"+J]=C(){E B[0]?y.2R(B[0],H,14,"75"):U};y.fn["gr"+J]=C(4L){E B[0]?y.2R(B[0],H,14,4L?"4L":"5J"):U};y.fn[H]=C(4j){G 6=B[0];7(!6){E 4j==U?U:B}7(y.1G(4j)){E B.1b(C(i){G 1s=y(B);1s[H](4j.1f(B,i,1s[H]()))})}E("ad"1A 6&&6.12)?6.12.gf==="dG"&&6.12.2i["8H"+J]||6.12.1i["8H"+J]:(6.19===9)?4x.58(6.2i["8H"+J],6.1i["7Y"+J],6.2i["7Y"+J],6.1i["22"+J],6.2i["22"+J]):4j===1d?y.2R(6,H):B.2R(H,1a 4j==="1R"?4j:4j+"5n")}});1B.y=1B.$=y})(1B);',62,1028,'||||||elem|if|||||||||||||||||||||||||||jQuery|||this|function||return||var|type|data|name|match|event|ret|value|length|selector|else|true||context|null|for|||div||||document||false|||test|style|nodeType|typeof|each|xhr|undefined|options|call|nodeName|cur|body|val|parts|set|left|url|callback|prop|results|checkSet|self|Expr|filter|parentNode|target|script|handler|expr|in|window|elems|args|array|arguments|isFunction|replace|events|Sizzle|push|handle|parent|className|top|object|extend|string|firstChild|id|text|html|part|key|support|ownerDocument||guid|offset|while|namespaces|obj|old|apply|toLowerCase|exec|proxy|result|display|isXML|doc|table|speed|status|documentElement|first|slice|offsetParent|special||opacity|remove|trigger|indexOf|opt|node|types|fragment|parseFloat|createElement|find|break|tbody|live|curCSS|queue|try|not|catch|complete|cache|dir|all|src|add|getElementsByTagName|width|makeArray|now|css|curLoop|prototype|orig|timers|error|hidden|map|root|height|position||select|wrapMap|jsonp|dataType|defaultView|hide|doneName|getAttribute|show|easing|split|head|isArray|new|selectors|success|props|win|ready|until|button|end|innerHTML|delete|thisCache|pushStack|check|removeChild|expando|start|attr|inplace|checkDiv|href|num|insertBefore|computedStyle|onreadystatechange|global|qualifier|filters|extra|on|state|attachEvent|unit|appendChild|input|form|checked|copy|splice|offsetTop|append|relative|modifiedHandler|Array|done|fix|handlers|classNames|DOMContentLoaded|class|option|ID|wrap|childNodes|params|hasDuplicate|toString|addEventListener|click|shift|pop|radio|one|scripts|nextSibling|size|_default|docElem|pass|ua|last|index|none|contains|inArray|submit|matches|scrollLeft|xml|Math|overflow|scrollTop|prefix|diff|currentStyle|setup|seed|duration|browser|nth|td|traditional|dequeue|margin|preventDefault|lastModified|etag|innerDiv|selected|join|javascript|container|json|checkbox|async|GET|which|sort|removeData|jsre|stopPropagation|elements|get||time|Event|max|tr|isPartStr|step|cacheable|domManip|anyFound|timeout|1px|readyState|genFx|selectedIndex|cloneNode|getAttributeNode|number|px|gotoEnd|POS|pos|toggle|compareDocumentPosition|requestDone|u00c0|abort|found|tag|uFFFF|getElementById|cacheresults|boxModel|checkFn|values|TAG|sizcache|empty|nodeCheck|getComputedStyle|border|clientLeft|originalEvent|teardown|force|prevComputedStyle|deep|clientTop|animate|keyCode|olddisplay|method|RegExp|origSettings|readyList|grep|getText|specialEasing|sourceIndex|stop|eventName|sortOrder|previousSibling|second|is|setRequestHeader|cleanData|ajax|notxml|location|getElementsByClassName|related|item|noData|mouseenter|CLASS|jquery|keep|tmp|custom|textarea|password|change|lastToggle|ajaxSettings|param|contextXML|relatedTarget|closest|charCode|createTextNode|noop|clone|setInterval|parentOffset|timerId|replaceWith|rootjQuery|res|nodes|off|changeFilters|rleadingWhitespace|thisObject|isTimeout|mouseleave|PSEUDO|isReady|stateVal|currentTarget|focusout|curAnim|browserMatch|hasOwnProperty|contents|unbind|removeEventListener|formElems|testChange|oldSizzle|disabled|marginTop|substr|source|padding|load|leftMatch|order|CHILD|offsetLeft|toArray|insert|wrapAll|msg|attrHandle|bRange|before|curOffset|oldData|chunker|checkClone|next|nodeValue|initialize|merge|even|case|attrFn|access|to|rfloat|styleFloat|Object|cssFloat|absolute|querySelectorAll|sizset|aRange|multiple|odd|offsetWidth|triggerHandler|optall|rquery|fromElement|rspace|attributeNode|rdashAlpha|setTimeout|fcamelCase|file|detachEvent|accepts|boolean|eventHandle|responseText|concat|isSupported|buildParams|scroll|namespace|elemdisplay|version|speeds|JSON|_|firstNum|block|isPlainObject|active|returnTrue|bind|application|toUpperCase|returnFalse|callbackContext|specialSubmit|isPartStrNotTag|ajaxStop|handleError|noCloneEvent|windowData|eventSupported|colgroup|area|parsererror|isXMLDoc|after|image|getResponseHeader|rinlinejQuery|preFilter|supportsFixedPosition|pageXOffset|protocol|cloneCopyEvent|attrMap|addClass|buildFragment|NAME|curData|rclass|inprogress|removeAttribute|client|unshift|rchecked|fragments|update|startTime|uniqueSort|tmpSet|later|borderLeftWidth|swing|setOffset|parseInt|filtered|posProcess|constructor|dirCheck|dirNodeCheck|init|marginLeft|readyBound|curElem|borderTopWidth|clearQueue|toplevel|targets|winnow|sibling|doScrollCheck||matched|isTag|ATTR|globalEval|link|scriptEval|nodeIndex|bodyOffset|unique|prevObject|fn2|isObj|isEmptyObject|isDisconnected|bool|userAgent|static|createRange|onclick|removeClass|focus|metaKey|triggered|prune|getWindow|blur|baseHasDuplicate|ctrlKey|XMLHttpRequest|bindReady|continue|query|float|remote|soFar|fnOver|keypress|liveHandler|camelCase|beforeFilter|onload|runtimeStyle|ts|skip|contentType|liveConvert|box|clientX|pageX|ralpha|onbeforeunload|rxhtmlTag|withinElement|_change_data|fcloseTag|rtagName|getVal|focusin|ropacity|fixed|100|rradiocheck|fxAttrs|clean|scrollTo|POST|notmodified|isDefaultPrevented|getWH|isPropagationStopped|isImmediatePropagationStopped|leadingWhitespace|errMsg|delegate|lastChild|hasBody|tabIndex|setEnd|inv|toElement|rtrim|setStart|srcElement|clientY|setArray|_jQuery|specialChange|submitBubbles|rsingleTag|u00A0|quickExpr|readOnly|TEST|parse|getTime|altLive|rnotwhite|hover|fnOut|arg|Function|pageY|Date|Width|toggleClass|setAttribute|cssText|rclickable|rfocusable|hrefNormalized|nm|origContext|uuid|emptyObject|frameElement|isXMLFilter|pageYOffset|isBool|optSelected|hasClass|checkOn|rspecialurl|htmlFor|__className__|rtype|specified|throw||getElementsByName|changeBubbles|reset|fcleanup|unload|doScroll|rreturn|mouseover|red|exclusive|webkit|Left||origPOS|setFilters|Top|mouseout|isClick|unrecognized|expression|Syntax|textContent|lt|cleaned|bubbling|count|keydown|fireEvent|only|uaMatch|prevUntil|rtbody|doesNotAddBorder|depth|doesAddBorderForTableAndCells|serializeArray|If|visibility|cellspacing|304|visible|httpData|rscript|prevOffsetParent|rhtml|keepData|dataFilter|color|evalScript|subtractsBorderForOverflowNotVisible|parseJSON|username|open|prepend|original|rselectTextarea|createDocumentFragment|rinput|_load|000|rupper|200|5px|ajaxError||cssWidth|cssHeight|rnumpx||rnum|swap|offsetHeight|rsLeft|ajaxSuccess|ajaxComplete|httpSuccess||oldAbort|ajaxSend|rexclude|letter|beforeSend|Modified|httpNotModified|zoom|cssShow|err|solid|alpha|ifModified|tick|scriptCharset|doesNotIncludeMarginInBodyOffset|embed|_toggle|defaultEasing|has|isSimple|rts|rselfClosing|using|ActiveXObject|detach|rparentsprev|processData|rfxtypes|prevAll|rfxnum|children|linear|rmultiselector|jsc|runtil|parents|fieldset|front|col|thead|curLeft|htmlSerialize|settings|from|wrapInner|getBoundingClientRect|rurl|encodeURIComponent|appendTo|bodyMarginTop|paddingLeft|r20|ajaxStart|curTop||originalTarget|PUT|prevValue|screenX|changed|offsetY|relatedNode|can|screenY|property|send|Requested|attrName|Type|Since|bubbles|Content|attrChange|CSS1Compat|charset|loaded|altKey|charAt|cancelable|Accept|layerX|layerY|newValue|With|eventPhase|detail|None|Match|offsetX|Etag|rv|paddingRight|mozilla|compatible|opera|msie|marginRight|paddingBottom|clearInterval|readonly|radiotest|marginBottom|paddingTop|safari|trim|fadeTo|noConflict|fadeOut|cos|PI|navigator|10000|fadeIn|slideToggle||bfnrt|Invalid|isPrototypeOf|slideDown||slideUp|maxlength|maxLength|Last|slow|substring|removeAttr|shiftKey|delay|1223|300|400|animated||attributes|fast|600|setData|getData|colSpan|tabindex|colspan|rowSpan|cellSpacing|rowspan|usemap|useMap|responseXML|content|applet|frameBorder|frameborder|DELETE|timeStamp|Right|nextAll|Bottom|onunload|parentWindow|nextUntil|ig|font|weight|line|view|Height|keyup|getPropertyValue|round|optgroup|fontSize|1em|resize|dblclick|NaN|mousemove|mouseup|mousedown||cellpadding|siblings|header|legend|switch|meta|enabled|outerHTML|unwrap||tfoot|caption||th|innerText|img|hr|iframe|prependTo|insertAfter|replaceAll|child|20px|512|0n|reverse|contentWindow|contentDocument|pixelLeft|inner|ajaxSetup|post|stopImmediatePropagation|cancelBubble|www|getJSON|getScript|beforeactivate|Until|createComment|HTML|returnValue|urlencoded|jsonpCallback|plain|1_|host|wheelDelta|XMLHTTP|1E8|beforeunload|liveProxy|Microsoft|compatMode|serialize|able||range|month|search|tel|parentsUntil|email|datetime|prev|outer|die||date|compareBoundaryPoints|week|andSelf|Range|START_TO_END'.split('|'),0,{}))
diff --git a/themes/default/js/jquery.tablednd.js b/themes/default/js/jquery.tablednd.js
new file mode 100644
index 000000000..d4c9fec29
--- /dev/null
+++ b/themes/default/js/jquery.tablednd.js
@@ -0,0 +1,382 @@
+/**
+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows
+ * You can set up various options to control how the system will work
+ * Copyright (c) Denis Howlett <denish@isocra.com>
+ * Licensed like jQuery, see http://docs.jquery.com/License.
+ *
+ * Configuration options:
+ *
+ * onDragStyle
+ * This is the style that is assigned to the row during drag. There are limitations to the styles that can be
+ * associated with a row (such as you can't assign a border--well you can, but it won't be
+ * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
+ * a map (as used in the jQuery css(...) function).
+ * onDropStyle
+ * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
+ * to what you can do. Also this replaces the original style, so again consider using onDragClass which
+ * is simply added and then removed on drop.
+ * onDragClass
+ * This class is added for the duration of the drag and then removed when the row is dropped. It is more
+ * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
+ * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
+ * stylesheet.
+ * onDrop
+ * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
+ * and the row that was dropped. You can work out the new order of the rows by using
+ * table.rows.
+ * onDragStart
+ * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
+ * table and the row which the user has started to drag.
+ * onAllowDrop
+ * Pass a function that will be called as a row is over another row. If the function returns true, allow
+ * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
+ * the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
+ * scrollAmount
+ * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
+ * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
+ * FF3 beta
+ * dragHandle
+ * This is the name of a class that you assign to one or more cells in each row that is draggable. If you
+ * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
+ * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
+ * the whole row is draggable.
+ *
+ * Other ways to control behaviour:
+ *
+ * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
+ * that you don't want to be draggable.
+ *
+ * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
+ * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
+ * an ID as must all the rows.
+ *
+ * Other methods:
+ *
+ * $("...").tableDnDUpdate()
+ * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
+ * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
+ * The table maintains the original configuration (so you don't have to specify it again).
+ *
+ * $("...").tableDnDSerialize()
+ * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
+ * called from anywhere and isn't dependent on the currentTable being set up correctly before calling
+ *
+ * Known problems:
+ * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
+ *
+ * Version 0.2: 2008-02-20 First public version
+ * Version 0.3: 2008-02-07 Added onDragStart option
+ * Made the scroll amount configurable (default is 5 as before)
+ * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
+ * Added onAllowDrop to control dropping
+ * Fixed a bug which meant that you couldn't set the scroll amount in both directions
+ * Added serialize method
+ * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
+ * draggable
+ * Improved the serialize method to use a default (and settable) regular expression.
+ * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
+ */
+jQuery.tableDnD = {
+ /** Keep hold of the current table being dragged */
+ currentTable : null,
+ /** Keep hold of the current drag object if any */
+ dragObject: null,
+ /** The current mouse offset */
+ mouseOffset: null,
+ /** Remember the old value of Y so that we don't do too much processing */
+ oldY: 0,
+
+ /** Actually build the structure */
+ build: function(options) {
+ // Set up the defaults if any
+
+ this.each(function() {
+ // This is bound to each matching table, set up the defaults and override with user options
+ this.tableDnDConfig = jQuery.extend({
+ onDragStyle: null,
+ onDropStyle: null,
+ // Add in the default class for whileDragging
+ onDragClass: "tDnD_whileDrag",
+ onDrop: null,
+ onDragStart: null,
+ scrollAmount: 5,
+ serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
+ serializeParamName: null, // If you want to specify another parameter name instead of the table ID
+ dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
+ }, options || {});
+ // Now make the rows draggable
+ jQuery.tableDnD.makeDraggable(this);
+ });
+
+ // Now we need to capture the mouse up and mouse move event
+ // We can use bind so that we don't interfere with other event handlers
+ jQuery(document)
+ .bind('mousemove', jQuery.tableDnD.mousemove)
+ .bind('mouseup', jQuery.tableDnD.mouseup);
+
+ // Don't break the chain
+ return this;
+ },
+
+ /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
+ makeDraggable: function(table) {
+ var config = table.tableDnDConfig;
+ if (table.tableDnDConfig.dragHandle) {
+ // We only need to add the event to the specified cells
+ var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
+ cells.each(function() {
+ // The cell is bound to "this"
+ jQuery(this).mousedown(function(ev) {
+ jQuery.tableDnD.dragObject = this.parentNode;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ });
+ })
+ } else {
+ // For backwards compatibility, we add the event to the whole row
+ var rows = jQuery("tr", table); // get all the rows as a wrapped set
+ rows.each(function() {
+ // Iterate through each row, the row is bound to "this"
+ var row = jQuery(this);
+ if (! row.hasClass("nodrag")) {
+ row.mousedown(function(ev) {
+ if (ev.target.tagName == "TD") {
+ jQuery.tableDnD.dragObject = this;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ }
+ }).css("cursor", "move"); // Store the tableDnD object
+ }
+ });
+ }
+ },
+
+ updateTables: function() {
+ this.each(function() {
+ // this is now bound to each matching table
+ if (this.tableDnDConfig) {
+ jQuery.tableDnD.makeDraggable(this);
+ }
+ })
+ },
+
+ /** Get the mouse coordinates from the event (allowing for browser differences) */
+ mouseCoords: function(ev){
+ if(ev.pageX || ev.pageY){
+ return {x:ev.pageX, y:ev.pageY};
+ }
+ return {
+ x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
+ y:ev.clientY + document.body.scrollTop - document.body.clientTop
+ };
+ },
+
+ /** Given a target element and a mouse event, get the mouse offset from that element.
+ To do this we need the element's position and the mouse position */
+ getMouseOffset: function(target, ev) {
+ ev = ev || window.event;
+
+ var docPos = this.getPosition(target);
+ var mousePos = this.mouseCoords(ev);
+ return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
+ },
+
+ /** Get the position of an element by going up the DOM tree and adding up all the offsets */
+ getPosition: function(e){
+ var left = 0;
+ var top = 0;
+ /** Safari fix -- thanks to Luis Chato for this! */
+ if (e.offsetHeight == 0) {
+ /** Safari 2 doesn't correctly grab the offsetTop of a table row
+ this is detailed here:
+ http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
+ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
+ note that firefox will return a text node as a first child, so designing a more thorough
+ solution may need to take that into account, for now this seems to work in firefox, safari, ie */
+ e = e.firstChild; // a table cell
+ }
+
+ while (e.offsetParent){
+ left += e.offsetLeft;
+ top += e.offsetTop;
+ e = e.offsetParent;
+ }
+
+ left += e.offsetLeft;
+ top += e.offsetTop;
+
+ return {x:left, y:top};
+ },
+
+ mousemove: function(ev) {
+ if (jQuery.tableDnD.dragObject == null) {
+ return;
+ }
+
+ var dragObj = jQuery(jQuery.tableDnD.dragObject);
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ var mousePos = jQuery.tableDnD.mouseCoords(ev);
+ var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
+ //auto scroll the window
+ var yOffset = window.pageYOffset;
+ if (document.all) {
+ // Windows version
+ //yOffset=document.body.scrollTop;
+ if (typeof document.compatMode != 'undefined' &&
+ document.compatMode != 'BackCompat') {
+ yOffset = document.documentElement.scrollTop;
+ }
+ else if (typeof document.body != 'undefined') {
+ yOffset=document.body.scrollTop;
+ }
+
+ }
+
+ if (mousePos.y-yOffset < config.scrollAmount) {
+ window.scrollBy(0, -config.scrollAmount);
+ } else {
+ var windowHeight = window.innerHeight ? window.innerHeight
+ : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
+ if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
+ window.scrollBy(0, config.scrollAmount);
+ }
+ }
+
+
+ if (y != jQuery.tableDnD.oldY) {
+ // work out if we're going up or down...
+ var movingDown = y > jQuery.tableDnD.oldY;
+ // update the old value
+ jQuery.tableDnD.oldY = y;
+ // update the style to show we're dragging
+ if (config.onDragClass) {
+ dragObj.addClass(config.onDragClass);
+ } else {
+ dragObj.css(config.onDragStyle);
+ }
+ // If we're over a row then move the dragged row to there so that the user sees the
+ // effect dynamically
+ var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
+ if (currentRow) {
+ // TODO worry about what happens when there are multiple TBODIES
+ if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
+ } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
+ }
+ }
+ }
+
+ return false;
+ },
+
+ /** We're only worried about the y position really, because we can only move rows up and down */
+ findDropTargetRow: function(draggedRow, y) {
+ var rows = jQuery.tableDnD.currentTable.rows;
+ for (var i=0; i<rows.length; i++) {
+ var row = rows[i];
+ var rowY = this.getPosition(row).y;
+ var rowHeight = parseInt(row.offsetHeight)/2;
+ if (row.offsetHeight == 0) {
+ rowY = this.getPosition(row.firstChild).y;
+ rowHeight = parseInt(row.firstChild.offsetHeight)/2;
+ }
+ // Because we always have to insert before, we need to offset the height a bit
+ if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
+ // that's the row we're over
+ // If it's the same as the current row, ignore it
+ if (row == draggedRow) {return null;}
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ if (config.onAllowDrop) {
+ if (config.onAllowDrop(draggedRow, row)) {
+ return row;
+ } else {
+ return null;
+ }
+ } else {
+ // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
+ var nodrop = jQuery(row).hasClass("nodrop");
+ if (! nodrop) {
+ return row;
+ } else {
+ return null;
+ }
+ }
+ return row;
+ }
+ }
+ return null;
+ },
+
+ mouseup: function(e) {
+ if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
+ var droppedRow = jQuery.tableDnD.dragObject;
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ // If we have a dragObject, then we need to release it,
+ // The row will already have been moved to the right place so we just reset stuff
+ if (config.onDragClass) {
+ jQuery(droppedRow).removeClass(config.onDragClass);
+ } else {
+ jQuery(droppedRow).css(config.onDropStyle);
+ }
+ jQuery.tableDnD.dragObject = null;
+ if (config.onDrop) {
+ // Call the onDrop method if there is one
+ config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
+ }
+ jQuery.tableDnD.currentTable = null; // let go of the table too
+ }
+ },
+
+ serialize: function() {
+ if (jQuery.tableDnD.currentTable) {
+ return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
+ } else {
+ return "Error: No Table id set, you need to set an id on your table and every row";
+ }
+ },
+
+ serializeTable: function(table) {
+ var result = "";
+ var tableId = table.id;
+ var rows = table.rows;
+ for (var i=0; i<rows.length; i++) {
+ if (result.length > 0) result += "&";
+ var rowId = rows[i].id;
+ if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
+ rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
+ }
+
+ result += tableId + '[]=' + rowId;
+ }
+ return result;
+ },
+
+ serializeTables: function() {
+ var result = "";
+ this.each(function() {
+ // this is now bound to each matching table
+ result += jQuery.tableDnD.serializeTable(this);
+ });
+ return result;
+ }
+
+}
+
+jQuery.fn.extend(
+ {
+ tableDnD : jQuery.tableDnD.build,
+ tableDnDUpdate : jQuery.tableDnD.updateTables,
+ tableDnDSerialize: jQuery.tableDnD.serializeTables
+ }
+); \ No newline at end of file
diff --git a/themes/default/js/plugins/jquery.autogrow-textarea.js b/themes/default/js/plugins/jquery.autogrow-textarea.js
new file mode 100644
index 000000000..2e85b98af
--- /dev/null
+++ b/themes/default/js/plugins/jquery.autogrow-textarea.js
@@ -0,0 +1,47 @@
+(function($) {
+
+ /*
+ * Auto-growing textareas; technique ripped from Facebook
+ */
+ $.fn.autogrow = function(options) {
+
+ this.filter('textarea').each(function() {
+
+ var $this = $(this),
+ minHeight = $this.height(),
+ lineHeight = $this.css('lineHeight');
+
+ var shadow = $('<div></div>').css({
+ position: 'absolute',
+ top: -10000,
+ left: -10000,
+ width: $(this).width(),
+ fontSize: $this.css('fontSize'),
+ fontFamily: $this.css('fontFamily'),
+ lineHeight: $this.css('lineHeight'),
+ resize: 'none'
+ }).appendTo(document.body);
+
+ var update = function() {
+
+ var val = this.value.replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/&/g, '&amp;')
+ .replace(/\n/g, '<br/>');
+
+ shadow.html(val);
+ $(this).css('height', Math.max(shadow.height() + 20, minHeight));
+
+ }
+
+ $(this).change(update).keyup(update).keydown(update);
+
+ update.apply(this);
+
+ });
+
+ return this;
+
+ }
+
+})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/plugins/jquery.cluetip.js b/themes/default/js/plugins/jquery.cluetip.js
new file mode 100644
index 000000000..83727910c
--- /dev/null
+++ b/themes/default/js/plugins/jquery.cluetip.js
@@ -0,0 +1,543 @@
+/*
+ * jQuery clueTip plugin
+ * Version 0.9.8 (05/22/2008)
+ * @requires jQuery v1.1.4+
+ * @requires Dimensions plugin (for jQuery versions < 1.2.5)
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+;(function($) {
+/*
+ * @name clueTip
+ * @type jQuery
+ * @cat Plugins/tooltip
+ * @return jQuery
+ * @author Karl Swedberg
+ *
+ * @credit Inspired by Cody Lindley's jTip (http://www.codylindley.com)
+ * @credit Thanks to the following people for their many and varied contributions:
+ Shelane Enos, Glen Lipka, Hector Santos, Torben Schreiter, Dan G. Switzer, Jörn Zaefferer
+ * @credit Thanks to Jonathan Chaffer, as always, for help with the hard parts. :-)
+ */
+
+ /**
+ *
+ * Displays a highly customizable tooltip when the user hovers (default) or clicks (optional) the matched element.
+ * By default, the clueTip plugin loads a page indicated by the "rel" attribute via ajax and displays its contents.
+ * If a "title" attribute is specified, its value is used as the clueTip's heading.
+ * The attribute to be used for both the body and the heading of the clueTip is user-configurable.
+ * Optionally, the clueTip's body can display content from an element on the same page.
+ * * Just indicate the element's id (e.g. "#some-id") in the rel attribute.
+ * Optionally, the clueTip's body can display content from the title attribute, when a delimiter is indicated.
+ * * The string before the first instance of the delimiter is set as the clueTip's heading.
+ * * All subsequent strings are wrapped in separate DIVs and placed in the clueTip's body.
+ * The clueTip plugin allows for many, many more options. Pleasee see the examples and the option descriptions below...
+ *
+ *
+ * @example $('#tip).cluetip();
+ * @desc This is the most basic clueTip. It displays a 275px-wide clueTip on mouseover of the element with an ID of "tip." On mouseout of the element, the clueTip is hidden.
+ *
+ *
+ * @example $('a.clue').cluetip({
+ * hoverClass: 'highlight',
+ * sticky: true,
+ * closePosition: 'bottom',
+ * closeText: '<img src="cross.png" alt="close" />',
+ * truncate: 60,
+ * ajaxSettings: {
+ * type: 'POST'
+ * }
+ * });
+ * @desc Displays a clueTip on mouseover of all <a> elements with class="clue". The hovered element gets a class of "highlight" added to it (so that it can be styled appropriately. This is esp. useful for non-anchor elements.). The clueTip is "sticky," which means that it will not be hidden until the user either clicks on its "close" text/graphic or displays another clueTip. The "close" text/graphic is set to diplay at the bottom of the clueTip (default is top) and display an image rather than the default "Close" text. Moreover, the body of the clueTip is truncated to the first 60 characters, which are followed by an ellipsis (...). Finally, the clueTip retrieves the content using POST rather than the $.ajax method's default "GET."
+ *
+ * More examples can be found at http://plugins.learningjquery.com/cluetip/demo/
+ *
+ * Full list of options/settings can be found at the bottom of this file and at http://plugins.learningjquery.com/cluetip/
+ */
+
+ var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount;
+ $.fn.cluetip = function(js, options) {
+ if (typeof js == 'object') {
+ options = js;
+ js = null;
+ }
+ return this.each(function(index) {
+ var $this = $(this);
+
+ // support metadata plugin (v1.0 and 2.0)
+ var opts = $.extend(false, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {});
+
+ // start out with no contents (for ajax activation)
+ var cluetipContents = false;
+ var cluezIndex = parseInt(opts.cluezIndex, 10)-1;
+ var isActive = false, closeOnDelay = 0;
+
+ // create the cluetip divs
+ if (!$('#cluetip').length) {
+ $cluetipInner = $('<div id="cluetip-inner"></div>');
+ $cluetipTitle = $('<h3 id="cluetip-title"></h3>');
+ $cluetipOuter = $('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);
+ $cluetip = $('<div id="cluetip"></div>').css({zIndex: opts.cluezIndex})
+ .append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();
+ $('<div id="cluetip-waitimage"></div>').css({position: 'absolute', zIndex: cluezIndex-1})
+ .insertBefore('#cluetip').hide();
+ $cluetip.css({position: 'absolute', zIndex: cluezIndex});
+ $cluetipOuter.css({position: 'relative', zIndex: cluezIndex+1});
+ $cluetipArrows = $('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex: cluezIndex+1}).appendTo('#cluetip');
+ }
+ var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0;
+ if (!$dropShadow) {
+ $dropShadow = $([]);
+ for (var i=0; i < dropShadowSteps; i++) {
+ $dropShadow = $dropShadow.add($('<div></div>').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i}));
+ };
+ $dropShadow.css({position: 'absolute', backgroundColor: '#000'})
+ .prependTo($cluetip);
+ }
+ var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass;
+ if (!tipAttribute && !opts.splitTitle && !js) return true;
+ // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip
+ if (opts.local && opts.hideLocal) { $(tipAttribute + ':first').hide(); }
+ var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);
+ // vertical measurement variables
+ var tipHeight, wHeight;
+ var defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px';
+ var sTop, linkTop, posY, tipY, mouseY, baseline;
+ // horizontal measurement variables
+ var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10);
+ var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'))||0) + (parseInt($cluetip.css('paddingRight'))||0) + dropShadowSteps;
+ var linkWidth = this.offsetWidth;
+ var linkLeft, posX, tipX, mouseX, winWidth;
+
+ // parse the title
+ var tipParts;
+ var tipTitle = (opts.attribute != 'title') ? $this.attr(opts.titleAttribute) : '';
+ if (opts.splitTitle) {
+ if(tipTitle == undefined) {tipTitle = '';}
+ tipParts = tipTitle.split(opts.splitTitle);
+ tipTitle = tipParts.shift();
+ }
+ var localContent;
+
+/***************************************
+* ACTIVATION
+****************************************/
+
+//activate clueTip
+ var activate = function(event) {
+ if (!opts.onActivate($this)) {
+ return false;
+ }
+ isActive = true;
+ $cluetip.removeClass().css({width: tipInnerWidth});
+ if (tipAttribute == $this.attr('href')) {
+ $this.css('cursor', opts.cursor);
+ }
+ $this.attr('title','');
+ if (opts.hoverClass) {
+ $this.addClass(opts.hoverClass);
+ }
+ linkTop = posY = $this.offset().top;
+ linkLeft = $this.offset().left;
+ mouseX = event.pageX;
+ mouseY = event.pageY;
+ if ($this[0].tagName.toLowerCase() != 'area') {
+ sTop = $(document).scrollTop();
+ winWidth = $(window).width();
+ }
+// position clueTip horizontally
+ if (opts.positionBy == 'fixed') {
+ posX = linkWidth + linkLeft + lOffset;
+ $cluetip.css({left: posX});
+ } else {
+ posX = (linkWidth > linkLeft && linkLeft > tipWidth)
+ || linkLeft + linkWidth + tipWidth + lOffset > winWidth
+ ? linkLeft - tipWidth - lOffset
+ : linkWidth + linkLeft + lOffset;
+ if ($this[0].tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
+ if (mouseX + 20 + tipWidth > winWidth) {
+ $cluetip.addClass(' cluetip-' + ctClass);
+ posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) : mouseX - (tipWidth/2);
+ } else {
+ posX = mouseX + lOffset;
+ }
+ }
+ var pY = posX < 0 ? event.pageY + tOffset : event.pageY;
+ $cluetip.css({left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0)});
+ }
+ wHeight = $(window).height();
+
+/***************************************
+* load a string from cluetip method's first argument
+***************************************/
+ if (js) {
+ $cluetipInner.html(js);
+ cluetipShow(pY);
+ }
+/***************************************
+* load the title attribute only (or user-selected attribute).
+* clueTip title is the string before the first delimiter
+* subsequent delimiters place clueTip body text on separate lines
+***************************************/
+
+ else if (tipParts) {
+ var tpl = tipParts.length;
+ for (var i=0; i < tpl; i++){
+ if (i == 0) {
+ $cluetipInner.html(tipParts[i]);
+ } else {
+ $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
+ }
+ };
+ cluetipShow(pY);
+ }
+/***************************************
+* load external file via ajax
+***************************************/
+
+ else if (!opts.local && tipAttribute.indexOf('#') != 0) {
+ if (cluetipContents && opts.ajaxCache) {
+ $cluetipInner.html(cluetipContents);
+ cluetipShow(pY);
+ }
+ else {
+ var ajaxSettings = opts.ajaxSettings;
+ ajaxSettings.url = tipAttribute;
+ ajaxSettings.beforeSend = function() {
+ $cluetipOuter.children().empty();
+ if (opts.waitImage) {
+ $('#cluetip-waitimage')
+ .css({top: mouseY+20, left: mouseX+20})
+ .show();
+ }
+ };
+ ajaxSettings.error = function() {
+ if (isActive) {
+ $cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
+ }
+ };
+ ajaxSettings.success = function(data) {
+ cluetipContents = opts.ajaxProcess(data);
+ if (isActive) {
+ $cluetipInner.html(cluetipContents);
+ }
+ };
+ ajaxSettings.complete = function() {
+ imgCount = $('#cluetip-inner img').length;
+ if (imgCount && !$.browser.opera) {
+ $('#cluetip-inner img').load(function() {
+ imgCount--;
+ if (imgCount<1) {
+ $('#cluetip-waitimage').hide();
+ if (isActive) cluetipShow(pY);
+ }
+ });
+ } else {
+ $('#cluetip-waitimage').hide();
+ if (isActive) cluetipShow(pY);
+ }
+ };
+ $.ajax(ajaxSettings);
+ }
+
+/***************************************
+* load an element from the same page
+***************************************/
+ } else if (opts.local){
+ var $localContent = $(tipAttribute + ':first');
+ var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('<div></div>').children().clone(true) : $localContent.html();
+ $.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip);
+ cluetipShow(pY);
+ }
+ };
+
+// get dimensions and options for cluetip and prepare it to be shown
+ var cluetipShow = function(bpY) {
+ $cluetip.addClass('cluetip-' + ctClass);
+
+ if (opts.truncate) {
+ var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...';
+ $cluetipInner.html($truncloaded);
+ }
+ function doNothing() {}; //empty function
+ tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide();
+ if (opts.sticky) {
+ var $closeLink = $('<div id="cluetip-close"><a href="#">' + opts.closeText + '</a></div>');
+ (opts.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner);
+ $closeLink.click(function() {
+ cluetipClose();
+ return false;
+ });
+ if (opts.mouseOutClose) {
+ if ($.fn.hoverIntent && opts.hoverIntent) {
+ $cluetip.hoverIntent({
+ over: doNothing,
+ timeout: opts.hoverIntent.timeout,
+ out: function() { $closeLink.trigger('click'); }
+ });
+ } else {
+ $cluetip.hover(doNothing,
+ function() {$closeLink.trigger('click'); });
+ }
+ } else {
+ $cluetip.unbind('mouseout');
+ }
+ }
+// now that content is loaded, finish the positioning
+ var direction = '';
+ $cluetipOuter.css({overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight});
+ tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10);
+ tipY = posY;
+ baseline = sTop + wHeight;
+ if (opts.positionBy == 'fixed') {
+ tipY = posY - opts.dropShadowSteps + tOffset;
+ } else if ( (posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy == 'bottomTop') {
+ if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) {
+ tipY = mouseY - tipHeight - tOffset;
+ direction = 'top';
+ } else {
+ tipY = mouseY + tOffset;
+ direction = 'bottom';
+ }
+ } else if ( posY + tipHeight + tOffset > baseline ) {
+ tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset;
+ } else if ($this.css('display') == 'block' || $this[0].tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") {
+ tipY = bpY - tOffset;
+ } else {
+ tipY = posY - opts.dropShadowSteps;
+ }
+ if (direction == '') {
+ posX < linkLeft ? direction = 'left' : direction = 'right';
+ }
+ $cluetip.css({top: tipY + 'px'}).removeClass().addClass('clue-' + direction + '-' + ctClass).addClass(' cluetip-' + ctClass);
+ if (opts.arrows) { // set up arrow positioning to align with element
+ var bgY = (posY - tipY - opts.dropShadowSteps);
+ $cluetipArrows.css({top: (/(left|right)/.test(direction) && posX >=0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : ''}).show();
+ } else {
+ $cluetipArrows.hide();
+ }
+
+// (first hide, then) ***SHOW THE CLUETIP***
+ $dropShadow.hide();
+ $cluetip.hide()[opts.fx.open](opts.fx.open != 'show' && opts.fx.openSpeed);
+ if (opts.dropShadow) $dropShadow.css({height: tipHeight, width: tipInnerWidth}).show();
+ if ($.fn.bgiframe) { $cluetip.bgiframe(); }
+ // trigger the optional onShow function
+ if (opts.delayedClose > 0) {
+ closeOnDelay = setTimeout(cluetipClose, opts.delayedClose);
+ }
+ opts.onShow($cluetip, $cluetipInner);
+
+ };
+
+/***************************************
+ =INACTIVATION
+-------------------------------------- */
+ var inactivate = function() {
+ isActive = false;
+ $('#cluetip-waitimage').hide();
+ if (!opts.sticky || (/click|toggle/).test(opts.activation) ) {
+ cluetipClose();
+clearTimeout(closeOnDelay);
+ };
+ if (opts.hoverClass) {
+ $this.removeClass(opts.hoverClass);
+ }
+ $('.cluetip-clicked').removeClass('cluetip-clicked');
+ };
+// close cluetip and reset some things
+ var cluetipClose = function() {
+ $cluetipOuter
+ .parent().hide().removeClass().end()
+ .children().empty();
+ if (tipTitle) {
+ $this.attr(opts.titleAttribute, tipTitle);
+ }
+ $this.css('cursor','');
+ if (opts.arrows) $cluetipArrows.css({top: ''});
+ };
+
+/***************************************
+ =BIND EVENTS
+-------------------------------------- */
+ // activate by click
+ if ( (/click|toggle/).test(opts.activation) ) {
+ $this.click(function(event) {
+ if ($cluetip.is(':hidden') || !$this.is('.cluetip-clicked')) {
+ activate(event);
+ $('.cluetip-clicked').removeClass('cluetip-clicked');
+ $this.addClass('cluetip-clicked');
+
+ } else {
+ inactivate(event);
+
+ }
+ this.blur();
+ return false;
+ });
+ // activate by focus; inactivate by blur
+ } else if (opts.activation == 'focus') {
+ $this.focus(function(event) {
+ activate(event);
+ });
+ $this.blur(function(event) {
+ inactivate(event);
+ });
+ // activate by hover
+ // clicking is returned false if cluetip url is same as href url
+ } else {
+ $this.click(function() {
+ if ($this.attr('href') && $this.attr('href') == tipAttribute && !opts.clickThrough) {
+ return false;
+ }
+ });
+ //set up mouse tracking
+ var mouseTracks = function(evt) {
+ if (opts.tracking == true) {
+ var trackX = posX - evt.pageX;
+ var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY;
+ $this.mousemove(function(evt) {
+ $cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY });
+ });
+ }
+ };
+ if ($.fn.hoverIntent && opts.hoverIntent) {
+ $this.mouseover(function() {$this.attr('title',''); })
+ .hoverIntent({
+ sensitivity: opts.hoverIntent.sensitivity,
+ interval: opts.hoverIntent.interval,
+ over: function(event) {
+ activate(event);
+ mouseTracks(event);
+ },
+ timeout: opts.hoverIntent.timeout,
+ out: function(event) {inactivate(event); $this.unbind('mousemove');}
+ });
+ } else {
+ $this.hover(function(event) {
+ activate(event);
+ mouseTracks(event);
+ }, function(event) {
+ inactivate(event);
+ $this.unbind('mousemove');
+ });
+ }
+ }
+ });
+ };
+
+/*
+ * options for clueTip
+ *
+ * each one can be explicitly overridden by changing its value.
+ * for example: $.fn.cluetip.defaults.width = 200;
+ * would change the default width for all clueTips to 200.
+ *
+ * each one can also be overridden by passing an options map to the cluetip method.
+ * for example: $('a.example').cluetip({width: 200});
+ * would change the default width to 200 for clueTips invoked by a link with class of "example"
+ *
+ */
+
+ $.fn.cluetip.defaults = { // set up default options
+ width: 275, // The width of the clueTip
+ height: 'auto', // The height of the clueTip
+ cluezIndex: 97, // Sets the z-index style property of the clueTip
+ positionBy: 'auto', // Sets the type of positioning: 'auto', 'mouse','bottomTop', 'fixed'
+ topOffset: 15, // Number of px to offset clueTip from top of invoking element
+ leftOffset: 15, // Number of px to offset clueTip from left of invoking element
+ local: false, // Whether to use content from the same page for the clueTip's body
+ hideLocal: true, // If local option is set to true, this determines whether local content
+ // to be shown in clueTip should be hidden at its original location
+ attribute: 'rel', // the attribute to be used for fetching the clueTip's body content
+ titleAttribute: 'title', // the attribute to be used for fetching the clueTip's title
+ splitTitle: '', // A character used to split the title attribute into the clueTip title and divs
+ // within the clueTip body. more info below [6]
+ showTitle: true, // show title bar of the clueTip, even if title attribute not set
+ cluetipClass: 'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass.
+ hoverClass: '', // class applied to the invoking element onmouseover and removed onmouseout
+ waitImage: true, // whether to show a "loading" img, which is set in jquery.cluetip.css
+ cursor: 'help',
+ arrows: false, // if true, displays arrow on appropriate side of clueTip
+ dropShadow: true, // set to false if you don't want the drop-shadow effect on the clueTip
+ dropShadowSteps: 6, // adjusts the size of the drop shadow
+ sticky: false, // keep visible until manually closed
+ mouseOutClose: false, // close when clueTip is moused out
+ activation: 'hover', // set to 'click' to force user to click to show clueTip
+ // set to 'focus' to show on focus of a form element and hide on blur
+ clickThrough: false, // if true, and activation is not 'click', then clicking on link will take user to the link's href,
+ // even if href and tipAttribute are equal
+ tracking: false, // if true, clueTip will track mouse movement (experimental)
+ delayedClose: 0, // close clueTip on a timed delay (experimental)
+ closePosition: 'top', // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title'
+ closeText: 'Close', // text (or HTML) to to be clicked to close sticky clueTips
+ truncate: 0, // number of characters to truncate clueTip's contents. if 0, no truncation occurs
+
+ // effect and speed for opening clueTips
+ fx: {
+ open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
+ openSpeed: ''
+ },
+
+ // settings for when hoverIntent plugin is used
+ hoverIntent: {
+ sensitivity: 3,
+ interval: 50,
+ timeout: 0
+ },
+
+ // function to run just before clueTip is shown.
+ onActivate: function(e) {return true;},
+
+ // function to run just after clueTip is shown.
+ onShow: function(ct, c){},
+
+ // whether to cache results of ajax request to avoid unnecessary hits to server
+ ajaxCache: true,
+
+ // process data retrieved via xhr before it's displayed
+ ajaxProcess: function(data) {
+ data = data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g, '').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,'');
+ return data;
+ },
+
+ // can pass in standard $.ajax() parameters, not including error, complete, success, and url
+ ajaxSettings: {
+ dataType: 'html'
+ },
+ debug: false
+ };
+
+
+/*
+ * Global defaults for clueTips. Apply to all calls to the clueTip plugin.
+ *
+ * @example $.cluetip.setup({
+ * insertionType: 'prependTo',
+ * insertionElement: '#container'
+ * });
+ *
+ * @property
+ * @name $.cluetip.setup
+ * @type Map
+ * @cat Plugins/tooltip
+ * @option String insertionType: Default is 'appendTo'. Determines the method to be used for inserting the clueTip into the DOM. Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter'
+ * @option String insertionElement: Default is 'body'. Determines which element in the DOM the plugin will reference when inserting the clueTip.
+ *
+ */
+
+ var insertionType = 'appendTo', insertionElement = 'body';
+ $.cluetip = {};
+ $.cluetip.setup = function(options) {
+ if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) {
+ insertionType = options.insertionType;
+ }
+ if (options && options.insertionElement) {
+ insertionElement = options.insertionElement;
+ }
+ };
+
+})(jQuery);
diff --git a/themes/default/js/plugins/jquery.cluetip.packed.js b/themes/default/js/plugins/jquery.cluetip.packed.js
new file mode 100644
index 000000000..99b15f30c
--- /dev/null
+++ b/themes/default/js/plugins/jquery.cluetip.packed.js
@@ -0,0 +1 @@
+;(function($){var $cluetip,$cluetipInner,$cluetipOuter,$cluetipTitle,$cluetipArrows,$dropShadow,imgCount;$.fn.cluetip=function(js,options){if(typeof js=='object'){options=js;js=null}return this.each(function(index){var $this=$(this);var opts=$.extend(false,{},$.fn.cluetip.defaults,options||{},$.metadata?$this.metadata():$.meta?$this.data():{});var cluetipContents=false;var cluezIndex=parseInt(opts.cluezIndex,10)-1;var isActive=false,closeOnDelay=0;if(!$('#cluetip').length){$cluetipInner=$('<div id="cluetip-inner"></div>');$cluetipTitle=$('<h3 id="cluetip-title"></h3>');$cluetipOuter=$('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);$cluetip=$('<div id="cluetip"></div>').css({zIndex:opts.cluezIndex}).append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();$('<div id="cluetip-waitimage"></div>').css({position:'absolute',zIndex:cluezIndex-1}).insertBefore('#cluetip').hide();$cluetip.css({position:'absolute',zIndex:cluezIndex});$cluetipOuter.css({position:'relative',zIndex:cluezIndex+1});$cluetipArrows=$('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:cluezIndex+1}).appendTo('#cluetip')}var dropShadowSteps=(opts.dropShadow)?+opts.dropShadowSteps:0;if(!$dropShadow){$dropShadow=$([]);for(var i=0;i<dropShadowSteps;i++){$dropShadow=$dropShadow.add($('<div></div>').css({zIndex:cluezIndex-i-1,opacity:.1,top:1+i,left:1+i}))};$dropShadow.css({position:'absolute',backgroundColor:'#000'}).prependTo($cluetip)}var tipAttribute=$this.attr(opts.attribute),ctClass=opts.cluetipClass;if(!tipAttribute&&!opts.splitTitle&&!js)return true;if(opts.local&&opts.hideLocal){$(tipAttribute+':first').hide()}var tOffset=parseInt(opts.topOffset,10),lOffset=parseInt(opts.leftOffset,10);var tipHeight,wHeight;var defHeight=isNaN(parseInt(opts.height,10))?'auto':(/\D/g).test(opts.height)?opts.height:opts.height+'px';var sTop,linkTop,posY,tipY,mouseY,baseline;var tipInnerWidth=isNaN(parseInt(opts.width,10))?275:parseInt(opts.width,10);var tipWidth=tipInnerWidth+(parseInt($cluetip.css('paddingLeft'))||0)+(parseInt($cluetip.css('paddingRight'))||0)+dropShadowSteps;var linkWidth=this.offsetWidth;var linkLeft,posX,tipX,mouseX,winWidth;var tipParts;var tipTitle=(opts.attribute!='title')?$this.attr(opts.titleAttribute):'';if(opts.splitTitle){if(tipTitle==undefined){tipTitle=''}tipParts=tipTitle.split(opts.splitTitle);tipTitle=tipParts.shift()}var localContent;var activate=function(event){if(!opts.onActivate($this)){return false}isActive=true;$cluetip.removeClass().css({width:tipInnerWidth});if(tipAttribute==$this.attr('href')){$this.css('cursor',opts.cursor)}$this.attr('title','');if(opts.hoverClass){$this.addClass(opts.hoverClass)}linkTop=posY=$this.offset().top;linkLeft=$this.offset().left;mouseX=event.pageX;mouseY=event.pageY;if($this[0].tagName.toLowerCase()!='area'){sTop=$(document).scrollTop();winWidth=$(window).width()}if(opts.positionBy=='fixed'){posX=linkWidth+linkLeft+lOffset;$cluetip.css({left:posX})}else{posX=(linkWidth>linkLeft&&linkLeft>tipWidth)||linkLeft+linkWidth+tipWidth+lOffset>winWidth?linkLeft-tipWidth-lOffset:linkWidth+linkLeft+lOffset;if($this[0].tagName.toLowerCase()=='area'||opts.positionBy=='mouse'||linkWidth+tipWidth>winWidth){if(mouseX+20+tipWidth>winWidth){$cluetip.addClass(' cluetip-'+ctClass);posX=(mouseX-tipWidth-lOffset)>=0?mouseX-tipWidth-lOffset-parseInt($cluetip.css('marginLeft'),10)+parseInt($cluetipInner.css('marginRight'),10):mouseX-(tipWidth/2)}else{posX=mouseX+lOffset}}var pY=posX<0?event.pageY+tOffset:event.pageY;$cluetip.css({left:(posX>0&&opts.positionBy!='bottomTop')?posX:(mouseX+(tipWidth/2)>winWidth)?winWidth/2-tipWidth/2:Math.max(mouseX-(tipWidth/2),0)})}wHeight=$(window).height();if(js){$cluetipInner.html(js);cluetipShow(pY)}else if(tipParts){var tpl=tipParts.length;for(var i=0;i<tpl;i++){if(i==0){$cluetipInner.html(tipParts[i])}else{$cluetipInner.append('<div class="split-body">'+tipParts[i]+'</div>')}};cluetipShow(pY)}else if(!opts.local&&tipAttribute.indexOf('#')!=0){if(cluetipContents&&opts.ajaxCache){$cluetipInner.html(cluetipContents);cluetipShow(pY)}else{var ajaxSettings=opts.ajaxSettings;ajaxSettings.url=tipAttribute;ajaxSettings.beforeSend=function(){$cluetipOuter.children().empty();if(opts.waitImage){$('#cluetip-waitimage').css({top:mouseY+20,left:mouseX+20}).show()}};ajaxSettings.error=function(){if(isActive){$cluetipInner.html('<i>sorry, the contents could not be loaded</i>')}};ajaxSettings.success=function(data){cluetipContents=opts.ajaxProcess(data);if(isActive){$cluetipInner.html(cluetipContents)}};ajaxSettings.complete=function(){imgCount=$('#cluetip-inner img').length;if(imgCount&&!$.browser.opera){$('#cluetip-inner img').load(function(){imgCount--;if(imgCount<1){$('#cluetip-waitimage').hide();if(isActive)cluetipShow(pY)}})}else{$('#cluetip-waitimage').hide();if(isActive)cluetipShow(pY)}};$.ajax(ajaxSettings)}}else if(opts.local){var $localContent=$(tipAttribute+':first');var localCluetip=$.fn.wrapInner?$localContent.wrapInner('<div></div>').children().clone(true):$localContent.html();$.fn.wrapInner?$cluetipInner.empty().append(localCluetip):$cluetipInner.html(localCluetip);cluetipShow(pY)}};var cluetipShow=function(bpY){$cluetip.addClass('cluetip-'+ctClass);if(opts.truncate){var $truncloaded=$cluetipInner.text().slice(0,opts.truncate)+'...';$cluetipInner.html($truncloaded)}function doNothing(){};tipTitle?$cluetipTitle.show().html(tipTitle):(opts.showTitle)?$cluetipTitle.show().html('&nbsp;'):$cluetipTitle.hide();if(opts.sticky){var $closeLink=$('<div id="cluetip-close"><a href="#">'+opts.closeText+'</a></div>');(opts.closePosition=='bottom')?$closeLink.appendTo($cluetipInner):(opts.closePosition=='title')?$closeLink.prependTo($cluetipTitle):$closeLink.prependTo($cluetipInner);$closeLink.click(function(){cluetipClose();return false});if(opts.mouseOutClose){if($.fn.hoverIntent&&opts.hoverIntent){$cluetip.hoverIntent({over:doNothing,timeout:opts.hoverIntent.timeout,out:function(){$closeLink.trigger('click')}})}else{$cluetip.hover(doNothing,function(){$closeLink.trigger('click')})}}else{$cluetip.unbind('mouseout')}}var direction='';$cluetipOuter.css({overflow:defHeight=='auto'?'visible':'auto',height:defHeight});tipHeight=defHeight=='auto'?Math.max($cluetip.outerHeight(),$cluetip.height()):parseInt(defHeight,10);tipY=posY;baseline=sTop+wHeight;if(opts.positionBy=='fixed'){tipY=posY-opts.dropShadowSteps+tOffset}else if((posX<mouseX&&Math.max(posX,0)+tipWidth>mouseX)||opts.positionBy=='bottomTop'){if(posY+tipHeight+tOffset>baseline&&mouseY-sTop>tipHeight+tOffset){tipY=mouseY-tipHeight-tOffset;direction='top'}else{tipY=mouseY+tOffset;direction='bottom'}}else if(posY+tipHeight+tOffset>baseline){tipY=(tipHeight>=wHeight)?sTop:baseline-tipHeight-tOffset}else if($this.css('display')=='block'||$this[0].tagName.toLowerCase()=='area'||opts.positionBy=="mouse"){tipY=bpY-tOffset}else{tipY=posY-opts.dropShadowSteps}if(direction==''){posX<linkLeft?direction='left':direction='right'}$cluetip.css({top:tipY+'px'}).removeClass().addClass('clue-'+direction+'-'+ctClass).addClass(' cluetip-'+ctClass);if(opts.arrows){var bgY=(posY-tipY-opts.dropShadowSteps);$cluetipArrows.css({top:(/(left|right)/.test(direction)&&posX>=0&&bgY>0)?bgY+'px':/(left|right)/.test(direction)?0:''}).show()}else{$cluetipArrows.hide()}$dropShadow.hide();$cluetip.hide()[opts.fx.open](opts.fx.open!='show'&&opts.fx.openSpeed);if(opts.dropShadow)$dropShadow.css({height:tipHeight,width:tipInnerWidth}).show();if($.fn.bgiframe){$cluetip.bgiframe()}if(opts.delayedClose>0){closeOnDelay=setTimeout(cluetipClose,opts.delayedClose)}opts.onShow($cluetip,$cluetipInner)};var inactivate=function(){isActive=false;$('#cluetip-waitimage').hide();if(!opts.sticky||(/click|toggle/).test(opts.activation)){cluetipClose();clearTimeout(closeOnDelay)};if(opts.hoverClass){$this.removeClass(opts.hoverClass)}$('.cluetip-clicked').removeClass('cluetip-clicked')};var cluetipClose=function(){$cluetipOuter.parent().hide().removeClass().end().children().empty();if(tipTitle){$this.attr(opts.titleAttribute,tipTitle)}$this.css('cursor','');if(opts.arrows)$cluetipArrows.css({top:''})};if((/click|toggle/).test(opts.activation)){$this.click(function(event){if($cluetip.is(':hidden')||!$this.is('.cluetip-clicked')){activate(event);$('.cluetip-clicked').removeClass('cluetip-clicked');$this.addClass('cluetip-clicked')}else{inactivate(event)}this.blur();return false})}else if(opts.activation=='focus'){$this.focus(function(event){activate(event)});$this.blur(function(event){inactivate(event)})}else{$this.click(function(){if($this.attr('href')&&$this.attr('href')==tipAttribute&&!opts.clickThrough){return false}});var mouseTracks=function(evt){if(opts.tracking==true){var trackX=posX-evt.pageX;var trackY=tipY?tipY-evt.pageY:posY-evt.pageY;$this.mousemove(function(evt){$cluetip.css({left:evt.pageX+trackX,top:evt.pageY+trackY})})}};if($.fn.hoverIntent&&opts.hoverIntent){$this.mouseover(function(){$this.attr('title','')}).hoverIntent({sensitivity:opts.hoverIntent.sensitivity,interval:opts.hoverIntent.interval,over:function(event){activate(event);mouseTracks(event)},timeout:opts.hoverIntent.timeout,out:function(event){inactivate(event);$this.unbind('mousemove')}})}else{$this.hover(function(event){activate(event);mouseTracks(event)},function(event){inactivate(event);$this.unbind('mousemove')})}}})};$.fn.cluetip.defaults={width:275,height:'auto',cluezIndex:97,positionBy:'auto',topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:'rel',titleAttribute:'title',splitTitle:'',showTitle:true,cluetipClass:'default',hoverClass:'',waitImage:true,cursor:'help',arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:'hover',clickThrough:false,tracking:false,delayedClose:0,closePosition:'top',closeText:'Close',truncate:0,fx:{open:'show',openSpeed:''},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(e){return true},onShow:function(ct,c){},ajaxCache:true,ajaxProcess:function(data){data=data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,'').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,'');return data},ajaxSettings:{dataType:'html'},debug:false};var insertionType='appendTo',insertionElement='body';$.cluetip={};$.cluetip.setup=function(options){if(options&&options.insertionType&&(options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){insertionType=options.insertionType}if(options&&options.insertionElement){insertionElement=options.insertionElement}}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/plugins/jquery.fcbkcomplete.js b/themes/default/js/plugins/jquery.fcbkcomplete.js
new file mode 100644
index 000000000..86b3b6ab2
--- /dev/null
+++ b/themes/default/js/plugins/jquery.fcbkcomplete.js
@@ -0,0 +1,588 @@
+/*
+ FCBKcomplete 2.7
+ - Jquery version required: 1.2.x, 1.3.x, 1.4.x
+
+ Changelog:
+ - 2.00 new version of fcbkcomplete
+
+ - 2.01 fixed bugs & added features
+ fixed filter bug for preadded items
+ focus on the input after selecting tag
+ the element removed pressing backspace when the element is selected
+ input tag in the control has a border in IE7
+ added iterate over each match and apply the plugin separately
+ set focus on the input after selecting tag
+
+ - 2.02 fixed fist element selected bug
+ fixed defaultfilter error bug
+
+ - 2.5 removed selected="selected" attribute due ie bug
+ element search algorithm changed
+ better performance fix added
+ fixed many small bugs
+ onselect event added
+ onremove event added
+
+ - 2.6 ie6/7 support fix added
+ added new public method addItem due request
+ added new options "firstselected" that you can set true/false to select first element on dropdown list
+ autoexpand input element added
+ removeItem bug fixed
+ and many more bug fixed
+ fixed public method to use it $("elem").trigger("addItem",[{"title": "test", "value": "test"}]);
+
+- 2.7 jquery 1.4 compability
+ item lock possability added by adding locked class to preadded option <option value="value" class="selected locked">text</option>
+ maximum item that can be added to the list
+ */
+/* Coded by: emposha <admin@emposha.com> */
+/* Copyright: Emposha.com <http://www.emposha.com/> - Distributed under MIT - Keep this message! */
+/*
+ * json_url - url to fetch json object
+ * cache - use cache
+ * height - maximum number of element shown before scroll will apear
+ * newel - show typed text like a element
+ * firstselected - automaticly select first element from dropdown
+ * filter_case - case sensitive filter
+ * filter_selected - filter selected items from list
+ * complete_text - text for complete page
+ * maxshownitems - maximum numbers that will be shown at dropdown list (less better performance)
+ * onselect - fire event on item select
+ * onremove - fire event on item remove
+ * maxitimes - maximum items that can be added
+ */
+jQuery(function($){
+ $.fn.fcbkcomplete = function(opt){
+ return this.each(function(){
+ function init(){
+ createFCBK();
+ preSet();
+ addInput(0);
+ }
+
+ function createFCBK(){
+ element.hide();
+ element.attr("multiple", "multiple");
+ if (element.attr("name").indexOf("[]") == -1) {
+ element.attr("name", element.attr("name") + "[]");
+ }
+
+ holder = $(document.createElement("ul"));
+ holder.attr("class", "holder");
+ element.after(holder);
+
+ complete = $(document.createElement("div"));
+ complete.addClass("facebook-auto");
+ complete.append('<div class="default">' + options.complete_text + "</div>");
+
+ if (browser_msie) {
+ complete.append('<iframe class="ie6fix" scrolling="no" frameborder="0"></iframe>');
+ browser_msie_frame = complete.children('.ie6fix');
+ }
+
+ feed = $(document.createElement("ul"));
+ feed.attr("id", elemid + "_feed");
+
+ complete.prepend(feed);
+ holder.after(complete);
+ feed.css("width", complete.width());
+ }
+
+ function preSet(){
+ element.children("option").each(function(i, option){
+ option = $(option);
+ if (option.hasClass("selected")) {
+ addItem(option.text(), option.val(), true, option.hasClass("locked"));
+ option.attr("selected", "selected");
+ }
+ else {
+ option.removeAttr("selected");
+ }
+
+ cache.push({
+ caption: option.text(),
+ value: option.val()
+ });
+ search_string += "" + (cache.length - 1) + ":" + option.text() + ";";
+ });
+ }
+
+ //public method to add new item
+ $(this).bind("addItem", function(event, data){
+ addItem(data.title, data.value);
+ });
+
+ function addItem(title, value, preadded, locked){
+ if (!maxItems()) {
+ return false;
+ }
+ var li = document.createElement("li");
+ var txt = document.createTextNode(title);
+ var aclose = document.createElement("a");
+ var liclass = "bit-box" + (locked ? " locked" : "");
+ $(li).attr({
+ "class": liclass,
+ "rel": value
+ });
+ $(li).prepend(txt);
+ $(aclose).attr({
+ "class": "closebutton",
+ "href": "#"
+ });
+
+ li.appendChild(aclose);
+ holder.append(li);
+
+ $(aclose).click(function(){
+ removeItem($(this).parent("li"));
+ return false;
+ });
+
+ if (!preadded) {
+ $("#" + elemid + "_annoninput").remove();
+ var _item;
+ addInput(1);
+ if (element.children("option[value=" + value + "]").length) {
+ _item = element.children("option[value=" + value + "]");
+ _item.get(0).setAttribute("selected", "selected");
+ if (!_item.hasClass("selected")) {
+ _item.addClass("selected");
+ }
+ }
+ else {
+ var _item = $(document.createElement("option"));
+ _item.attr("value", value).get(0).setAttribute("selected", "selected");
+ _item.attr("value", value).addClass("selected");
+ _item.text(title);
+ element.append(_item);
+ }
+ if (options.onselect.length) {
+ funCall(options.onselect, _item)
+ }
+ }
+ holder.children("li.bit-box.deleted").removeClass("deleted");
+ feed.hide();
+ browser_msie ? browser_msie_frame.hide() : '';
+ }
+
+ function removeItem(item){
+ var parent = item.parent("li");
+ if (!parent.hasClass('locked')) {
+ parent.fadeOut("fast");
+ if (options.onremove.length) {
+ var _item = element.children("option[value=" + item.attr("rel") + "]");
+ funCall(options.onremove, _item)
+ }
+ element.children("option[value=" + item.attr("rel") + "]").removeAttr("selected");
+ element.children("option[value=" + item.attr("rel") + "]").removeClass("selected");
+ item.remove();
+ deleting = 0;
+ }
+ }
+
+ function addInput(focusme){
+ var li = $(document.createElement("li"));
+ var input = $(document.createElement("input"));
+
+ li.attr({
+ "class": "bit-input",
+ "id": elemid + "_annoninput"
+ });
+ input.attr({
+ "type": "text",
+ "class": "maininput",
+ "size": "1"
+ });
+ holder.append(li.append(input));
+
+ input.focus(function(){
+ complete.fadeIn("fast");
+ });
+
+ input.blur(function(){
+ complete.fadeOut("fast");
+ });
+
+ holder.click(function(){
+ input.focus();
+ if (feed.length && input.val().length) {
+ feed.show();
+ }
+ else {
+ feed.hide();
+ browser_msie ? browser_msie_frame.hide() : '';
+ complete.children(".default").show();
+ }
+ });
+
+ input.keypress(function(event){
+ if (event.keyCode == 13) {
+ return false;
+ }
+ //auto expand input
+ input.attr("size", input.val().length + 1);
+ });
+
+ input.keydown(function(event){
+ //prevent to enter some bad chars when input is empty
+ if (event.keyCode == 191) {
+ event.preventDefault();
+ return false;
+ }
+ });
+
+ input.keyup(function(event){
+ var etext = xssPrevent(input.val());
+
+ if (event.keyCode == 8 && etext.length == 0) {
+ feed.hide();
+ browser_msie ? browser_msie_frame.hide() : '';
+ if (!holder.children("li.bit-box:last").hasClass('locked')) {
+ if (holder.children("li.bit-box.deleted").length == 0) {
+ holder.children("li.bit-box:last").addClass("deleted");
+ return false;
+ }
+ else {
+ if (deleting) {
+ return;
+ }
+ deleting = 1;
+ holder.children("li.bit-box.deleted").fadeOut("fast", function(){
+ removeItem($(this));
+ return false;
+ });
+ }
+ }
+ }
+
+ if (event.keyCode != 40 && event.keyCode != 38 && etext.length != 0) {
+ counter = 0;
+
+ if (options.json_url) {
+ if (options.cache && json_cache) {
+ addMembers(etext);
+ bindEvents();
+ }
+ else {
+ $.getJSON(options.json_url + "?tag=" + etext, null, function(data){
+ addMembers(etext, data);
+ json_cache = true;
+ bindEvents();
+ });
+ }
+ }
+ else {
+ addMembers(etext);
+ bindEvents();
+ }
+ complete.children(".default").hide();
+ feed.show();
+ }
+ });
+ if (focusme) {
+ setTimeout(function(){
+ input.focus();
+ complete.children(".default").show();
+ }, 1);
+ }
+ }
+
+ function addMembers(etext, data){
+ feed.html('');
+
+ if (!options.cache) {
+ cache = new Array();
+ search_string = "";
+ }
+
+ addTextItem(etext);
+
+ if (data != null && data.length) {
+ $.each(data, function(i, val){
+ cache.push({
+ caption: val.caption,
+ value: val.value
+ });
+ search_string += "" + (cache.length - 1) + ":" + val.caption + ";";
+ });
+ }
+
+ var maximum = options.maxshownitems < cache.length ? options.maxshownitems : cache.length;
+ var filter = "i";
+ if (options.filter_case) {
+ filter = "";
+ }
+
+ var myregexp, match;
+ try {
+ myregexp = eval('/(?:^|;)\\s*(\\d+)\\s*:[^;]*?' + etext + '[^;]*/g' + filter);
+ match = myregexp.exec(search_string);
+ }
+ catch (ex) {
+ };
+
+ var content = '';
+ while (match != null && maximum > 0) {
+ var id = match[1];
+ var object = cache[id];
+ if (options.filter_selected && element.children("option[value=" + object.value + "]").hasClass("selected")) {
+ //nothing here...
+ }
+ else {
+ content += '<li rel="' + object.value + '">' + itemIllumination(object.caption, etext) + '</li>';
+ counter++;
+ maximum--;
+ }
+ match = myregexp.exec(search_string);
+ }
+ feed.append(content);
+
+ if (options.firstselected) {
+ focuson = feed.children("li:visible:first");
+ focuson.addClass("auto-focus");
+ }
+
+ if (counter > options.height) {
+ feed.css({
+ "height": (options.height * 24) + "px",
+ "overflow": "auto"
+ });
+ if (browser_msie) {
+ browser_msie_frame.css({
+ "height": (options.height * 24) + "px",
+ "width": feed.width() + "px"
+ }).show();
+ }
+ }
+ else {
+ feed.css("height", "auto");
+ if (browser_msie) {
+ browser_msie_frame.css({
+ "height": feed.height() + "px",
+ "width": feed.width() + "px"
+ }).show();
+ }
+ }
+ }
+
+ function itemIllumination(text, etext){
+ if (options.filter_case) {
+ try {
+ eval("var text = text.replace(/(.*)(" + etext + ")(.*)/gi,'$1<em>$2</em>$3');");
+ }
+ catch (ex) {
+ };
+ }
+ else {
+ try {
+ eval("var text = text.replace(/(.*)(" + etext.toLowerCase() + ")(.*)/gi,'$1<em>$2</em>$3');");
+ }
+ catch (ex) {
+ };
+ }
+ return text;
+ }
+
+ function bindFeedEvent(){
+ feed.children("li").mouseover(function(){
+ feed.children("li").removeClass("auto-focus");
+ $(this).addClass("auto-focus");
+ focuson = $(this);
+ });
+
+ feed.children("li").mouseout(function(){
+ $(this).removeClass("auto-focus");
+ focuson = null;
+ });
+ }
+
+ function removeFeedEvent(){
+ feed.children("li").unbind("mouseover");
+ feed.children("li").unbind("mouseout");
+ feed.mousemove(function(){
+ bindFeedEvent();
+ feed.unbind("mousemove");
+ });
+ }
+
+ function bindEvents(){
+ var maininput = $("#" + elemid + "_annoninput").children(".maininput");
+ bindFeedEvent();
+ feed.children("li").unbind("mousedown");
+ feed.children("li").mousedown(function(){
+ var option = $(this);
+ addItem(option.text(), option.attr("rel"));
+ feed.hide();
+ browser_msie ? browser_msie_frame.hide() : '';
+ complete.hide();
+ });
+
+ maininput.unbind("keydown");
+ maininput.keydown(function(event){
+ if (event.keyCode == 191) {
+ event.preventDefault();
+ return false;
+ }
+
+ if (event.keyCode != 8) {
+ holder.children("li.bit-box.deleted").removeClass("deleted");
+ }
+
+ if (event.keyCode == 13 && checkFocusOn()) {
+ var option = focuson;
+ addItem(option.text(), option.attr("rel"));
+ complete.hide();
+ event.preventDefault();
+ focuson = null;
+ return false;
+ }
+
+ if (event.keyCode == 13 && !checkFocusOn()) {
+ if (options.newel) {
+ var value = xssPrevent($(this).val());
+ addItem(value, value);
+ complete.hide();
+ event.preventDefault();
+ focuson = null;
+ }
+ return false;
+ }
+
+ if (event.keyCode == 40) {
+ removeFeedEvent();
+ if (focuson == null || focuson.length == 0) {
+ focuson = feed.children("li:visible:first");
+ feed.get(0).scrollTop = 0;
+ }
+ else {
+ focuson.removeClass("auto-focus");
+ focuson = focuson.nextAll("li:visible:first");
+ var prev = parseInt(focuson.prevAll("li:visible").length, 10);
+ var next = parseInt(focuson.nextAll("li:visible").length, 10);
+ if ((prev > Math.round(options.height / 2) || next <= Math.round(options.height / 2)) && typeof(focuson.get(0)) != "undefined") {
+ feed.get(0).scrollTop = parseInt(focuson.get(0).scrollHeight, 10) * (prev - Math.round(options.height / 2));
+ }
+ }
+ feed.children("li").removeClass("auto-focus");
+ focuson.addClass("auto-focus");
+ }
+ if (event.keyCode == 38) {
+ removeFeedEvent();
+ if (focuson == null || focuson.length == 0) {
+ focuson = feed.children("li:visible:last");
+ feed.get(0).scrollTop = parseInt(focuson.get(0).scrollHeight, 10) * (parseInt(feed.children("li:visible").length, 10) - Math.round(options.height / 2));
+ }
+ else {
+ focuson.removeClass("auto-focus");
+ focuson = focuson.prevAll("li:visible:first");
+ var prev = parseInt(focuson.prevAll("li:visible").length, 10);
+ var next = parseInt(focuson.nextAll("li:visible").length, 10);
+ if ((next > Math.round(options.height / 2) || prev <= Math.round(options.height / 2)) && typeof(focuson.get(0)) != "undefined") {
+ feed.get(0).scrollTop = parseInt(focuson.get(0).scrollHeight, 10) * (prev - Math.round(options.height / 2));
+ }
+ }
+ feed.children("li").removeClass("auto-focus");
+ focuson.addClass("auto-focus");
+ }
+ });
+ }
+
+ function maxItems(){
+ if (options.maxitems != 0) {
+ if (holder.children("li.bit-box").length < options.maxitems) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+ }
+
+ function addTextItem(value){
+ if (options.newel && maxItems()) {
+ feed.children("li[fckb=1]").remove();
+ if (value.length == 0) {
+ return;
+ }
+ var li = $(document.createElement("li"));
+ li.attr({
+ "rel": value,
+ "fckb": "1"
+ }).html(value);
+ feed.prepend(li);
+ counter++;
+ }
+ else {
+ return;
+ }
+ }
+
+ function funCall(func, item){
+ var _object = "";
+ for (i = 0; i < item.get(0).attributes.length; i++) {
+ if (item.get(0).attributes[i].nodeValue != null) {
+ _object += "\"_" + item.get(0).attributes[i].nodeName + "\": \"" + item.get(0).attributes[i].nodeValue + "\",";
+ }
+ }
+ _object = "{" + _object + " notinuse: 0}";
+ try {
+ eval(func + "(" + _object + ")");
+ }
+ catch (ex) {
+ };
+ }
+
+ function checkFocusOn(){
+ if (focuson == null) {
+ return false;
+ }
+ if (focuson.length == 0) {
+ return false;
+ }
+ return true;
+ }
+
+ function xssPrevent(string){
+ string = string.replace(/[\"\'][\s]*javascript:(.*)[\"\']/g, "\"\"");
+ string = string.replace(/script(.*)/g, "");
+ string = string.replace(/eval\((.*)\)/g, "");
+ string = string.replace('/([\x00-\x08,\x0b-\x0c,\x0e-\x19])/', '');
+ return string;
+ }
+
+ var options = $.extend({
+ json_url: null,
+ cache: false,
+ height: "10",
+ newel: false,
+ firstselected: false,
+ filter_case: false,
+ filter_hide: false,
+ complete_text: "Start to type...",
+ maxshownitems: 30,
+ maxitems: 0,
+ onselect: "",
+ onremove: ""
+ }, opt);
+
+ //system variables
+ var holder = null;
+ var feed = null;
+ var complete = null;
+ var counter = 0;
+ var cache = new Array();
+ var json_cache = false;
+ var search_string = "";
+ var focuson = null;
+ var deleting = 0;
+ var browser_msie = "\v" == "v";
+ var browser_msie_frame;
+
+ var element = $(this);
+ var elemid = element.attr("id");
+ init();
+
+ return this;
+ });
+ };
+});
diff --git a/themes/default/js/plugins/jquery.tipTip.minified.js b/themes/default/js/plugins/jquery.tipTip.minified.js
new file mode 100644
index 000000000..62b7cfde0
--- /dev/null
+++ b/themes/default/js/plugins/jquery.tipTip.minified.js
@@ -0,0 +1,27 @@
+ /*
+ * TipTip
+ * Copyright 2010 Drew Wilson
+ * www.drewwilson.com
+ * code.drewwilson.com/entry/tiptip-jquery-plugin
+ *
+ * Version 1.2 - Updated: Jan. 13, 2010
+ *
+ * This Plug-In will create a custom tooltip to replace the default
+ * browser tooltip. It is extremely lightweight and very smart in
+ * that it detects the edges of the browser window and will make sure
+ * the tooltip stays within the current window size. As a result the
+ * tooltip will adjust itself to be displayed above, below, to the left
+ * or to the right depending on what is necessary to stay within the
+ * browser window. It is completely customizable as well via CSS.
+ *
+ * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+(function($){$.fn.tipTip=function(options){var defaults={maxWidth:"200px",edgeOffset:3,delay:400,fadeIn:200,fadeOut:200,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow");}
+return this.each(function(){var org_elem=$(this);var org_title=org_elem.attr("title");if(org_title!=""){org_elem.removeAttr("title");var timeout=false;org_elem.hover(function(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(w_compare<0){if((w_compare+left)<parseInt($(window).scrollLeft())){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare);}else if((tip_w+left)>parseInt($(window).width())){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare);}}
+if((top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop())){t_class=t_class+"_top";arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset));}else if(((top+org_height)-(opts.edgeOffset+tip_h))<0||t_class==""){t_class=t_class+"_bottom";arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}
+if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5;}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5;}
+if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5;}
+tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout);}
+timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn);},opts.delay);},function(){opts.exit.call(this);if(timeout){clearTimeout(timeout);}tiptip_holder.fadeOut(opts.fadeOut);});}});}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/pngfix.js b/themes/default/js/pngfix.js
new file mode 100644
index 000000000..549761a1d
--- /dev/null
+++ b/themes/default/js/pngfix.js
@@ -0,0 +1,37 @@
+
+// Correctly handle PNG transparency in Win IE 5.5 or higher.
+// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
+// 15-Jully-2006 : chrisaga use \" instead of ' in imgTitle
+// : to fix ' display in tooltips
+// : keep the alt attribute
+
+function correctPNG()
+ {
+ for(var i=0; i<document.images.length; i++)
+ {
+ var img = document.images[i]
+ if (img.className == "button" || img.className == "icon")
+ {
+ var imgName = img.src.toUpperCase()
+ if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
+ {
+ var imgID = (img.id) ? "id='" + img.id + "' " : ""
+ var imgClass = (img.className) ? "class='" + img.className + "' " : ""
+ //var imgTitle = (img.title) ? "title=\"" + img.title + "\" " : "alt=\"" + img.alt + "\" "
+ var imgTitle = (img.title) ? "title=\"" + img.title + "\" " : "";
+ imgTitle = imgTitle + (img.alt) ? "title=\"" + img.alt + "\" " : "";
+ var imgStyle = "display:inline-block;" + img.style.cssText
+ if (img.align == "left") imgStyle = "float:left;" + imgStyle
+ if (img.align == "right") imgStyle = "float:right;" + imgStyle
+ if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
+ var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
+ img.outerHTML = strNewHTML
+ i = i-1
+ }
+ }
+ }
+ }
+window.attachEvent("onload", correctPNG);
diff --git a/themes/default/js/rating.js b/themes/default/js/rating.js
new file mode 100644
index 000000000..9b8370e93
--- /dev/null
+++ b/themes/default/js/rating.js
@@ -0,0 +1,100 @@
+var gRatingOptions, gRatingButtons, gUserRating;
+
+function makeNiceRatingForm(options)
+{
+ gRatingOptions = options || {};
+ var form = document.getElementById('rateForm');
+ if (!form) return; //? template changed
+
+ gRatingButtons = form.getElementsByTagName('input');
+ gUserRating = "";
+ for (var i=0; i<gRatingButtons.length; i++)
+ {
+ if ( gRatingButtons[i].type=="button" )
+ {
+ gUserRating = gRatingButtons[i].value;
+ break;
+ }
+ }
+
+ for (var i=0; i<gRatingButtons.length; i++)
+ {
+ var rateButton = gRatingButtons[i];
+ rateButton.initialRateValue = rateButton.value; // save it as a property
+ try { rateButton.type = "button"; } catch (e){}// avoid normal submit (use ajax); not working in IE6
+
+ if (navigator.userAgent.indexOf('AppleWebKit/')==-1 && navigator.userAgent.indexOf('MSIE 8')==-1) rateButton.value = ""; //hide the text IE<8/Opera - breaks safari
+ with (rateButton.style)
+ {
+ textIndent = "-50px"; //hide the text FF
+ marginLeft = marginRight = 0;
+ }
+
+ if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
+ rateButton.parentNode.removeChild(rateButton.nextSibling);
+ if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
+ rateButton.parentNode.removeChild(rateButton.previousSibling);
+
+ if(window.addEventListener){ // Mozilla, Netscape, Firefox
+ rateButton.addEventListener("click", updateRating, false );
+ rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
+ rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
+ }
+ else if(window.attachEvent) { // IE
+ rateButton.attachEvent("onclick", updateRating);
+ rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
+ rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
+ }
+ }
+ resetRatingStarDisplay();
+}
+
+function resetRatingStarDisplay()
+{
+ updateRatingStarDisplay( gUserRating );
+}
+
+function updateRatingStarDisplay(userRating)
+{
+ for (var i=0; i<gRatingButtons.length; i++)
+ gRatingButtons[i].className = (userRating!=="" && userRating>=gRatingButtons[i].initialRateValue ) ? "rateButtonStarFull" : "rateButtonStarEmpty";
+}
+
+function updateRatingStarDisplayEvt(e)
+{
+ updateRatingStarDisplay(
+ e.target ? e.target.initialRateValue : e.srcElement.initialRateValue);
+}
+
+function updateRating(e)
+{
+ var rateButton = e.target || e.srcElement;
+ if (rateButton.initialRateValue == gUserRating)
+ return false; //nothing to do
+
+ for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=true;
+ var y = new PwgWS(gRatingOptions.rootUrl);
+ y.callService(
+ "pwg.images.rate", {image_id: gRatingOptions.image_id, rate: rateButton.initialRateValue } ,
+ {
+ onFailure: function(num, text) {
+ alert(num + " " + text);
+ document.location = rateButton.form.action + "&rate="+rateButton.initialRateValue;
+ },
+ onSuccess: function(result) {
+ gUserRating = rateButton.initialRateValue;
+ for (var i=0; i<gRatingButtons.length; i++) gRatingButtons[i].disabled=false;
+ if (gRatingOptions.updateRateElement) gRatingOptions.updateRateElement.innerHTML = gRatingOptions.updateRateText;
+ if (gRatingOptions.ratingSummaryElement)
+ {
+ var t = gRatingOptions.ratingSummaryText;
+ var args =[result.average, result.count, result.stdev], idx = 0, rexp = new RegExp( /%\.?\d*[sdf]/ );
+ _xxx = t.match( rexp );
+ while (idx<args.length) t=t.replace(rexp, args[idx++]);
+ gRatingOptions.ratingSummaryElement.innerHTML = t;
+ }
+ }
+ }
+ );
+ return false;
+} \ No newline at end of file
diff --git a/themes/default/js/scripts.js b/themes/default/js/scripts.js
new file mode 100644
index 000000000..d4595435b
--- /dev/null
+++ b/themes/default/js/scripts.js
@@ -0,0 +1,188 @@
+function SelectAll( formulaire )
+{
+var len = formulaire.elements.length;
+var i=0;
+for( i = 0; i < len; i++)
+{
+ if ( formulaire.elements[i].type=='checkbox'
+ && formulaire.elements[i].name != 'copie')
+ {
+ formulaire.elements[i].checked = true;
+ }
+}
+}
+
+function DeselectAll( formulaire )
+{
+var len = formulaire.elements.length;
+var i=0;
+for( i = 0; i < len; i++)
+{
+ if ( formulaire.elements[i].type=='checkbox'
+ && formulaire.elements[i].name != 'copie')
+ {
+ formulaire.elements[i].checked = false;
+ }
+}
+}
+
+function Inverser( formulaire )
+{
+var len = formulaire.elements.length;
+var i=0;
+for( i=0; i<len; i++)
+{
+ if ( formulaire.elements[i].type=='checkbox'
+ && formulaire.elements[i].name != 'copie')
+ {
+ formulaire.elements[i].checked = !formulaire.elements[i].checked;
+ }
+}
+}
+
+function phpWGOpenWindow(theURL,winName,features)
+{
+ img = new Image();
+ img.src = theURL;
+ if (img.complete)
+ {
+ var width=img.width +40;
+ var height=img.height +40;
+ }
+ else
+ {
+ var width=640;
+ var height=480;
+ img.onload = resizeWindowToFit;
+ }
+ newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height);
+}
+
+function resizeWindowToFit()
+{
+ newWin.resizeTo( img.width+50, img.height+100);
+}
+
+function popuphelp(url)
+{
+ window.open( url, 'dc_popup',
+ 'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
+ );
+}
+
+
+
+Function.prototype.pwgBind = function() {
+ var __method = this, object = arguments[0], args = new Array();
+ for (var i=1; i<arguments.length; i++)
+ args[i-1] = arguments[i];
+ return function() { return __method.apply(object, args); }
+}
+
+function PwgWS(urlRoot)
+{
+ this.urlRoot = urlRoot;
+ this.options = {
+ method: "GET",
+ async: true,
+ onFailure: null,
+ onSuccess: null
+ };
+};
+
+PwgWS.prototype = {
+
+ callService : function(method, parameters, options)
+ {
+ if (options)
+ {
+ for (var property in options)
+ this.options[property] = options[property];
+ }
+ try { this.transport = new XMLHttpRequest();}
+ catch(e) {
+ try { this.transport = new ActiveXObject('Msxml2.XMLHTTP'); }
+ catch(e) {
+ try { this.transport = new ActiveXObject('Microsoft.XMLHTTP'); }
+ catch (e){
+ dispatchError(0, "Cannot create request object");
+ }
+ }
+ }
+ this.transport.onreadystatechange = this.onStateChange.pwgBind(this);
+
+ var url = this.urlRoot+"ws.php?format=json";
+
+ var body = "method="+method;
+ if (parameters)
+ {
+ for (var property in parameters)
+ {
+ if ( typeof parameters[property] == 'object' && parameters[property])
+ {
+ for (var i=0; i<parameters[property].length; i++)
+ body += "&"+property+"[]="+encodeURIComponent(parameters[property][i]);
+ }
+ else
+ body += "&"+property+"="+encodeURIComponent(parameters[property]);
+ }
+ }
+
+ if (this.options.method == "POST" )
+ {
+ this.transport.open(this.options.method, url, this.options.async);
+ this.transport.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ this.transport.send(body);
+ }
+ else
+ {
+ url += "&"+body;
+ this.transport.open(this.options.method, url, this.options.async);
+ this.transport.send(null);
+ }
+ },
+
+ onStateChange: function() {
+ var readyState = this.transport.readyState;
+ if (readyState == 4)
+ this.respondToReadyState(this.transport.readyState);
+ },
+
+ dispatchError: function( httpCode, text )
+ {
+ !this.options.onFailure || this.options.onFailure( httpCode, text);
+ },
+
+ respondToReadyState: function(readyState)
+ {
+ var transport = this.transport;
+ if (readyState==4 && transport.status == 200)
+ {
+ var resp;
+ try {
+ eval('resp = ' + transport.responseText);
+ }
+ catch (e) {
+ this.dispatchError( 200, e.message + '\n' + transport.responseText.substr(0,512) );
+ }
+ if (resp!=null)
+ {
+ if (resp.stat==null)
+ this.dispatchError( 200, "Invalid response" );
+ else if (resp.stat=='ok')
+ {
+ if (this.options.onSuccess) this.options.onSuccess( resp.result );
+ }
+ else
+ this.dispatchError( 200, resp.err + " " + resp.message);
+ }
+ }
+ if (readyState==4 && transport.status != 200)
+ this.dispatchError( transport.status, transport.statusText );
+ },
+
+
+ transport: null,
+ urlRoot: null,
+ options: {}
+}
diff --git a/themes/default/js/ui/effects.blind.js b/themes/default/js/ui/effects.blind.js
new file mode 100644
index 000000000..62d86ef14
--- /dev/null
+++ b/themes/default/js/ui/effects.blind.js
@@ -0,0 +1,49 @@
+/*
+ * jQuery UI Effects Blind 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.blind = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'vertical') ? 'height' : 'width';
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = mode == 'show' ? distance : 0;
+
+ // Animate
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.bounce.js b/themes/default/js/ui/effects.bounce.js
new file mode 100644
index 000000000..646133261
--- /dev/null
+++ b/themes/default/js/ui/effects.bounce.js
@@ -0,0 +1,78 @@
+/*
+ * jQuery UI Effects Bounce 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.bounce = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'up'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 5; // Default # of times
+ var speed = o.duration || 250; // Default speed per bounce
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+ if (mode == 'hide') distance = distance / (times * 2);
+ if (mode != 'hide') times--;
+
+ // Animate
+ if (mode == 'show') { // Show Bounce
+ var animation = {opacity: 1};
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation, speed / 2, o.options.easing);
+ distance = distance / 2;
+ times--;
+ };
+ for (var i = 0; i < times; i++) { // Bounces
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
+ };
+ if (mode == 'hide') { // Last Bounce
+ var animation = {opacity: 0};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ el.animate(animation, speed / 2, o.options.easing, function(){
+ el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ } else {
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ };
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.clip.js b/themes/default/js/ui/effects.clip.js
new file mode 100644
index 000000000..1775f8359
--- /dev/null
+++ b/themes/default/js/ui/effects.clip.js
@@ -0,0 +1,54 @@
+/*
+ * jQuery UI Effects Clip 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.clip = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','height','width'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
+ var ref = {
+ size: (direction == 'vertical') ? 'height' : 'width',
+ position: (direction == 'vertical') ? 'top' : 'left'
+ };
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref.size] = mode == 'show' ? distance : 0;
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
+
+ // Animate
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.core.js b/themes/default/js/ui/effects.core.js
new file mode 100644
index 000000000..efd0d50b0
--- /dev/null
+++ b/themes/default/js/ui/effects.core.js
@@ -0,0 +1,545 @@
+/*
+ * jQuery UI Effects 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+;jQuery.effects || (function($) {
+
+$.effects = {
+ version: "1.7.2",
+
+ // Saves a set of properties in a data storage
+ save: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
+ }
+ },
+
+ setMode: function(el, mode) {
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
+ return mode;
+ },
+
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ var y, x;
+ switch (origin[0]) {
+ case 'top': y = 0; break;
+ case 'middle': y = 0.5; break;
+ case 'bottom': y = 1; break;
+ default: y = origin[0] / original.height;
+ };
+ switch (origin[1]) {
+ case 'left': x = 0; break;
+ case 'center': x = 0.5; break;
+ case 'right': x = 1; break;
+ default: x = origin[1] / original.width;
+ };
+ return {x: x, y: y};
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function(element) {
+
+ //if the element is already wrapped, return it
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent();
+
+ //Cache width,height and float properties of the element, and create a wrapper around it
+ var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') };
+ element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
+ var wrapper = element.parent();
+
+ //Transfer the positioning of the element to the wrapper
+ if (element.css('position') == 'static') {
+ wrapper.css({ position: 'relative' });
+ element.css({ position: 'relative'} );
+ } else {
+ var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto';
+ var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto';
+ wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show();
+ element.css({position: 'relative', top: 0, left: 0 });
+ }
+
+ wrapper.css(props);
+ return wrapper;
+ },
+
+ removeWrapper: function(element) {
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent().replaceWith(element);
+ return element;
+ },
+
+ setTransition: function(element, list, factor, value) {
+ value = value || {};
+ $.each(list, function(i, x){
+ unit = element.cssUnit(x);
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
+ });
+ return value;
+ },
+
+ //Base function to animate from one class to another in a seamless transition
+ animateClass: function(value, duration, easing, callback) {
+
+ var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
+ var ea = (typeof easing == "string" ? easing : null);
+
+ return this.each(function() {
+
+ var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
+ if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
+ if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
+
+ //Let's get a style offset
+ var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
+ var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
+
+ // The main function to form the object for animation
+ for(var n in newStyle) {
+ if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
+ && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
+ && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
+ && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
+ && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
+ ) offset[n] = newStyle[n];
+ }
+
+ that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
+ // Change style attribute back to original. For stupid IE, we need to clear the damn object.
+ if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
+ if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
+ if(cb) cb.apply(this, arguments);
+ });
+
+ });
+ }
+};
+
+
+function _normalizeArguments(a, m) {
+
+ var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
+ var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
+ speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
+ var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
+
+ return [a[0], o, speed, callback];
+
+}
+
+//Extend the methods of jQuery
+$.fn.extend({
+
+ //Save old methods
+ _show: $.fn.show,
+ _hide: $.fn.hide,
+ __toggle: $.fn.toggle,
+ _addClass: $.fn.addClass,
+ _removeClass: $.fn.removeClass,
+ _toggleClass: $.fn.toggleClass,
+
+ // New effect methods
+ effect: function(fx, options, speed, callback) {
+ return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
+ },
+
+ show: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._show.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'show'));
+ }
+ },
+
+ hide: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._hide.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'hide'));
+ }
+ },
+
+ toggle: function(){
+ if(!arguments[0] ||
+ (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) ||
+ ($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) {
+ return this.__toggle.apply(this, arguments);
+ } else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
+ }
+ },
+
+ addClass: function(classNames, speed, easing, callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
+ },
+ removeClass: function(classNames,speed,easing,callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
+ },
+ toggleClass: function(classNames,speed,easing,callback) {
+ return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed);
+ },
+ morph: function(remove,add,speed,easing,callback) {
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
+ },
+ switchClass: function() {
+ return this.morph.apply(this, arguments);
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css(key), val = [];
+ $.each( ['em','px','%','pt'], function(i, unit){
+ if(style.indexOf(unit) > 0)
+ val = [parseFloat(style), unit];
+ });
+ return val;
+ }
+});
+
+/*
+ * jQuery Color Animations
+ * Copyright 2007 John Resig
+ * Released under the MIT and GPL licenses.
+ */
+
+// We override the animation for all of these color styles
+$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
+ $.fx.step[attr] = function(fx) {
+ if ( fx.state == 0 ) {
+ fx.start = getColor( fx.elem, attr );
+ fx.end = getRGB( fx.end );
+ }
+
+ fx.elem.style[attr] = "rgb(" + [
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
+ ].join(",") + ")";
+ };
+});
+
+// Color Conversion functions from highlightFade
+// By Blair Mitchelmore
+// http://jquery.offput.ca/highlightFade/
+
+// Parse strings looking for color tuples [255,255,255]
+function getRGB(color) {
+ var result;
+
+ // Check if we're already dealing with an array of colors
+ if ( color && color.constructor == Array && color.length == 3 )
+ return color;
+
+ // Look for rgb(num,num,num)
+ if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
+
+ // Look for rgb(num%,num%,num%)
+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
+ return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
+
+ // Look for #a0b1c2
+ if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
+ return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
+
+ // Look for #fff
+ if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
+ return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
+
+ // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
+ if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
+ return colors['transparent'];
+
+ // Otherwise, we're most likely dealing with a named color
+ return colors[$.trim(color).toLowerCase()];
+}
+
+function getColor(elem, attr) {
+ var color;
+
+ do {
+ color = $.curCSS(elem, attr);
+
+ // Keep going until we find an element that has color, or we hit the body
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
+ break;
+
+ attr = "backgroundColor";
+ } while ( elem = elem.parentNode );
+
+ return getRGB(color);
+};
+
+// Some named colors to work with
+// From Interface by Stefan Petre
+// http://interface.eyecon.ro/
+
+var colors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0],
+ transparent: [255,255,255]
+};
+
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+$.easing.jswing = $.easing.swing;
+
+$.extend($.easing,
+{
+ def: 'easeOutQuad',
+ swing: function (x, t, b, c, d) {
+ //alert($.easing.default);
+ return $.easing[$.easing.def](x, t, b, c, d);
+ },
+ easeInQuad: function (x, t, b, c, d) {
+ return c*(t/=d)*t + b;
+ },
+ easeOutQuad: function (x, t, b, c, d) {
+ return -c *(t/=d)*(t-2) + b;
+ },
+ easeInOutQuad: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t + b;
+ return -c/2 * ((--t)*(t-2) - 1) + b;
+ },
+ easeInCubic: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t + b;
+ },
+ easeOutCubic: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t + 1) + b;
+ },
+ easeInOutCubic: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
+ return c/2*((t-=2)*t*t + 2) + b;
+ },
+ easeInQuart: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t + b;
+ },
+ easeOutQuart: function (x, t, b, c, d) {
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
+ },
+ easeInOutQuart: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
+ },
+ easeInQuint: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t*t + b;
+ },
+ easeOutQuint: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
+ },
+ easeInOutQuint: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
+ },
+ easeInSine: function (x, t, b, c, d) {
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+ },
+ easeOutSine: function (x, t, b, c, d) {
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
+ },
+ easeInOutSine: function (x, t, b, c, d) {
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+ },
+ easeInExpo: function (x, t, b, c, d) {
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+ },
+ easeOutExpo: function (x, t, b, c, d) {
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+ },
+ easeInOutExpo: function (x, t, b, c, d) {
+ if (t==0) return b;
+ if (t==d) return b+c;
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+ },
+ easeInCirc: function (x, t, b, c, d) {
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+ },
+ easeOutCirc: function (x, t, b, c, d) {
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+ },
+ easeInOutCirc: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+ },
+ easeInElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ },
+ easeOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+ },
+ easeInOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+ },
+ easeInBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*(t/=d)*t*((s+1)*t - s) + b;
+ },
+ easeOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+ },
+ easeInOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+ },
+ easeInBounce: function (x, t, b, c, d) {
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ },
+ easeOutBounce: function (x, t, b, c, d) {
+ if ((t/=d) < (1/2.75)) {
+ return c*(7.5625*t*t) + b;
+ } else if (t < (2/2.75)) {
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+ } else if (t < (2.5/2.75)) {
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+ } else {
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+ }
+ },
+ easeInOutBounce: function (x, t, b, c, d) {
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ }
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.drop.js b/themes/default/js/ui/effects.drop.js
new file mode 100644
index 000000000..604ac8d8b
--- /dev/null
+++ b/themes/default/js/ui/effects.drop.js
@@ -0,0 +1,50 @@
+/*
+ * jQuery UI Effects Drop 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.drop = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','opacity'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+
+ // Animation
+ var animation = {opacity: mode == 'show' ? 1 : 0};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.explode.js b/themes/default/js/ui/effects.explode.js
new file mode 100644
index 000000000..31efd2f54
--- /dev/null
+++ b/themes/default/js/ui/effects.explode.js
@@ -0,0 +1,79 @@
+/*
+ * jQuery UI Effects Explode 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.explode = function(o) {
+
+ return this.queue(function() {
+
+ var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+ var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+
+ o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
+ var el = $(this).show().css('visibility', 'hidden');
+ var offset = el.offset();
+
+ //Substract the margins - not fixing the problem yet.
+ offset.top -= parseInt(el.css("marginTop"),10) || 0;
+ offset.left -= parseInt(el.css("marginLeft"),10) || 0;
+
+ var width = el.outerWidth(true);
+ var height = el.outerHeight(true);
+
+ for(var i=0;i<rows;i++) { // =
+ for(var j=0;j<cells;j++) { // ||
+ el
+ .clone()
+ .appendTo('body')
+ .wrap('<div></div>')
+ .css({
+ position: 'absolute',
+ visibility: 'visible',
+ left: -j*(width/cells),
+ top: -i*(height/rows)
+ })
+ .parent()
+ .addClass('ui-effects-explode')
+ .css({
+ position: 'absolute',
+ overflow: 'hidden',
+ width: width/cells,
+ height: height/rows,
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
+ opacity: o.options.mode == 'show' ? 0 : 1
+ }).animate({
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
+ opacity: o.options.mode == 'show' ? 1 : 0
+ }, o.duration || 500);
+ }
+ }
+
+ // Set a timeout, to call the callback approx. when the other animations have finished
+ setTimeout(function() {
+
+ o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
+ if(o.callback) o.callback.apply(el[0]); // Callback
+ el.dequeue();
+
+ $('div.ui-effects-explode').remove();
+
+ }, o.duration || 500);
+
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.fold.js b/themes/default/js/ui/effects.fold.js
new file mode 100644
index 000000000..5ed1188f6
--- /dev/null
+++ b/themes/default/js/ui/effects.fold.js
@@ -0,0 +1,56 @@
+/*
+ * jQuery UI Effects Fold 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.fold = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var size = o.options.size || 15; // Default fold size
+ var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var widthFirst = ((mode == 'show') != horizFirst);
+ var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
+ var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
+ var percent = /([0-9]+)%/.exec(size);
+ if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
+ if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
+
+ // Animation
+ var animation1 = {}, animation2 = {};
+ animation1[ref[0]] = mode == 'show' ? distance[0] : size;
+ animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
+
+ // Animate
+ wrapper.animate(animation1, duration, o.options.easing)
+ .animate(animation2, duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.highlight.js b/themes/default/js/ui/effects.highlight.js
new file mode 100644
index 000000000..828d059ab
--- /dev/null
+++ b/themes/default/js/ui/effects.highlight.js
@@ -0,0 +1,48 @@
+/*
+ * jQuery UI Effects Highlight 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.highlight = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var color = o.options.color || "#ffff99"; // Default highlight color
+ var oldColor = el.css("backgroundColor");
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
+
+ // Animation
+ var animation = {backgroundColor: oldColor };
+ if (mode == "hide") animation['opacity'] = 0;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == "hide") el.hide();
+ $.effects.restore(el, props);
+ if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter');
+ if(o.callback) o.callback.apply(this, arguments);
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.pulsate.js b/themes/default/js/ui/effects.pulsate.js
new file mode 100644
index 000000000..6459d1868
--- /dev/null
+++ b/themes/default/js/ui/effects.pulsate.js
@@ -0,0 +1,56 @@
+/*
+ * jQuery UI Effects Pulsate 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.pulsate = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var times = o.options.times || 5; // Default # of times
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
+ // Adjust
+ if (mode == 'hide') times--;
+ if (el.is(':hidden')) { // Show fadeIn
+ el.css('opacity', 0);
+ el.show(); // Show
+ el.animate({opacity: 1}, duration, o.options.easing);
+ times = times-2;
+ }
+
+ // Animate
+ for (var i = 0; i < times; i++) { // Pulsate
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing);
+ };
+ if (mode == 'hide') { // Last Pulse
+ el.animate({opacity: 0}, duration, o.options.easing, function(){
+ el.hide(); // Hide
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ } else {
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing, function(){
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ };
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.scale.js b/themes/default/js/ui/effects.scale.js
new file mode 100644
index 000000000..ec15cf853
--- /dev/null
+++ b/themes/default/js/ui/effects.scale.js
@@ -0,0 +1,180 @@
+/*
+ * jQuery UI Effects Scale 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.puff = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var options = $.extend(true, {}, o.options);
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var percent = parseInt(o.options.percent,10) || 150; // Set default puff percent
+ options.fade = true; // It's not a puff if it doesn't fade! :)
+ var original = {height: el.height(), width: el.width()}; // Save original
+
+ // Adjust
+ var factor = percent / 100;
+ el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor};
+
+ // Animation
+ options.from = el.from;
+ options.percent = (mode == 'hide') ? percent : 100;
+ options.mode = mode;
+
+ // Animate
+ el.effect('scale', options, o.duration, o.callback);
+ el.dequeue();
+ });
+
+};
+
+$.effects.scale = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var options = $.extend(true, {}, o.options);
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
+ var direction = o.options.direction || 'both'; // Set default axis
+ var origin = o.options.origin; // The origin of the scaling
+ if (mode != 'effect') { // Set default origin and restore for show/hide
+ options.origin = origin || ['middle','center'];
+ options.restore = true;
+ }
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
+
+ // Adjust
+ var factor = { // Set scaling factor
+ y: direction != 'horizontal' ? (percent / 100) : 1,
+ x: direction != 'vertical' ? (percent / 100) : 1
+ };
+ el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
+
+ if (o.options.fade) { // Fade option to support puff
+ if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
+ if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
+ };
+
+ // Animation
+ options.from = el.from; options.to = el.to; options.mode = mode;
+
+ // Animate
+ el.effect('size', options, o.duration, o.callback);
+ el.dequeue();
+ });
+
+};
+
+$.effects.size = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
+ var props1 = ['position','top','left','overflow','opacity']; // Always restore
+ var props2 = ['width','height','overflow']; // Copy for children
+ var cProps = ['fontSize'];
+ var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
+ var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var restore = o.options.restore || false; // Default restore
+ var scale = o.options.scale || 'both'; // Default scale mode
+ var origin = o.options.origin; // The origin of the sizing
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || original; // Default from state
+ el.to = o.options.to || original; // Default to state
+ // Adjust
+ if (origin) { // Calculate baseline shifts
+ var baseline = $.effects.getBaseline(origin, original);
+ el.from.top = (original.height - el.from.height) * baseline.y;
+ el.from.left = (original.width - el.from.width) * baseline.x;
+ el.to.top = (original.height - el.to.height) * baseline.y;
+ el.to.left = (original.width - el.to.width) * baseline.x;
+ };
+ var factor = { // Set scaling factor
+ from: {y: el.from.height / original.height, x: el.from.width / original.width},
+ to: {y: el.to.height / original.height, x: el.to.width / original.width}
+ };
+ if (scale == 'box' || scale == 'both') { // Scale the css box
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(vProps);
+ el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ props = props.concat(hProps);
+ el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
+ el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
+ };
+ };
+ if (scale == 'content' || scale == 'both') { // Scale the content
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(cProps);
+ el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
+ };
+ };
+ $.effects.save(el, restore ? props : props1); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ el.css('overflow','hidden').css(el.from); // Shift
+
+ // Animate
+ if (scale == 'content' || scale == 'both') { // Scale the children
+ vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
+ hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
+ props2 = props.concat(vProps).concat(hProps); // Concat
+ el.find("*[width]").each(function(){
+ child = $(this);
+ if (restore) $.effects.save(child, props2);
+ var c_original = {height: child.height(), width: child.width()}; // Save original
+ child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
+ child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
+ child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
+ child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
+ };
+ child.css(child.from); // Shift children
+ child.animate(child.to, o.duration, o.options.easing, function(){
+ if (restore) $.effects.restore(child, props2); // Restore children
+ }); // Animate children
+ });
+ };
+
+ // Animate
+ el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.shake.js b/themes/default/js/ui/effects.shake.js
new file mode 100644
index 000000000..dc9f59710
--- /dev/null
+++ b/themes/default/js/ui/effects.shake.js
@@ -0,0 +1,57 @@
+/*
+ * jQuery UI Effects Shake 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.shake = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 3; // Default # of times
+ var speed = o.duration || o.options.duration || 140; // Default speed per shake
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+
+ // Animation
+ var animation = {}, animation1 = {}, animation2 = {};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
+ animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
+
+ // Animate
+ el.animate(animation, speed, o.options.easing);
+ for (var i = 1; i < times; i++) { // Shakes
+ el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
+ };
+ el.animate(animation1, speed, o.options.easing).
+ animate(animation, speed / 2, o.options.easing, function(){ // Last shake
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.slide.js b/themes/default/js/ui/effects.slide.js
new file mode 100644
index 000000000..350f599e9
--- /dev/null
+++ b/themes/default/js/ui/effects.slide.js
@@ -0,0 +1,50 @@
+/*
+ * jQuery UI Effects Slide 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.slide = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
+ if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.transfer.js b/themes/default/js/ui/effects.transfer.js
new file mode 100644
index 000000000..82bab6d89
--- /dev/null
+++ b/themes/default/js/ui/effects.transfer.js
@@ -0,0 +1,45 @@
+/*
+ * jQuery UI Effects Transfer 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.transfer = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ target = $(o.options.to),
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top,
+ left: endPosition.left,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = elem.offset(),
+ transfer = $('<div class="ui-effects-transfer"></div>')
+ .appendTo(document.body)
+ .addClass(o.options.className)
+ .css({
+ top: startPosition.top,
+ left: startPosition.left,
+ height: elem.innerHeight(),
+ width: elem.innerWidth(),
+ position: 'absolute'
+ })
+ .animate(animation, o.duration, o.options.easing, function() {
+ transfer.remove();
+ (o.callback && o.callback.apply(elem[0], arguments));
+ elem.dequeue();
+ });
+ });
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ar.js b/themes/default/js/ui/i18n/ui.datepicker-ar.js
new file mode 100644
index 000000000..b60587891
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ar.js
@@ -0,0 +1,20 @@
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Al Horani -- koko.dw@gmail.com */
+/* خالد الحوراني -- koko.dw@gmail.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+ $.datepicker.regional['ar'] = {
+ closeText: 'إغلاق',
+ prevText: '&#x3c;السابق',
+ nextText: 'التالي&#x3e;',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
+ dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-bg.js b/themes/default/js/ui/i18n/ui.datepicker-bg.js
new file mode 100644
index 000000000..a73884ef2
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-bg.js
@@ -0,0 +1,20 @@
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org). */
+jQuery(function($){
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '&#x3c;назад',
+ nextText: 'напред&#x3e;',
+ nextBigText: '&#x3e;&#x3e;',
+ currentText: 'днес',
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ca.js b/themes/default/js/ui/i18n/ui.datepicker-ca.js
new file mode 100644
index 000000000..ad47af0bb
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ca.js
@@ -0,0 +1,19 @@
+/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */
+/* Writers: (joan.leon@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tancar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Seg&#x3e;',
+ currentText: 'Avui',
+ monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
+ 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Oct','Nov','Des'],
+ dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
+ dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
+ dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
+ dateFormat: 'mm/dd/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-cs.js b/themes/default/js/ui/i18n/ui.datepicker-cs.js
new file mode 100644
index 000000000..334ae2f46
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-cs.js
@@ -0,0 +1,19 @@
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas@tomas-muller.net). */
+jQuery(function($){
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '&#x3c;Dříve',
+ nextText: 'Později&#x3e;',
+ currentText: 'Nyní',
+ monthNames: ['leden','únor','březen','duben','květen','červen',
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+ 'čvc','srp','zář','říj','lis','pro'],
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-da.js b/themes/default/js/ui/i18n/ui.datepicker-da.js
new file mode 100644
index 000000000..8ad1e2cc3
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-da.js
@@ -0,0 +1,19 @@
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '&#x3c;Forrige',
+ nextText: 'Næste&#x3e;',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ 'Juli','August','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ dateFormat: 'dd-mm-yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-de.js b/themes/default/js/ui/i18n/ui.datepicker-de.js
new file mode 100644
index 000000000..f9299c815
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-de.js
@@ -0,0 +1,19 @@
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail@milianw.de). */
+jQuery(function($){
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '&#x3c;zurück',
+ nextText: 'Vor&#x3e;',
+ currentText: 'heute',
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['de']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-es.js b/themes/default/js/ui/i18n/ui.datepicker-es.js
new file mode 100644
index 000000000..0a699afe7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-es.js
@@ -0,0 +1,19 @@
+/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Sig&#x3e;',
+ currentText: 'Hoy',
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['es']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-fi.js b/themes/default/js/ui/i18n/ui.datepicker-fi.js
new file mode 100644
index 000000000..3a0943fd7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-fi.js
@@ -0,0 +1,19 @@
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['fi'] = {
+ closeText: 'Sulje',
+ prevText: '&laquo;Edellinen',
+ nextText: 'Seuraava&raquo;',
+ currentText: 'T&auml;n&auml;&auml;n',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&auml;kuu',
+ 'Hein&auml;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&auml;',
+ 'Hein&auml;','Elo','Syys','Loka','Marras','Joulu'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-fr.js b/themes/default/js/ui/i18n/ui.datepicker-fr.js
new file mode 100644
index 000000000..02edda29d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-fr.js
@@ -0,0 +1,19 @@
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+jQuery(function($){
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: '&#x3c;Préc',
+ nextText: 'Suiv&#x3e;',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-he.js b/themes/default/js/ui/i18n/ui.datepicker-he.js
new file mode 100644
index 000000000..38e0a03e2
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-he.js
@@ -0,0 +1,19 @@
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '&#x3c;הקודם',
+ nextText: 'הבא&#x3e;',
+ currentText: 'היום',
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+ monthNamesShort: ['1','2','3','4','5','6',
+ '7','8','9','10','11','12'],
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-hu.js b/themes/default/js/ui/i18n/ui.datepicker-hu.js
new file mode 100644
index 000000000..ee102acd0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-hu.js
@@ -0,0 +1,19 @@
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
+jQuery(function($){
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezárás',
+ prevText: '&laquo;&nbsp;vissza',
+ nextText: 'előre&nbsp;&raquo;',
+ currentText: 'ma',
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+ dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-hy.js b/themes/default/js/ui/i18n/ui.datepicker-hy.js
new file mode 100644
index 000000000..1ffbeaae0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-hy.js
@@ -0,0 +1,19 @@
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
+jQuery(function($){
+ $.datepicker.regional['hy'] = {
+ closeText: 'Փակել',
+ prevText: '&#x3c;Նախ.',
+ nextText: 'Հաջ.&#x3e;',
+ currentText: 'Այսօր',
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-id.js b/themes/default/js/ui/i18n/ui.datepicker-id.js
new file mode 100644
index 000000000..e5246c85d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-id.js
@@ -0,0 +1,19 @@
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '&#x3c;mundur',
+ nextText: 'maju&#x3e;',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['id']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-is.js b/themes/default/js/ui/i18n/ui.datepicker-is.js
new file mode 100644
index 000000000..68c1a07d4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-is.js
@@ -0,0 +1,19 @@
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur@eskill.is). */
+jQuery(function($){
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '&#x3c; Fyrri',
+ nextText: 'N&aelig;sti &#x3e;',
+ currentText: '&Iacute; dag',
+ monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
+ 'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
+ 'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
+ dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
+ dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
+ dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['is']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-it.js b/themes/default/js/ui/i18n/ui.datepicker-it.js
new file mode 100644
index 000000000..f3e691e5e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-it.js
@@ -0,0 +1,19 @@
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Apaella (apaella@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '&#x3c;Prec',
+ nextText: 'Succ&#x3e;',
+ currentText: 'Oggi',
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
+ dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+ dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['it']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ja.js b/themes/default/js/ui/i18n/ui.datepicker-ja.js
new file mode 100644
index 000000000..a6a5f45ce
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ja.js
@@ -0,0 +1,20 @@
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (kentaro@ranvis.com). */
+jQuery(function($){
+ $.datepicker.regional['ja'] = {
+ closeText: '閉じる',
+ prevText: '&#x3c;前',
+ nextText: '次&#x3e;',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['日','月','火','水','木','金','土'],
+ dayNamesMin: ['日','月','火','水','木','金','土'],
+ dateFormat: 'yy/mm/dd', firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true};
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ko.js b/themes/default/js/ui/i18n/ui.datepicker-ko.js
new file mode 100644
index 000000000..53ede9142
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ko.js
@@ -0,0 +1,19 @@
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: '이전달',
+ nextText: '다음달',
+ currentText: '오늘',
+ monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+ '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+ monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+ '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+ dayNames: ['일','월','화','수','목','금','토'],
+ dayNamesShort: ['일','월','화','수','목','금','토'],
+ dayNamesMin: ['일','월','화','수','목','금','토'],
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-lt.js b/themes/default/js/ui/i18n/ui.datepicker-lt.js
new file mode 100644
index 000000000..a8a6aa1a4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-lt.js
@@ -0,0 +1,19 @@
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas@avalon.lt> */
+jQuery(function($){
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '&#x3c;Atgal',
+ nextText: 'Pirmyn&#x3e;',
+ currentText: 'Šiandien',
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-lv.js b/themes/default/js/ui/i18n/ui.datepicker-lv.js
new file mode 100644
index 000000000..12c32f83c
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-lv.js
@@ -0,0 +1,19 @@
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
+jQuery(function($){
+ $.datepicker.regional['lv'] = {
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'Nāka',
+ currentText: 'Šodien',
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+ dateFormat: 'dd-mm-yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-nl.js b/themes/default/js/ui/i18n/ui.datepicker-nl.js
new file mode 100644
index 000000000..938dc5ef6
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-nl.js
@@ -0,0 +1,19 @@
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
+jQuery(function($){
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-no.js b/themes/default/js/ui/i18n/ui.datepicker-no.js
new file mode 100644
index 000000000..d81f6bb2e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-no.js
@@ -0,0 +1,19 @@
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '&laquo;Forrige',
+ nextText: 'Neste&raquo;',
+ currentText: 'I dag',
+ monthNames: ['Januar','Februar','Mars','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['no']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-pl.js b/themes/default/js/ui/i18n/ui.datepicker-pl.js
new file mode 100644
index 000000000..0ce38bea8
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-pl.js
@@ -0,0 +1,19 @@
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '&#x3c;Poprzedni',
+ nextText: 'Następny&#x3e;',
+ currentText: 'Dziś',
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
+ dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js b/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js
new file mode 100644
index 000000000..e3ac652b3
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js
@@ -0,0 +1,19 @@
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '&#x3c;Anterior',
+ nextText: 'Pr&oacute;ximo&#x3e;',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ro.js b/themes/default/js/ui/i18n/ui.datepicker-ro.js
new file mode 100644
index 000000000..ec4033cc7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ro.js
@@ -0,0 +1,22 @@
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_edmond@walla.com)
+ * and Ionut G. Stan (ionut.g.stan@gmail.com)
+ */
+jQuery(function($){
+ $.datepicker.regional['ro'] = {
+ closeText: 'Închide',
+ prevText: '&laquo; Luna precedentă',
+ nextText: 'Luna următoare &raquo;',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ dateFormat: 'dd MM yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ru.js b/themes/default/js/ui/i18n/ui.datepicker-ru.js
new file mode 100644
index 000000000..62752c7f5
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ru.js
@@ -0,0 +1,19 @@
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '&#x3c;Пред',
+ nextText: 'След&#x3e;',
+ currentText: 'Сегодня',
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-sk.js b/themes/default/js/ui/i18n/ui.datepicker-sk.js
new file mode 100644
index 000000000..a023ffa77
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-sk.js
@@ -0,0 +1,19 @@
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto@hmm.sk). */
+jQuery(function($){
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '&#x3c;Predchádzajúci',
+ nextText: 'Nasledujúci&#x3e;',
+ currentText: 'Dnes',
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+ 'Júl','August','September','Október','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+ dateFormat: 'dd.mm.yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-sv.js b/themes/default/js/ui/i18n/ui.datepicker-sv.js
new file mode 100644
index 000000000..47c4b24e4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-sv.js
@@ -0,0 +1,19 @@
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders@nomadiz.se). */
+jQuery(function($){
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '&laquo;Förra',
+ nextText: 'Nästa&raquo;',
+ currentText: 'Idag',
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
+ 'Juli','Augusti','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-th.js b/themes/default/js/ui/i18n/ui.datepicker-th.js
new file mode 100644
index 000000000..3c2a02b5e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-th.js
@@ -0,0 +1,19 @@
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo@sixhead.com). */
+jQuery(function($){
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '&laquo;&nbsp;ย้อน',
+ nextText: 'ถัดไป&nbsp;&raquo;',
+ currentText: 'วันนี้',
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+ 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['th']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-tr.js b/themes/default/js/ui/i18n/ui.datepicker-tr.js
new file mode 100644
index 000000000..5817b2ac0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-tr.js
@@ -0,0 +1,19 @@
+/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
+jQuery(function($){
+ $.datepicker.regional['tr'] = {
+ closeText: 'kapat',
+ prevText: '&#x3c;geri',
+ nextText: 'ileri&#x3e',
+ currentText: 'bugün',
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-uk.js b/themes/default/js/ui/i18n/ui.datepicker-uk.js
new file mode 100644
index 000000000..1043d7cd8
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-uk.js
@@ -0,0 +1,25 @@
+/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['uk'] = {
+ clearText: 'Очистити', clearStatus: '',
+ closeText: 'Закрити', closeStatus: '',
+ prevText: '&#x3c;', prevStatus: '',
+ prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+ nextText: '&#x3e;', nextStatus: '',
+ nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+ currentText: 'Сьогодні', currentStatus: '',
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
+ monthStatus: '', yearStatus: '',
+ weekHeader: 'Не', weekStatus: '',
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+ dayStatus: 'DD', dateStatus: 'D, M d',
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ initStatus: '', isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js b/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js
new file mode 100644
index 000000000..e3a69dc6d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js
@@ -0,0 +1,19 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['zh-CN'] = {
+ closeText: '关闭',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一','二','三','四','五','六',
+ '七','八','九','十','十一','十二'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js b/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js
new file mode 100644
index 000000000..9cb49b72b
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js
@@ -0,0 +1,19 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['zh-TW'] = {
+ closeText: '關閉',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一','二','三','四','五','六',
+ '七','八','九','十','十一','十二'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ dateFormat: 'yy/mm/dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
+});
diff --git a/themes/default/js/ui/jquery.ui.all.js b/themes/default/js/ui/jquery.ui.all.js
new file mode 100644
index 000000000..cf19f30a9
--- /dev/null
+++ b/themes/default/js/ui/jquery.ui.all.js
@@ -0,0 +1,298 @@
+/*
+ * jQuery UI 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
+ * jQuery UI Draggable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
+ * jQuery UI Droppable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ */
+(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
+ * jQuery UI Resizable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
+ * jQuery UI Selectable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
+ * jQuery UI Sortable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
+ * jQuery UI Accordion 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
+ * jQuery UI Dialog 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
+ */
+(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*
+ * jQuery UI Slider 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
+ * jQuery UI Tabs 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
+ * jQuery UI Datepicker 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/*
+ * jQuery UI Progressbar 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/*
+ * jQuery UI Effects 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
+ * jQuery UI Effects Blind 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Bounce 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Clip 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Drop 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Explode 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
+ * jQuery UI Effects Fold 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Highlight 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Pulsate 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Scale 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Shake 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Slide 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Transfer 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.blind.min.js b/themes/default/js/ui/minified/effects.blind.min.js
new file mode 100644
index 000000000..42694154e
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.blind.min.js
@@ -0,0 +1 @@
+(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="vertical")?"height":"width";var distance=(direction=="vertical")?wrapper.height():wrapper.width();if(mode=="show"){wrapper.css(ref,0)}var animation={};animation[ref]=mode=="show"?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.bounce.min.js b/themes/default/js/ui/minified/effects.bounce.min.js
new file mode 100644
index 000000000..083aefff2
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.bounce.min.js
@@ -0,0 +1 @@
+(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"up";var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode)){props.push("opacity")}$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}if(mode=="hide"){distance=distance/(times*2)}if(mode!="hide"){times--}if(mode=="show"){var animation={opacity:1};animation[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--}for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=="hide")?distance*2:distance/2}if(mode=="hide"){var animation={opacity:0};animation[ref]=(motion=="pos"?"-=":"+=")+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}else{var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.clip.min.js b/themes/default/js/ui/minified/effects.clip.min.js
new file mode 100644
index 000000000..3ee699912
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.clip.min.js
@@ -0,0 +1 @@
+(function($){$.effects.clip=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","height","width"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var animate=el[0].tagName=="IMG"?wrapper:el;var ref={size:(direction=="vertical")?"height":"width",position:(direction=="vertical")?"top":"left"};var distance=(direction=="vertical")?animate.height():animate.width();if(mode=="show"){animate.css(ref.size,0);animate.css(ref.position,distance/2)}var animation={};animation[ref.size]=mode=="show"?distance:0;animation[ref.position]=mode=="show"?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.core.min.js b/themes/default/js/ui/minified/effects.core.min.js
new file mode 100644
index 000000000..4b6203057
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.core.min.js
@@ -0,0 +1 @@
+jQuery.effects||(function($){$.effects={version:"1.7.2",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data("ec.storage."+set[i],element[0].style[set[i]])}}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.css(set[i],element.data("ec.storage."+set[i]))}}},setMode:function(el,mode){if(mode=="toggle"){mode=el.is(":hidden")?"show":"hide"}return mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent()}var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css("position")=="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{var top=element.css("top");if(isNaN(parseInt(top,10))){top="auto"}var left=element.css("left");if(isNaN(parseInt(left,10))){left="auto"}wrapper.css({position:element.css("position"),top:top,left:left,zIndex:element.css("z-index")}).show();element.css({position:"relative",top:0,left:0})}wrapper.css(props);return wrapper},removeWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent().replaceWith(element)}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||"";if(typeof oldStyleAttr=="object"){oldStyleAttr=oldStyleAttr.cssText}if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle}var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.addClass(value.add)}if(value.remove){that.removeClass(value.remove)}var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.removeClass(value.add)}if(value.remove){that.addClass(value.remove)}for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/)))){offset[n]=newStyle[n]}}that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=="object"){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr}else{$(this).attr("style",oldStyleAttr)}if(value.add){$(this).addClass(value.add)}if(value.remove){$(this).removeClass(value.remove)}if(cb){cb.apply(this,arguments)}})})}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m){o.mode=m}var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback]}$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||($.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"toggle"))}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames)},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames)},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed)},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}});$.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end)}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)]}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55]}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)]}if(result=/rgba\(0, 0, 0, 0\)/.exec(color)){return colors.transparent}return colors[$.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=""&&color!="transparent"||$.nodeName(elem,"body")){break}attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)}var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return -c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return -c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return $.easing.easeInBounce(x,t*2,0,c,d)*0.5+b}return $.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.drop.min.js b/themes/default/js/ui/minified/effects.drop.min.js
new file mode 100644
index 000000000..ba3544ee4
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.drop.min.js
@@ -0,0 +1 @@
+(function($){$.effects.drop=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","opacity"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/2:el.outerWidth({margin:true})/2);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}var animation={opacity:mode=="show"?1:0};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.explode.min.js b/themes/default/js/ui/minified/effects.explode.min.js
new file mode 100644
index 000000000..89e6f528e
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.explode.min.js
@@ -0,0 +1 @@
+(function($){$.effects.explode=function(o){return this.queue(function(){var rows=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;var cells=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;o.options.mode=o.options.mode=="toggle"?($(this).is(":visible")?"hide":"show"):o.options.mode;var el=$(this).show().css("visibility","hidden");var offset=el.offset();offset.top-=parseInt(el.css("marginTop"),10)||0;offset.left-=parseInt(el.css("marginLeft"),10)||0;var width=el.outerWidth(true);var height=el.outerHeight(true);for(var i=0;i<rows;i++){for(var j=0;j<cells;j++){el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(width/cells),top:-i*(height/rows)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width/cells,height:height/rows,left:offset.left+j*(width/cells)+(o.options.mode=="show"?(j-Math.floor(cells/2))*(width/cells):0),top:offset.top+i*(height/rows)+(o.options.mode=="show"?(i-Math.floor(rows/2))*(height/rows):0),opacity:o.options.mode=="show"?0:1}).animate({left:offset.left+j*(width/cells)+(o.options.mode=="show"?0:(j-Math.floor(cells/2))*(width/cells)),top:offset.top+i*(height/rows)+(o.options.mode=="show"?0:(i-Math.floor(rows/2))*(height/rows)),opacity:o.options.mode=="show"?1:0},o.duration||500)}}setTimeout(function(){o.options.mode=="show"?el.css({visibility:"visible"}):el.css({visibility:"visible"}).hide();if(o.callback){o.callback.apply(el[0])}el.dequeue();$("div.ui-effects-explode").remove()},o.duration||500)})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.fold.min.js b/themes/default/js/ui/minified/effects.fold.min.js
new file mode 100644
index 000000000..bbe9846e8
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.fold.min.js
@@ -0,0 +1 @@
+(function($){$.effects.fold=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var size=o.options.size||15;var horizFirst=!(!o.options.horizFirst);var duration=o.duration?o.duration/2:$.fx.speeds._default/2;$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var widthFirst=((mode=="show")!=horizFirst);var ref=widthFirst?["width","height"]:["height","width"];var distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];var percent=/([0-9]+)%/.exec(size);if(percent){size=parseInt(percent[1],10)/100*distance[mode=="hide"?0:1]}if(mode=="show"){wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0})}var animation1={},animation2={};animation1[ref[0]]=mode=="show"?distance[0]:size;animation2[ref[1]]=mode=="show"?distance[1]:0;wrapper.animate(animation1,duration,o.options.easing).animate(animation2,duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.highlight.min.js b/themes/default/js/ui/minified/effects.highlight.min.js
new file mode 100644
index 000000000..bc20b6eea
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.highlight.min.js
@@ -0,0 +1 @@
+(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=["backgroundImage","backgroundColor","opacity"];var mode=$.effects.setMode(el,o.options.mode||"show");var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:"none",backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide"){animation.opacity=0}el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);if(mode=="show"&&$.browser.msie){this.style.removeAttribute("filter")}if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.pulsate.min.js b/themes/default/js/ui/minified/effects.pulsate.min.js
new file mode 100644
index 000000000..e1e49b0fa
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.pulsate.min.js
@@ -0,0 +1 @@
+(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||"show");var times=o.options.times||5;var duration=o.duration?o.duration/2:$.fx.speeds._default/2;if(mode=="hide"){times--}if(el.is(":hidden")){el.css("opacity",0);el.show();el.animate({opacity:1},duration,o.options.easing);times=times-2}for(var i=0;i<times;i++){el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing)}if(mode=="hide"){el.animate({opacity:0},duration,o.options.easing,function(){el.hide();if(o.callback){o.callback.apply(this,arguments)}})}else{el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing,function(){if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.scale.min.js b/themes/default/js/ui/minified/effects.scale.min.js
new file mode 100644
index 000000000..5b6a336eb
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.scale.min.js
@@ -0,0 +1 @@
+(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"hide");var percent=parseInt(o.options.percent,10)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=="hide")?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=="hide")?percent:100;options.mode=mode;el.effect("scale",options,o.duration,o.callback);el.dequeue()})};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"effect");var percent=parseInt(o.options.percent,10)||(parseInt(o.options.percent,10)==0?0:(mode=="hide"?0:100));var direction=o.options.direction||"both";var origin=o.options.origin;if(mode!="effect"){options.origin=origin||["middle","center"];options.restore=true}var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=="show"?{height:0,width:0}:original);var factor={y:direction!="horizontal"?(percent/100):1,x:direction!="vertical"?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=="show"){el.from.opacity=0;el.to.opacity=1}if(mode=="hide"){el.from.opacity=1;el.to.opacity=0}}options.from=el.from;options.to=el.to;options.mode=mode;el.effect("size",options,o.duration,o.callback);el.dequeue()})};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","width","height","overflow","opacity"];var props1=["position","top","left","overflow","opacity"];var props2=["width","height","overflow"];var cProps=["fontSize"];var vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var mode=$.effects.setMode(el,o.options.mode||"effect");var restore=o.options.restore||false;var scale=o.options.scale||"both";var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x}var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=="box"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale=="content"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}}$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(scale=="content"||scale=="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore){$.effects.save(child,props2)}var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore){$.effects.restore(child,props2)}})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.shake.min.js b/themes/default/js/ui/minified/effects.shake.min.js
new file mode 100644
index 000000000..fd035edc9
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.shake.min.js
@@ -0,0 +1 @@
+(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"left";var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var animation={},animation1={},animation2={};animation[ref]=(motion=="pos"?"-=":"+=")+distance;animation1[ref]=(motion=="pos"?"+=":"-=")+distance*2;animation2[ref]=(motion=="pos"?"-=":"+=")+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing)}el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}});el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.slide.min.js b/themes/default/js/ui/minified/effects.slide.min.js
new file mode 100644
index 000000000..db1b24edc
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.slide.min.js
@@ -0,0 +1 @@
+(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"show");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=="show"){el.css(ref,motion=="pos"?-distance:distance)}var animation={};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.transfer.min.js b/themes/default/js/ui/minified/effects.transfer.min.js
new file mode 100644
index 000000000..64096cb67
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.transfer.min.js
@@ -0,0 +1 @@
+(function($){$.effects.transfer=function(o){return this.queue(function(){var elem=$(this),target=$(o.options.to),endPosition=target.offset(),animation={top:endPosition.top,left:endPosition.left,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(o.options.className).css({top:startPosition.top,left:startPosition.left,height:elem.innerHeight(),width:elem.innerWidth(),position:"absolute"}).animate(animation,o.duration,o.options.easing,function(){transfer.remove();(o.callback&&o.callback.apply(elem[0],arguments));elem.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.accordion.min.js b/themes/default/js/ui/minified/ui.accordion.min.js
new file mode 100644
index 000000000..e656881d3
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.accordion.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.core.min.js b/themes/default/js/ui/minified/ui.core.min.js
new file mode 100644
index 000000000..633465af5
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.core.min.js
@@ -0,0 +1 @@
+jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.datepicker.min.js b/themes/default/js/ui/minified/ui.datepicker.min.js
new file mode 100644
index 000000000..ea2c13daf
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.datepicker.min.js
@@ -0,0 +1 @@
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return }if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return }this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return }var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.dialog.min.js b/themes/default/js/ui/minified/ui.dialog.min.js
new file mode 100644
index 000000000..dac92ce8b
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.dialog.min.js
@@ -0,0 +1 @@
+(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false;if(self.options.modal){var maxZ=0;$(".ui-dialog").each(function(){if(this!=self.uiDialog[0]){maxZ=Math.max(maxZ,$(this).css("z-index"))}});$.ui.dialog.maxZ=maxZ}},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){if($.ui.dialog.overlay.instances.length){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})}},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove();var maxZ=0;$.each(this.instances,function(){maxZ=Math.max(maxZ,this.css("z-index"))});this.maxZ=maxZ},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.draggable.min.js b/themes/default/js/ui/minified/ui.draggable.min.js
new file mode 100644
index 000000000..9f43db60b
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.draggable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.droppable.min.js b/themes/default/js/ui/minified/ui.droppable.min.js
new file mode 100644
index 000000000..bd984b121
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.droppable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.droppable",{_init:function(){var o=this.options,accept=o.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&$.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(accept)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[this.options.scope]=$.ui.ddmanager.droppables[this.options.scope]||[];$.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];for(var i=0;i<drop.length;i++){if(drop[i]==this){drop.splice(i,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(key,value){if(key=="accept"){this.options.accept=value&&$.isFunction(value)?value:function(d){return d.is(value)}}else{$.widget.prototype._setData.apply(this,arguments)}},_activate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(draggable&&this._trigger("activate",event,this.ui(draggable)))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(draggable&&this._trigger("deactivate",event,this.ui(draggable)))},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",event,this.ui(draggable))}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",event,this.ui(draggable))}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0]){return false}var childrenIntersection=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,"droppable");if(inst.options.greedy&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false}});if(childrenIntersection){return false}if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",event,this.ui(draggable));return this.element}return false},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,absolutePosition:c.positionAbs,offset:c.positionAbs}}});$.extend($.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset){return false}var x1=(draggable.positionAbs||draggable.position.absolute).left,x2=x1+draggable.helperProportions.width,y1=(draggable.positionAbs||draggable.position.absolute).top,y2=y1+draggable.helperProportions.height;var l=droppable.offset.left,r=l+droppable.proportions.width,t=droppable.offset.top,b=t+droppable.proportions.height;switch(toleranceMode){case"fit":return(l<x1&&x2<r&&t<y1&&y2<b);break;case"intersect":return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);break;case"pointer":var draggableLeft=((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left),draggableTop=((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top),isOver=$.ui.isOver(draggableTop,draggableLeft,t,l,droppable.proportions.height,droppable.proportions.width);return isOver;break;case"touch":return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));break;default:return false;break}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope];var type=event?event.type:null;var list=(t.currentItem||t.element).find(":data(droppable)").andSelf();droppablesLoop:for(var i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].options.accept.call(m[i].element[0],(t.currentItem||t.element)))){continue}for(var j=0;j<list.length;j++){if(list[j]==m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop}}m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible){continue}m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};if(type=="mousedown"){m[i]._activate.call(m[i],event)}}},drop:function(draggable,event){var dropped=false;$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance)){dropped=this._drop.call(this,event)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=1;this.isover=0;this._deactivate.call(this,event)}});return dropped},drag:function(draggable,event){if(draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event)}$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var intersects=$.ui.intersect(draggable,this,this.options.tolerance);var c=!intersects&&this.isover==1?"isout":(intersects&&this.isover==0?"isover":null);if(!c){return }var parentInstance;if(this.options.greedy){var parent=this.element.parents(":data(droppable):eq(0)");if(parent.length){parentInstance=$.data(parent[0],"droppable");parentInstance.greedyChild=(c=="isover"?1:0)}}if(parentInstance&&c=="isover"){parentInstance.isover=0;parentInstance.isout=1;parentInstance._out.call(parentInstance,event)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c=="isout"){parentInstance.isout=0;parentInstance.isover=1;parentInstance._over.call(parentInstance,event)}})}}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.resizable.min.js b/themes/default/js/ui/minified/ui.resizable.min.js
new file mode 100644
index 000000000..ee688bcf0
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.resizable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.resizable",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&$.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var n=this.handles.split(",");this.handles={};for(var i=0;i<n.length;i++){var handle=$.trim(n[i]),hname="ui-resizable-"+handle;var axis=$('<div class="ui-resizable-handle '+hname+'"></div>');if(/sw|se|ne|nw/.test(handle)){axis.css({zIndex:++o.zIndex})}if("se"==handle){axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){target=target||this.element;for(var i in this.handles){if(this.handles[i].constructor==String){this.handles[i]=$(this.handles[i],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var axis=$(this.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}if(!$(this.handles[i]).length){continue}}};this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!self.resizing){if(this.className){var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}self.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").hover(function(){$(this).removeClass("ui-resizable-autohide");self._handles.show()},function(){if(!self.resizing){$(this).addClass("ui-resizable-autohide");self._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);var wrapper=this.element;wrapper.parent().append(this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement)},_mouseCapture:function(event){var handle=false;for(var i in this.handles){if($(this.handles[i])[0]==event.target){handle=true}}return this.options.disabled||!!handle},_mouseStart:function(event){var o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is(".ui-draggable")||(/absolute/).test(el.css("position"))){el.css({position:"absolute",top:iniPos.top,left:iniPos.left})}if($.browser.opera&&(/relative/).test(el.css("position"))){el.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var curleft=num(this.helper.css("left")),curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio=="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor=="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger){return false}var data=trigger.apply(this,[event,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,csdif=this.sizeDiff;if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event)}data=this._respectSize(data,event);this._propagate("resize",event);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(data);this._trigger("resize",event,this.ui());return false},_mouseStop:function(event){this.resizing=false;var o=this.options,self=this;if(this._helper){var pr=this._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}))}self.helper.height(self.size.height);self.helper.width(self.size.width);if(this._helper&&!o.animate){this._proportionallyResize()}}$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove()}return false},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(isNumber(data.left)){this.position.left=data.left}if(isNumber(data.top)){this.position.top=data.top}if(isNumber(data.height)){this.size.height=data.height}if(isNumber(data.width)){this.size.width=data.width}},_updateRatio:function(data,event){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height){data.width=(csize.height*this.aspectRatio)}else{if(data.width){data.height=(csize.width/this.aspectRatio)}}if(a=="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null}if(a=="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width)}return data},_respectSize:function(data,event){var el=this.helper,o=this.options,pRatio=this._aspectRatio||event.shiftKey,a=this.axis,ismaxw=isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height);if(isminw){data.width=o.minWidth}if(isminh){data.height=o.minHeight}if(ismaxw){data.width=o.maxWidth}if(ismaxh){data.height=o.maxHeight}var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw){data.left=dw-o.minWidth}if(ismaxw&&cw){data.left=dw-o.maxWidth}if(isminh&&ch){data.top=dh-o.minHeight}if(ismaxh&&ch){data.top=dh-o.maxHeight}var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top){data.top=null}else{if(isNotwh&&!data.top&&data.left){data.left=null}}return data},_proportionallyResize:function(){var o=this.options;if(!this._proportionallyResizeElements.length){return }var element=this.helper||this.element;for(var i=0;i<this._proportionallyResizeElements.length;i++){var prel=this._proportionallyResizeElements[i];if(!this.borderDif){var b=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")],p=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];this.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding})}if($.browser.msie&&!(!($(element).is(":hidden")||$(element).parents(":hidden").length))){continue}prel.css({height:(element.height()-this.borderDif[0]-this.borderDif[2])||0,width:(element.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$('<div style="overflow:hidden;"></div>');var ie6=$.browser.msie&&$.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+pxyoffset,height:this.element.outerHeight()+pxyoffset,position:"absolute",left:this.elementOffset.left-ie6offset+"px",top:this.elementOffset.top-ie6offset+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx,dy){return{width:this.originalSize.width+dx}},w:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!="resize"&&this._trigger(n,event,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));$.extend($.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});$.ui.plugin.add("resizable","alsoResize",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options;_store=function(exp){$(exp).each(function(){$(this).data("resizable-alsoresize",{width:parseInt($(this).width(),10),height:parseInt($(this).height(),10),left:parseInt($(this).css("left"),10),top:parseInt($(this).css("top"),10)})})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize)}else{$.each(o.alsoResize,function(exp,c){_store(exp)})}}else{_store(o.alsoResize)}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:["width","height","top","left"];$.each(css||["width","height","top","left"],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});if(/relative/.test(el.css("position"))&&$.browser.opera){self._revertToRelativePosition=true;el.css({position:"absolute",top:"auto",left:"auto"})}el.css(style)})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)})}else{_alsoResize(o.alsoResize)}},stop:function(event,ui){var self=$(this).data("resizable");if(self._revertToRelativePosition&&$.browser.opera){self._revertToRelativePosition=false;el.css({position:"relative"})}$(this).removeData("resizable-alsoresize-start")}});$.ui.plugin.add("resizable","animate",{stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;var pr=self._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(self.element.css("width"),10),height:parseInt(self.element.css("height"),10),top:parseInt(self.element.css("top"),10),left:parseInt(self.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height})}self._updateCache(data);self._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,el=self.element;var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return }self.containerElement=$(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{var element=$(ce),p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name))});self.containerOffset=element.offset();self.containerPosition=element.position();self.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=self._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&(/static/).test(ce.css("position"))){cop=co}if(cp.left<(self._helper?co.left:0)){self.size.width=self.size.width+(self._helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio){self.size.height=self.size.width/o.aspectRatio}self.position.left=o.helper?co.left:0}if(cp.top<(self._helper?co.top:0)){self.size.height=self.size.height+(self._helper?(self.position.top-co.top):self.position.top);if(pRatio){self.size.width=self.size.height*o.aspectRatio}self.position.top=self._helper?co.top:0}self.offset.left=self.parentData.left+self.position.left;self.offset.top=self.parentData.top+self.position.top;var woset=Math.abs((self._helper?self.offset.left-cop.left:(self.offset.left-cop.left))+self.sizeDiff.width),hoset=Math.abs((self._helper?self.offset.top-cop.top:(self.offset.top-co.top))+self.sizeDiff.height);var isParent=self.containerElement.get(0)==self.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(self.containerElement.css("position"));if(isParent&&isOffsetRelative){woset-=self.parentData.left}if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio){self.size.height=self.size.width/self.aspectRatio}}if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio){self.size.width=self.size.height*self.aspectRatio}}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options,cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=$(self.helper),ho=helper.offset(),w=helper.outerWidth()-self.sizeDiff.width,h=helper.outerHeight()-self.sizeDiff.height;if(self._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(self._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$.ui.plugin.add("resizable","ghost",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size;self.ghost=self.originalElement.clone();self.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost=="string"?o.ghost:"");self.ghost.appendTo(self.helper)},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost){self.ghost.css({position:"relative",height:self.size.height,width:self.size.width})}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost&&self.helper){self.helper.get(0).removeChild(self.ghost.get(0))}}});$.ui.plugin.add("resizable","grid",{resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||event.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy}else{if(/^(ne)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy}else{if(/^(sw)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox}else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox}}}}});var num=function(v){return parseInt(v,10)||0};var isNumber=function(value){return !isNaN(parseInt(value,10))}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.selectable.min.js b/themes/default/js/ui/minified/ui.selectable.min.js
new file mode 100644
index 000000000..b63f55a44
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.selectable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.selectable",$.extend({},$.ui.mouse,{_init:function(){var self=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(self.options.filter,self.element[0]);selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(event){var self=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled){return }var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:event.clientX,top:event.clientY,width:0,height:0});if(options.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){selectee.$element.removeClass("ui-unselecting").addClass("ui-selecting");selectee.unselecting=false;selectee.selecting=true;selectee.selected=true;self._trigger("selecting",event,{selecting:selectee.element});return false}})},_mouseDrag:function(event){var self=this;this.dragged=true;if(this.options.disabled){return }var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp}if(y1>y2){var tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==self.element[0]){return }var hit=false;if(options.tolerance=="touch"){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1))}else{if(options.tolerance=="fit"){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2)}}if(hit){if(selectee.selected){selectee.$element.removeClass("ui-selected");selectee.selected=false}if(selectee.unselecting){selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false}if(!selectee.selecting){selectee.$element.addClass("ui-selecting");selectee.selecting=true;self._trigger("selecting",event,{selecting:selectee.element})}}else{if(selectee.selecting){if(event.metaKey&&selectee.startselected){selectee.$element.removeClass("ui-selecting");selectee.selecting=false;selectee.$element.addClass("ui-selected");selectee.selected=true}else{selectee.$element.removeClass("ui-selecting");selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass("ui-unselecting");selectee.unselecting=true}self._trigger("unselecting",event,{unselecting:selectee.element})}}if(selectee.selected){if(!event.metaKey&&!selectee.startselected){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}}}});return false},_mouseStop:function(event){var self=this;this.dragged=false;var options=this.options;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;selectee.startselected=false;self._trigger("unselected",event,{unselected:selectee.element})});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;self._trigger("selected",event,{selected:selectee.element})});this._trigger("stop",event);this.helper.remove();return false}}));$.extend($.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.slider.min.js b/themes/default/js/ui/minified/ui.slider.min.js
new file mode 100644
index 000000000..209d8338f
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.slider.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){if(!o.disabled){$(this).addClass("ui-state-hover")}},function(){$(this).removeClass("ui-state-hover")}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}else{$(this).blur()}}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal<otherVal))){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("stop",event,uiHash)},_change:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("change",event,uiHash)},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.sortable.min.js b/themes/default/js/ui/minified/ui.sortable.min.js
new file mode 100644
index 000000000..4c4c87265
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.sortable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData("sortable-item")}},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,"sortable-item")==self){currentItem=$(this);return false}});if($.data(event.target,"sortable-item")==self){currentItem=$(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor){if($("body").css("cursor")){this._storedCursor=$("body").css("cursor")}$("body").css("cursor",o.cursor)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this))}}if($.ui.ddmanager){$.ui.ddmanager.current=this}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed}}}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=="semi-dynamic"?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return }if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event)}if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem)}else{$(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b)}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement){return false}return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1))},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf))}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf))}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this.refreshPositions()},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst])}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this)})}return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0]){this.items.splice(i,1)}}}},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data("sortable-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0]){continue}var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}var p=t.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className){el.style.visibility="hidden"}return el},update:function(container,p){if(className&&!o.forcePlaceholderSize){return }if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css("paddingTop")||0,10)-parseInt(self.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css("paddingLeft")||0,10)-parseInt(self.currentItem.css("paddingRight")||0,10))}}}}self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder)},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?"left":"top"];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0])){continue}var cur=this.items[j][this.containers[i].floating?"left":"top"];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j]}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}}},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0])}if(helper[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(helper[0].style.width==""||o.forceHelperSize){helper.width(this.currentItem.width())}if(helper[0].style.height==""||o.forceHelperSize){helper.height(this.currentItem.height())}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter){self.refreshPositions(!hardRefresh)}},0)},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static"){this._storedCSS[i]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())})}if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())})}for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}).call(this,this.containers[i]))}}}for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this))}}).call(this,this.containers[i]))}if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this))}}).call(this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this._storedCursor){$("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}return false}if(!noPropagation){this._trigger("beforeStop",event,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null}}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.tabs.min.js b/themes/default/js/ui/minified/ui.tabs.min.js
new file mode 100644
index 000000000..39e8edae9
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.tabs.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(key,value){if(key=="selected"){if(this.options.collapsible&&value==this.options.selected){return }this.select(value)}else{this.options[key]=value;if(key=="deselectable"){this.options.collapsible=value}this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+$.data(a)},_sanitizeSelector:function(hash){return hash.replace(/:/g,"\\:")},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)))},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var el=$(this);el.html(el.data("label.tabs")).removeData("label.tabs")})},_tabify:function(init){this.list=this.element.children("ul:first");this.lis=$("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return $("a",this)[0]});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr("href");var hrefBase=href.split("#")[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split("#")[0]||(baseEl=$("base")[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href}if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href))}else{if(href!="#"){$.data(a,"href.tabs",href);$.data(a,"load.tabs",href.replace(/#.*$/,""));var id=self._tabId(a);a.href="#"+id;var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(self.panels[i-1]||self.list);$panel.data("destroy.tabs",true)}self.panels=self.panels.add($panel)}else{o.disabled.push(i)}}});if(init){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false}})}if(typeof o.selected!="number"&&o.cookie){o.selected=parseInt(self._cookie(),10)}if(typeof o.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}o.selected=o.selected||0}else{if(o.selected===null){o.selected=-1}}o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter(".ui-state-disabled"),function(n,i){return self.lis.index(n)}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass("ui-tabs-hide");this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active");self.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[o.selected],self.panels[o.selected]))});this.load(o.selected)}$(window).bind("unload",function(){self.lis.add(self.anchors).unbind(".tabs");self.lis=self.anchors=self.panels=null})}else{o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(o.cookie){this._cookie(o.selected,o.cookie)}for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(o.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(o.event!="mouseover"){var addState=function(state,el){if(el.is(":not(.ui-state-disabled)")){el.addClass("ui-state-"+state)}};var removeState=function(state,el){el.removeClass("ui-state-"+state)};this.lis.bind("mouseover.tabs",function(){addState("hover",$(this))});this.lis.bind("mouseout.tabs",function(){removeState("hover",$(this))});this.anchors.bind("focus.tabs",function(){addState("focus",$(this).closest("li"))});this.anchors.bind("blur.tabs",function(){removeState("focus",$(this).closest("li"))})}var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1]}else{hideFx=showFx=o.fx}}function resetStyle($el,fx){$el.css({display:""});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute("filter")}}var showTab=showFx?function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.hide().removeClass("ui-tabs-hide").animate(showFx,showFx.duration||"normal",function(){resetStyle($show,showFx);self._trigger("show",null,self._ui(clicked,$show[0]))})}:function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.removeClass("ui-tabs-hide");self._trigger("show",null,self._ui(clicked,$show[0]))};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||"normal",function(){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");resetStyle($hide,hideFx);self.element.dequeue("tabs")})}:function(clicked,$hide,$show){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");self.element.dequeue("tabs")};this.anchors.bind(o.event+".tabs",function(){var el=this,$li=$(this).closest("li"),$hide=self.panels.filter(":not(.ui-tabs-hide)"),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass("ui-tabs-selected")&&!o.collapsible)||$li.hasClass("ui-state-disabled")||$li.hasClass("ui-state-processing")||self._trigger("select",null,self._ui(this,$show[0]))===false){this.blur();return false}o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass("ui-tabs-selected")){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){hideTab(el,$hide)}).dequeue("tabs");this.blur();return false}else{if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this));this.blur();return false}}}if(o.cookie){self._cookie(o.selected,o.cookie)}if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide)})}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if($.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var o=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var href=$.data(this,"href.tabs");if(href){this.href=href}var $this=$(this).unbind(".tabs");$.each(["href","load","cache"],function(i,prefix){$this.removeData(prefix+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if($.data(this,"destroy.tabs")){$(this).remove()}else{$(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(o.cookie){this._cookie(null,o.cookie)}},add:function(url,label,index){if(index===undefined){index=this.anchors.length}var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf("#")?url.replace("#",""):this._tabId($("a",$li)[0]);$li.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).data("destroy.tabs",true)}$panel.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode)}else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index])}o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this._tabify();if(this.anchors.length==1){$li.addClass("ui-tabs-selected ui-state-active");$panel.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[0],self.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[index],this.panels[index]))},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1))}o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index}),function(n,i){return n>=index?--n:n});this._tabify();this._trigger("remove",null,this._ui($li.find("a")[0],$panel[0]))},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return }this.lis.eq(index).removeClass("ui-state-disabled");o.disabled=$.grep(o.disabled,function(n,i){return n!=index});this._trigger("enable",null,this._ui(this.anchors[index],this.panels[index]))},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass("ui-state-disabled");o.disabled.push(index);o.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[index],this.panels[index]))}},select:function(index){if(typeof index=="string"){index=this.anchors.index(this.anchors.filter("[href$="+index+"]"))}else{if(index===null){index=-1}}if(index==-1&&this.options.collapsible){index=this.options.selected}this.anchors.eq(index).trigger(this.options.event+".tabs")},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,"load.tabs");this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,"cache.tabs")){this.element.dequeue("tabs");return }this.lis.eq(index).addClass("ui-state-processing");if(o.spinner){var span=$("span",a);span.data("label.tabs",span.html()).html(o.spinner)}this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,"cache.tabs",true)}self._trigger("load",null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s)}catch(e){}self.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(index,url){this.anchors.eq(index).removeData("cache.tabs").data("load.tabs",url)},length:function(){return this.anchors.length}});$.extend($.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0)},ms);if(e){e.stopPropagation()}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null)}}:function(e){t=o.selected;rotate()});if(ms){this.element.bind("tabsshow",rotate);this.anchors.bind(o.event+".tabs",stop);rotate()}else{clearTimeout(self.rotation);this.element.unbind("tabsshow",rotate);this.anchors.unbind(o.event+".tabs",stop);delete this._rotate;delete this._unrotate}}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/packed/effects.blind.packed.js b/themes/default/js/ui/packed/effects.blind.packed.js
new file mode 100644
index 000000000..47c1f6ee4
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.blind.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.3.t=6(o){u j.v(6(){2 1=$(j),e=[\'s\',\'r\',\'m\'];2 4=$.3.n(1,o.8.4||\'c\');2 7=o.8.7||\'b\';$.3.p(1,e);1.d();2 5=$.3.q(1).g({x:\'y\'});2 a=(7==\'b\')?\'h\':\'l\';2 k=(7==\'b\')?5.h():5.l();f(4==\'d\')5.g(a,0);2 9={};9[a]=4==\'d\'?k:0;5.C(9,o.D,o.8.G,6(){f(4==\'c\')1.c();$.3.E(1,e);$.3.A(1);f(o.i)o.i.B(1[0],w);1.z()})})}})(F);',43,43,'|el|var|effects|mode|wrapper|function|direction|options|animation|ref|vertical|hide|show|props|if|css|height|callback|this|distance|width|left|setMode||save|createWrapper|top|position|blind|return|queue|arguments|overflow|hidden|dequeue|removeWrapper|apply|animate|duration|restore|jQuery|easing'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.bounce.packed.js b/themes/default/js/ui/packed/effects.bounce.packed.js
new file mode 100644
index 000000000..d1cc78c04
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.bounce.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(q($){$.c.T=q(o){S v.H(q(){7 4=$(v),r=[\'W\',\'w\',\'x\'];7 a=$.c.Z(4,o.8.a||\'Y\');7 l=o.8.l||\'y\';7 6=o.8.6||R;7 k=o.8.k||5;7 f=o.N||L;b(/s|j/.M(a))r.K(\'t\');$.c.J(4,r);4.s();$.c.O(4);7 9=(l==\'y\'||l==\'P\')?\'w\':\'x\';7 d=(l==\'y\'||l==\'x\')?\'e\':\'I\';7 6=o.8.6||(9==\'w\'?4.11({D:z})/3:4.X({D:z})/3);b(a==\'s\')4.C(\'t\',0).C(9,d==\'e\'?-6:6);b(a==\'j\')6=6/(k*2);b(a!=\'j\')k--;b(a==\'s\'){7 m={t:1};m[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(m,f/2,o.8.p);6=6/2;k--};10(7 i=0;i<k;i++){7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p);6=(a==\'j\')?6*2:6/2};b(a==\'j\'){7 m={t:0};m[9]=(d==\'e\'?\'-=\':\'+=\')+6;4.h(m,f/2,o.8.p,q(){4.j();$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})}Q{7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p,q(){$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})};4.H(\'U\',q(){4.A()});4.A()})}})(V);',62,64,'||||el||distance|var|options|ref|mode|if|effects|motion|pos|speed|animation2|animate||hide|times|direction|animation|animation1||easing|function|props|show|opacity|callback|this|top|left|up|true|dequeue|restore|css|margin|apply|removeWrapper|arguments|queue|neg|save|push|250|test|duration|createWrapper|down|else|20|return|bounce|fx|jQuery|position|outerWidth|effect|setMode|for|outerHeight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.clip.packed.js b/themes/default/js/ui/packed/effects.clip.packed.js
new file mode 100644
index 000000000..925218295
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.clip.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(9($){$.6.L=9(o){H t.s(9(){3 1=$(t),m=[\'d\',\'u\',\'p\',\'i\',\'h\'];3 5=$.6.y(1,o.l.5||\'f\');3 8=o.l.8||\'a\';$.6.z(1,m);1.c();3 v=$.6.A(1).g({B:\'x\'});3 4=1[0].C==\'w\'?v:1;3 7={k:(8==\'a\')?\'i\':\'h\',d:(8==\'a\')?\'u\':\'p\'};3 b=(8==\'a\')?4.i():4.h();j(5==\'c\'){4.g(7.k,0);4.g(7.d,b/2)} 3 e={};e[7.k]=5==\'c\'?b:0;e[7.d]=5==\'c\'?0:b/2;4.4(e,{s:E,r:o.r,q:o.l.q,K:9(){j(5==\'f\')1.f();$.6.D(1,m);$.6.G(1);j(o.n)o.n.I(1[0],J);1.M()}})})}})(F);',49,49,'|el||var|animate|mode|effects|ref|direction|function|vertical|distance|show|position|animation|hide|css|width|height|if|size|options|props|callback||left|easing|duration|queue|this|top|wrapper|IMG|hidden|setMode|save|createWrapper|overflow|tagName|restore|false|jQuery|removeWrapper|return|apply|arguments|complete|clip|dequeue'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.core.packed.js b/themes/default/js/ui/packed/effects.core.packed.js
new file mode 100644
index 000000000..9d13af062
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.core.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';2n.I||(e($){$.I={34:"1.7.2",33:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.2Z("2y.2z."+L[i],k[0].G[L[i]])}},36:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.D(L[i],k.2Z("2y.2z."+L[i]))}},3b:e(2v,1j){8(1j==\'Q\')1j=2v.23(\':39\')?\'1e\':\'1x\';6 1j},3d:e(1m,1Y){g y,x;2K(1m[0]){17\'N\':y=0;Y;17\'38\':y=0.5;Y;17\'2r\':y=1;Y;2H:y=1m[0]/1Y.2E};2K(1m[1]){17\'O\':x=0;Y;17\'3c\':x=0.5;Y;17\'2W\':x=1;Y;2H:x=1m[1]/1Y.2D};6{x:x,y:y}},31:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l();g 2B={2D:k.32(2A),2E:k.35(2A),\'2F\':k.D(\'2F\')};k.3C(\'<2I 3v="22-I-W" G="3t-3s:2m%;3w:1u;3x:3B;3A:0;3e:0"></2I>\');g W=k.1l();8(k.D(\'V\')==\'1S\'){W.D({V:\'1T\'});k.D({V:\'1T\'})}K{g N=k.D(\'N\');8(26(C(N,10)))N=\'2C\';g O=k.D(\'O\');8(26(C(O,10)))O=\'2C\';W.D({V:k.D(\'V\'),N:N,O:O,3y:k.D(\'z-3r\')}).1e();k.D({V:\'1T\',N:0,O:0})}W.D(2B);6 W},3q:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l().3j(k);6 k},3i:e(k,2x,2M,q){q=q||{};$.1v(2x,e(i,x){15=k.2l(x);8(15[0]>0)q[x]=15[0]*2M+15[1]});6 q},1n:e(q,1h,u,B){g 1L=(X u=="e"?u:(B?B:13));g 2O=(X u=="3h"?u:13);6 h.1v(e(){g 1Q={};g T=$(h);g 1d=T.E("G")||\'\';8(X 1d==\'2Q\')1d=1d["1N"];8(q.Q){T.3f(q.Q)?q.J=q.Q:q.H=q.Q}g 1z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1o(q.H);8(q.J)T.1g(q.J);g Z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1g(q.H);8(q.J)T.1o(q.J);21(g n 3g Z){8(X Z[n]!="e"&&Z[n]&&n.1K("3k")==-1&&n.1K("1C")==-1&&Z[n]!=1z[n]&&(n.1G(/A/i)||(!n.1G(/A/i)&&!26(C(Z[n],10))))&&(1z.V!="1S"||(1z.V=="1S"&&!n.1G(/O|N|2r|2W/))))1Q[n]=Z[n]}T.3l(1Q,1h,2O,e(){8(X $(h).E("G")==\'2Q\'){$(h).E("G")["1N"]="";$(h).E("G")["1N"]=1d}K $(h).E("G",1d);8(q.H)$(h).1o(q.H);8(q.J)$(h).1g(q.J);8(1L)1L.F(h,w)})})}};e 1s(a,m){g o=a[1]&&a[1].18==2S?a[1]:{};8(m)o.1j=m;g r=a[1]&&a[1].18!=2S?a[1]:(o.1h?o.1h:a[2]);r=$.l.3p?0:X r==="3o"?r:$.l.2R[r]||$.l.2R.3n;g B=o.B||($.1y(a[1])&&a[1])||($.1y(a[2])&&a[2])||($.1y(a[3])&&a[3]);6[a[0],o,r,B]}$.14.1E({2c:$.14.1e,2a:$.14.1x,2d:$.14.Q,2k:$.14.1o,2j:$.14.1g,2f:$.14.2g,1t:e(l,1Z,r,B){6 $.I[l]?$.I[l].3m(h,{3z:l,1Z:1Z||{},1h:r,B:B}):13},1e:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2c.F(h,w);K{6 h.1t.F(h,1s(w,\'1e\'))}},1x:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2a.F(h,w);K{6 h.1t.F(h,1s(w,\'1x\'))}},Q:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0]))||($.1y(w[0])||X w[0]==\'2h\')){6 h.2d.F(h,w)}K{6 h.1t.F(h,1s(w,\'Q\'))}},1o:e(R,r,u,B){6 r?$.I.1n.F(h,[{H:R},r,u,B]):h.2k(R)},1g:e(R,r,u,B){6 r?$.I.1n.F(h,[{J:R},r,u,B]):h.2j(R)},2g:e(R,r,u,B){6((X r!=="2h")&&r)?$.I.1n.F(h,[{Q:R},r,u,B]):h.2f(R,r)},2q:e(J,H,r,u,B){6 $.I.1n.F(h,[{H:H,J:J},r,u,B])},3u:e(){6 h.2q.F(h,w)},2l:e(2e){g G=h.D(2e),20=[];$.1v([\'3a\',\'30\',\'%\',\'37\'],e(i,15){8(G.1K(15)>0)20=[1q(G),15]});6 20}});$.1v([\'2p\',\'40\',\'4W\',\'4V\',\'4U\',\'A\',\'4S\'],e(i,E){$.l.4T[E]=e(l){8(l.4X==0){l.11=2o(l.12,E);l.1f=28(l.1f)}l.12.G[E]="29("+[f.24(f.1X(C((l.27*(l.1f[0]-l.11[0]))+l.11[0],10),j),0),f.24(f.1X(C((l.27*(l.1f[1]-l.11[1]))+l.11[1],10),j),0),f.24(f.1X(C((l.27*(l.1f[2]-l.11[2]))+l.11[2],10),j),0)].4Y(",")+")"}});e 28(A){g v;8(A&&A.18==54&&A.1C==3)6 A;8(v=/29\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.1k(A))6[C(v[1],10),C(v[2],10),C(v[3],10)];8(v=/29\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.1k(A))6[1q(v[1])*2.55,1q(v[2])*2.55,1q(v[3])*2.55];8(v=/#([a-1c-1b-9]{2})([a-1c-1b-9]{2})([a-1c-1b-9]{2})/.1k(A))6[C(v[1],16),C(v[2],16),C(v[3],16)];8(v=/#([a-1c-1b-9])([a-1c-1b-9])([a-1c-1b-9])/.1k(A))6[C(v[1]+v[1],16),C(v[2]+v[2],16),C(v[3]+v[3],16)];8(v=/53\\(0, 0, 0, 0\\)/.1k(A))6 1V[\'1u\'];6 1V[$.3D(A).52()]}e 2o(12,E){g A;4Z{A=$.51(12,E);8(A!=\'\'&&A!=\'1u\'||$.4R(12,"4Q"))Y;E="2p"}4I(12=12.4H);6 28(A)};g 1V={57:[0,j,j],4E:[2P,j,j],4F:[2i,2i,4J],4K:[0,0,0],4P:[0,0,j],4O:[2X,42,42],4N:[0,j,j],4L:[0,0,19],4M:[0,19,19],56:[1H,1H,1H],5e:[0,2m,0],5m:[5n,5o,2b],5l:[19,0,19],5q:[5p,2b,47],5r:[j,2U,0],5s:[5j,50,5c],5b:[19,0,0],5a:[58,59,5d],5k:[5i,0,1w],5h:[j,0,j],5g:[j,5f,0],4G:[0,P,0],4C:[U,0,3X],3Y:[2P,2T,2U],3W:[3V,3T,2T],3U:[2V,j,j],3Z:[2Y,4D,2Y],46:[1w,1w,1w],45:[j,44,41],43:[j,j,2V],3S:[0,j,0],3R:[j,0,j],3I:[P,0,0],3J:[0,0,P],3H:[P,P,0],3G:[j,2X,0],3E:[j,1A,3F],3K:[P,0,P],3L:[P,0,P],3Q:[j,0,0],3P:[1A,1A,1A],3O:[j,j,j],3M:[j,j,0],1u:[j,j,j]};$.u.3N=$.u.2w;$.1E($.u,{2s:\'2t\',2w:e(x,t,b,c,d){6 $.u[$.u.2s](x,t,b,c,d)},48:e(x,t,b,c,d){6 c*(t/=d)*t+b},2t:e(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},49:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},4t:e(x,t,b,c,d){6 c*(t/=d)*t*t+b},4u:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},4s:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},4r:e(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},4p:e(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},4q:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},4v:e(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},4w:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},4B:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},4A:e(x,t,b,c,d){6-c*f.2J(t/d*(f.M/2))+c+b},4z:e(x,t,b,c,d){6 c*f.1i(t/d*(f.M/2))+b},4x:e(x,t,b,c,d){6-c/2*(f.2J(f.M*t/d)-1)+b},4y:e(x,t,b,c,d){6(t==0)?b:c*f.S(2,10*(t/d-1))+b},4o:e(x,t,b,c,d){6(t==d)?b+c:c*(-f.S(2,-10*t/d)+1)+b},4n:e(x,t,b,c,d){8(t==0)6 b;8(t==d)6 b+c;8((t/=d/2)<1)6 c/2*f.S(2,10*(t-1))+b;6 c/2*(-f.S(2,-10*--t)+2)+b},4e:e(x,t,b,c,d){6-c*(f.1B(1-(t/=d)*t)-1)+b},4f:e(x,t,b,c,d){6 c*f.1B(1-(t=t/d-1)*t)+b},4d:e(x,t,b,c,d){8((t/=d/2)<1)6-c/2*(f.1B(1-t*t)-1)+b;6 c/2*(f.1B(1-(t-=2)*t)+1)+b},4c:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6-(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b},4a:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6 a*f.S(2,-10*t)*f.1i((t*d-s)*(2*f.M)/p)+c+b},4b:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d/2)==2)6 b+c;8(!p)p=d*(.3*1.5);8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);8(t<1)6-.5*(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b;6 a*f.S(2,-10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p)*.5+c+b},4g:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*(t/=d)*t*((s+1)*t-s)+b},4h:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},4m:e(x,t,b,c,d,s){8(s==1U)s=1.1a;8((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.2G))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.2G))+1)*t+s)+2)+b},2u:e(x,t,b,c,d){6 c-$.u.1I(x,d-t,0,c,d)+b},1I:e(x,t,b,c,d){8((t/=d)<(1/2.U)){6 c*(7.1D*t*t)+b}K 8(t<(2/2.U)){6 c*(7.1D*(t-=(1.5/2.U))*t+.U)+b}K 8(t<(2.5/2.U)){6 c*(7.1D*(t-=(2.25/2.U))*t+.4l)+b}K{6 c*(7.1D*(t-=(2.4k/2.U))*t+.4i)+b}},4j:e(x,t,b,c,d){8(t<d/2)6 $.u.2u(x,t*2,0,c,d)*.5+b;6 $.u.1I(x,t*2-d,0,c,d)*.5+c*.5+b}})})(2n);',62,339,'||||||return||if||||||function|Math|var|this||255|element|fx|||||value|speed|||easing|result|arguments||||color|callback|parseInt|css|attr|apply|style|add|effects|remove|else|set|PI|top|left|128|toggle|classNames|pow|that|75|position|wrapper|typeof|break|newStyle||start|elem|null|fn|unit||case|constructor|139|70158|F0|fA|oldStyleAttr|show|end|removeClass|duration|sin|mode|exec|parent|origin|animateClass|addClass|defaultView|parseFloat|document|_normalizeArguments|effect|transparent|each|211|hide|isFunction|oldStyle|192|sqrt|length|5625|extend|Number|match|169|easeOutBounce|abs|indexOf|cb|slow|cssText|normal|fast|offset|test|static|relative|undefined|colors|asin|min|original|options|val|for|ui|is|max||isNaN|pos|getRGB|rgb|_hide|107|_show|__toggle|key|_toggleClass|toggleClass|boolean|245|_removeClass|_addClass|cssUnit|100|jQuery|getColor|backgroundColor|morph|bottom|def|easeOutQuad|easeInBounce|el|swing|list|ec|storage|true|props|auto|width|height|float|525|default|div|cos|switch|getComputedStyle|factor|currentStyle|ea|240|object|speeds|Object|230|140|224|right|165|144|data|px|createWrapper|outerWidth|save|version|outerHeight|restore|pt|middle|hidden|em|setMode|center|getBaseline|padding|hasClass|in|string|setTransition|replaceWith|Moz|animate|call|_default|number|off|removeWrapper|index|size|font|switchClass|class|background|border|zIndex|method|margin|none|wrap|trim|pink|203|orange|olive|maroon|navy|purple|violet|yellow|jswing|white|silver|red|magenta|lime|216|lightcyan|173|lightblue|130|khaki|lightgreen|borderBottomColor|193||lightyellow|182|lightpink|lightgrey||easeInQuad|easeInOutQuad|easeOutElastic|easeInOutElastic|easeInElastic|easeInOutCirc|easeInCirc|easeOutCirc|easeInBack|easeOutBack|984375|easeInOutBounce|625|9375|easeInOutBack|easeInOutExpo|easeOutExpo|easeOutQuart|easeInOutQuart|easeInQuart|easeInOutCubic|easeInCubic|easeOutCubic|easeInQuint|easeOutQuint|easeInOutSine|easeInExpo|easeOutSine|easeInSine|easeInOutQuint|indigo|238|azure|beige|green|parentNode|while|220|black|darkblue|darkcyan|cyan|brown|blue|body|nodeName|outlineColor|step|borderTopColor|borderRightColor|borderLeftColor|state|join|do||curCSS|toLowerCase|rgba|Array||darkgrey|aqua|233|150|darksalmon|darkred|204|122|darkgreen|215|gold|fuchsia|148|153|darkviolet|darkmagenta|darkkhaki|189|183|85|darkolivegreen|darkorange|darkorchid'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.drop.packed.js b/themes/default/js/ui/packed/effects.drop.packed.js
new file mode 100644
index 000000000..ff9373d35
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.drop.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(a($){$.5.O=a(o){G i.v(a(){4 3=$(i),m=[\'J\',\'j\',\'c\',\'l\'];4 6=$.5.N(3,o.9.6||\'h\');4 7=o.9.7||\'c\';$.5.B(3,m);3.d();$.5.C(3);4 b=(7==\'r\'||7==\'D\')?\'j\':\'c\';4 e=(7==\'r\'||7==\'c\')?\'f\':\'w\';4 8=o.9.8||(b==\'j\'?3.y({q:p})/2:3.E({q:p})/2);g(6==\'d\')3.t(\'l\',0).t(b,e==\'f\'?-8:8);4 k={l:6==\'d\'?1:0};k[b]=(6==\'d\'?(e==\'f\'?\'+=\':\'-=\'):(e==\'f\'?\'-=\':\'+=\'))+8;3.L(k,{v:M,n:o.n,u:o.9.u,K:a(){g(6==\'h\')3.h();$.5.x(3,m);$.5.F(3);g(o.s)o.s.H(i,z);3.A()}})})}})(I);',51,51,'|||el|var|effects|mode|direction|distance|options|function|ref|left|show|motion|pos|if|hide|this|top|animation|opacity|props|duration||true|margin|up|callback|css|easing|queue|neg|restore|outerHeight|arguments|dequeue|save|createWrapper|down|outerWidth|removeWrapper|return|apply|jQuery|position|complete|animate|false|setMode|drop'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.explode.packed.js b/themes/default/js/ui/packed/effects.explode.packed.js
new file mode 100644
index 000000000..d82346710
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.explode.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(k($){$.r.t=k(o){M q.L(k(){b 8=o.4.n?a.C(a.F(o.4.n)):3;b 6=o.4.n?a.C(a.F(o.4.n)):3;o.4.7=o.4.7==\'K\'?($(q).O(\':p\')?\'E\':\'9\'):o.4.7;b 5=$(q).9().f(\'m\',\'H\');b e=5.e();e.g-=y(5.f("Q"),10)||0;e.h-=y(5.f("P"),10)||0;b c=5.R(z);b d=5.I(z);A(b i=0;i<8;i++){A(b j=0;j<6;j++){5.J().N(\'Y\').14(\'<s></s>\').f({v:\'w\',m:\'p\',h:-j*(c/6),g:-i*(d/8)}).13().12(\'B-r-t\').f({v:\'w\',11:\'H\',c:c/6,d:d/8,h:e.h+j*(c/6)+(o.4.7==\'9\'?(j-a.l(6/2))*(c/6):0),g:e.g+i*(d/8)+(o.4.7==\'9\'?(i-a.l(8/2))*(d/8):0),G:o.4.7==\'9\'?0:1}).S({h:e.h+j*(c/6)+(o.4.7==\'9\'?0:(j-a.l(6/2))*(c/6)),g:e.g+i*(d/8)+(o.4.7==\'9\'?0:(i-a.l(8/2))*(d/8)),G:o.4.7==\'9\'?1:0},o.x||D)}}T(k(){o.4.7==\'9\'?5.f({m:\'p\'}):5.f({m:\'p\'}).E();W(o.u)o.u.X(5[0]);5.V();$(\'s.B-r-t\').U()},o.x||D)})}})(Z);',62,67,'||||options|el|cells|mode|rows|show|Math|var|width|height|offset|css|top|left|||function|floor|visibility|pieces||visible|this|effects|div|explode|callback|position|absolute|duration|parseInt|true|for|ui|round|500|hide|sqrt|opacity|hidden|outerHeight|clone|toggle|queue|return|appendTo|is|marginLeft|marginTop|outerWidth|animate|setTimeout|remove|dequeue|if|apply|body|jQuery||overflow|addClass|parent|wrap'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.fold.packed.js b/themes/default/js/ui/packed/effects.fold.packed.js
new file mode 100644
index 000000000..35d4a4170
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.fold.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(f($){$.8.A=f(o){w u.D(f(){3 4=$(u),m=[\'H\',\'E\',\'I\'];3 5=$.8.G(4,o.c.5||\'h\');3 6=o.c.6||J;3 g=!(!o.c.g);3 e=o.e?o.e/2:$.B.x.C/2;$.8.y(4,m);4.d();3 7=$.8.z(4).r({F:\'M\'});3 q=((5==\'d\')!=g);3 p=q?[\'b\',\'a\']:[\'a\',\'b\'];3 i=q?[7.b(),7.a()]:[7.a(),7.b()];3 n=/([0-9]+)%/.U(6);j(n)6=T(n[1],S)/Q*i[5==\'h\'?0:1];j(5==\'d\')7.r(g?{a:0,b:6}:{a:6,b:0});3 k={},l={};k[p[0]]=5==\'d\'?i[0]:6;l[p[1]]=5==\'d\'?i[1]:0;7.s(k,e,o.c.v).s(l,e,o.c.v,f(){j(5==\'h\')4.h();$.8.L(4,m);$.8.N(4);j(o.t)o.t.O(4[0],P);4.R()})})}})(K);',57,57,'|||var|el|mode|size|wrapper|effects||height|width|options|show|duration|function|horizFirst|hide|distance|if|animation1|animation2|props|percent||ref|widthFirst|css|animate|callback|this|easing|return|speeds|save|createWrapper|fold|fx|_default|queue|top|overflow|setMode|position|left|15|jQuery|restore|hidden|removeWrapper|apply|arguments|100|dequeue|10|parseInt|exec'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.highlight.packed.js b/themes/default/js/ui/packed/effects.highlight.packed.js
new file mode 100644
index 000000000..523849a2e
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.highlight.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.4.n=6(o){q 8.i(6(){2 1=$(8),a=[\'m\',\'7\',\'j\'];2 3=$.4.r(1,o.b.3||\'c\');2 e=o.b.e||"#t";2 h=1.l("7");$.4.s(1,a);1.c();1.l({m:\'p\',7:e});2 9={7:h};5(3=="d")9[\'j\']=0;1.D(9,{i:G,g:o.g,f:o.b.f,u:6(){5(3=="d")1.d();$.4.E(1,a);5(3=="c"&&$.F.B)8.A.w(\'v\');5(o.k)o.k.x(8,y);1.z()}})})}})(C);',43,43,'|el|var|mode|effects|if|function|backgroundColor|this|animation|props|options|show|hide|color|easing|duration|oldColor|queue|opacity|callback|css|backgroundImage|highlight||none|return|setMode|save|ffff99|complete|filter|removeAttribute|apply|arguments|dequeue|style|msie|jQuery|animate|restore|browser|false'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.pulsate.packed.js b/themes/default/js/ui/packed/effects.pulsate.packed.js
new file mode 100644
index 000000000..895b7b22d
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.pulsate.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(a($){$.k.x=a(o){y g.p(a(){c 3=$(g);c f=$.k.B(3,o.6.f||\'n\');c b=o.6.b||5;c 4=o.4?o.4/2:$.j.s.t/2;d(f==\'h\')b--;d(3.v(\':u\')){3.r(\'7\',0);3.n();3.9({7:1},4,o.6.8);b=b-2}A(c i=0;i<b;i++){3.9({7:0},4,o.6.8).9({7:1},4,o.6.8)};d(f==\'h\'){3.9({7:0},4,o.6.8,a(){3.h();d(o.e)o.e.q(g,m)})}z{3.9({7:0},4,o.6.8).9({7:1},4,o.6.8,a(){d(o.e)o.e.q(g,m)})};3.p(\'j\',a(){3.l()});3.l()})}})(w);',38,38,'|||el|duration||options|opacity|easing|animate|function|times|var|if|callback|mode|this|hide||fx|effects|dequeue|arguments|show||queue|apply|css|speeds|_default|hidden|is|jQuery|pulsate|return|else|for|setMode'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.scale.packed.js b/themes/default/js/ui/packed/effects.scale.packed.js
new file mode 100644
index 000000000..8ec5fb862
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.scale.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h($){$.a.1b=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'r\');7 f=O(o.5.f,10)||1a;5.W=G;7 c={9:2.9(),8:2.8()};7 6=f/z;2.3=(d==\'r\')?c:{9:c.9*6,8:c.8*6};5.3=2.3;5.f=(d==\'r\')?f:z;5.d=d;2.t(\'i\',5,o.v,o.I);2.P()})};$.a.i=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'t\');7 f=O(o.5.f,10)||(O(o.5.f,10)==0?0:(d==\'r\'?0:z));7 F=o.5.F||\'w\';7 q=o.5.q;e(d!=\'t\'){5.q=q||[\'15\',\'16\'];5.m=G}7 c={9:2.9(),8:2.8()};2.3=o.5.3||(d==\'L\'?{9:0,8:0}:c);7 6={y:F!=\'17\'?(f/z):1,x:F!=\'18\'?(f/z):1};2.4={9:c.9*6.y,8:c.8*6.x};e(o.5.W){e(d==\'L\'){2.3.s=0;2.4.s=1};e(d==\'r\'){2.3.s=1;2.4.s=0}};5.3=2.3;5.4=2.4;5.d=d;2.t(\'Z\',5,o.v,o.I);2.P()})};$.a.Z=h(o){K p.J(h(){7 2=$(p),j=[\'T\',\'E\',\'C\',\'8\',\'9\',\'D\',\'s\'];7 M=[\'T\',\'E\',\'C\',\'D\',\'s\'];7 H=[\'8\',\'9\',\'D\'];7 u=[\'13\'];7 k=[\'12\',\'14\',\'11\',\'19\'];7 l=[\'1g\',\'1s\',\'1o\',\'1u\'];7 d=$.a.N(2,o.5.d||\'t\');7 m=o.5.m||S;7 i=o.5.i||\'w\';7 q=o.5.q;7 c={9:2.9(),8:2.8()};2.3=o.5.3||c;2.4=o.5.4||c;e(q){7 A=$.a.1p(q,c);2.3.E=(c.9-2.3.9)*A.y;2.3.C=(c.8-2.3.8)*A.x;2.4.E=(c.9-2.4.9)*A.y;2.4.C=(c.8-2.4.8)*A.x};7 6={3:{y:2.3.9/c.9,x:2.3.8/c.8},4:{y:2.4.9/c.9,x:2.4.8/c.8}};e(i==\'1q\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(k);2.3=$.a.g(2,k,6.3.y,2.3);2.4=$.a.g(2,k,6.4.y,2.4)};e(6.3.x!=6.4.x){j=j.n(l);2.3=$.a.g(2,l,6.3.x,2.3);2.4=$.a.g(2,l,6.4.x,2.4)}};e(i==\'Y\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(u);2.3=$.a.g(2,u,6.3.y,2.3);2.4=$.a.g(2,u,6.4.y,2.4)}};$.a.V(2,m?j:M);2.L();$.a.1r(2);2.R(\'D\',\'1t\').R(2.3);e(i==\'Y\'||i==\'w\'){k=k.n([\'1m\',\'1c\']).n(u);l=l.n([\'1f\',\'1e\']);H=j.n(k).n(l);2.1d("*[8]").1h(h(){b=$(p);e(m)$.a.V(b,H);7 B={9:b.9(),8:b.8()};b.3={9:B.9*6.3.y,8:B.8*6.3.x};b.4={9:B.9*6.4.y,8:B.8*6.4.x};e(6.3.y!=6.4.y){b.3=$.a.g(b,k,6.3.y,b.3);b.4=$.a.g(b,k,6.4.y,b.4)};e(6.3.x!=6.4.x){b.3=$.a.g(b,l,6.3.x,b.3);b.4=$.a.g(b,l,6.4.x,b.4)};b.R(b.3);b.U(b.4,o.v,o.5.Q,h(){e(m)$.a.m(b,H)})})};2.U(2.4,{J:S,v:o.v,Q:o.5.Q,1i:h(){e(d==\'r\')2.r();$.a.m(2,m?j:M);$.a.1l(2);e(o.I)o.I.1k(p,1j);2.P()}})})}})(1n);',62,93,'||el|from|to|options|factor|var|width|height|effects|child|original|mode|if|percent|setTransition|function|scale|props|vProps|hProps|restore|concat||this|origin|hide|opacity|effect|cProps|duration|both|||100|baseline|c_original|left|overflow|top|direction|true|props2|callback|queue|return|show|props1|setMode|parseInt|dequeue|easing|css|false|position|animate|save|fade|extend|content|size||paddingTop|borderTopWidth|fontSize|borderBottomWidth|middle|center|horizontal|vertical|paddingBottom|150|puff|marginBottom|find|marginRight|marginLeft|borderLeftWidth|each|complete|arguments|apply|removeWrapper|marginTop|jQuery|paddingLeft|getBaseline|box|createWrapper|borderRightWidth|hidden|paddingRight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.shake.packed.js b/themes/default/js/ui/packed/effects.shake.packed.js
new file mode 100644
index 000000000..27087ba2c
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.shake.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(c($){$.6.z=c(o){y n.p(c(){4 0=$(n),m=[\'x\',\'s\',\'e\'];4 v=$.6.G(0,o.5.v||\'D\');4 8=o.5.8||\'e\';4 b=o.5.b||F;4 l=o.5.l||3;4 7=o.t||o.5.t||E;$.6.B(0,m);0.A();$.6.w(0);4 f=(8==\'r\'||8==\'C\')?\'s\':\'e\';4 g=(8==\'r\'||8==\'e\')?\'h\':\'N\';4 d={},j={},k={};d[f]=(g==\'h\'?\'-=\':\'+=\')+b;j[f]=(g==\'h\'?\'+=\':\'-=\')+b*2;k[f]=(g==\'h\'?\'-=\':\'+=\')+b*2;0.a(d,7,o.5.9);M(4 i=1;i<l;i++){0.a(j,7,o.5.9).a(k,7,o.5.9)};0.a(j,7,o.5.9).a(d,7/2,o.5.9,c(){ $.6.L(0,m);$.6.I(0);K(o.u)o.u.P(n,O)});0.p(\'H\',c(){0.q()});0.q()})}})(J);',52,52,'el||||var|options|effects|speed|direction|easing|animate|distance|function|animation|left|ref|motion|pos||animation1|animation2|times|props|this||queue|dequeue|up|top|duration|callback|mode|createWrapper|position|return|shake|show|save|down|effect|140|20|setMode|fx|removeWrapper|jQuery|if|restore|for|neg|arguments|apply'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.slide.packed.js b/themes/default/js/ui/packed/effects.slide.packed.js
new file mode 100644
index 000000000..c4559bfd8
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.slide.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(b($){$.2.y=b(o){z h.p(b(){1 0=$(h),e=[\'A\',\'f\',\'a\'];1 4=$.2.B(0,o.7.4||\'c\');1 3=o.7.3||\'a\';$.2.x(0,e);0.c();$.2.s(0).n({t:\'u\'});1 9=(3==\'k\'||3==\'w\')?\'f\':\'a\';1 8=(3==\'k\'||3==\'a\')?\'6\':\'D\';1 5=o.7.5||(9==\'f\'?0.M({j:m}):0.J({j:m}));d(4==\'c\')0.n(9,8==\'6\'?-5:5);1 g={};g[9]=(4==\'c\'?(8==\'6\'?\'+=\':\'-=\'):(8==\'6\'?\'-=\':\'+=\'))+5;0.F(g,{p:I,q:o.q,r:o.7.r,L:b(){d(4==\'i\')0.i();$.2.v(0,e);$.2.G(0);d(o.l)o.l.H(h,E);0.C()}})})}})(K);',49,49,'el|var|effects|direction|mode|distance|pos|options|motion|ref|left|function|show|if|props|top|animation|this|hide|margin|up|callback|true|css||queue|duration|easing|createWrapper|overflow|hidden|restore|down|save|slide|return|position|setMode|dequeue|neg|arguments|animate|removeWrapper|apply|false|outerWidth|jQuery|complete|outerHeight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.transfer.packed.js b/themes/default/js/ui/packed/effects.transfer.packed.js
new file mode 100644
index 000000000..284fcf37b
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.transfer.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.f.4=6(o){q d.r(6(){s 1=$(d),5=$(o.7.u),8=5.e(),i={3:8.3,2:8.2,h:5.a(),b:5.g()},9=1.e(),4=$(\'<c k="m-f-4"></c>\').t(v.D).E(o.7.F).B({3:9.3,2:9.2,h:1.a(),b:1.g(),A:\'C\'}).G(i,o.y,o.7.x,6(){4.w();(o.j&&o.j.l(1[0],n));1.p()})})}})(z);',43,43,'|elem|left|top|transfer|target|function|options|endPosition|startPosition|innerHeight|width|div|this|offset|effects|innerWidth|height|animation|callback|class|apply|ui|arguments||dequeue|return|queue|var|appendTo|to|document|remove|easing|duration|jQuery|position|css|absolute|body|addClass|className|animate'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.accordion.packed.js b/themes/default/js/ui/packed/ui.accordion.packed.js
new file mode 100644
index 000000000..bf3a65504
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.accordion.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(9($){$.1c("4.c",{2M:9(){g o=3.5,N=3;3.W=0;8(o.y==$.4.c.1U.y&&o.1l!=$.4.c.1U.1l){o.y=!o.1l}8(o.2e){g Y=3.u.x("a").17(o.2t);8(Y.P){8(Y.17(o.w).P){3.6=Y}1e{3.6=Y.U().U().1I();Y.l("4-c-F-6")}}}3.u.l("4-c 4-1c 4-Z-1d");8(3.u[0].36=="2O"){3.u.2g("1B").l("4-c-1B-2S")}3.f=3.u.x(o.w).l("4-c-w 4-Z-1d 4-n-19 4-q-18").14("2W.c",9(){$(3).l(\'4-n-1V\')}).14("31.c",9(){$(3).z(\'4-n-1V\')}).14("1o.c",9(){$(3).l(\'4-n-1o\')}).14("2n.c",9(){$(3).z(\'4-n-1o\')});3.f.r().l("4-c-F 4-Z-1d 4-1c-F 4-q-2b");3.6=3.1L(3.6||o.6).X("4-n-19").X("4-n-6").X("4-q-18").X("4-q-1j");3.6.r().l(\'4-c-F-6\');$("<2U/>").l("4-Q "+o.E.w).2V(3.f);3.6.x(".4-Q").X(o.E.w).X(o.E.1g);8($.1v.1N){3.u.x(\'a\').j(\'2P\',\'1\')}3.26();3.u.p(\'12\',\'2Q\');3.f.p(\'12\',\'2R\').14(\'2X\',9(k){m N.28(k)}).r().p(\'12\',\'2Y\');3.f.1C(3.6||"").p(\'1i-1n\',\'t\').p("R","-1").r().1y();8(!3.6.P){3.f.1J(0).p(\'R\',\'0\')}1e{3.6.p(\'1i-1n\',\'13\').p(\'R\',\'0\')}8(!$.1v.34)3.f.x(\'a\').p(\'R\',\'-1\');8(o.k){3.f.14((o.k)+".c",9(k){m N.1z.32(N,k,3)})}},2Z:9(){g o=3.5;3.u.z("4-c 4-1c 4-Z-1d").11("12").2d(\'.c\').30(\'c\');3.f.2d(".c").z("4-c-w 4-Z-1d 4-n-19 4-q-18 4-n-6 4-q-1j").11("12").11("1i-1n").11("2f");3.f.x("a").11("2f");3.f.2g(".4-Q").2B();g 29=3.f.r().j("2C","").11("12").z("4-Z-1d 4-1c-F 4-q-2b 4-c-F 4-c-F-6");8(o.O||o.2N){29.j("v","")}},2a:9(1H,1s){8(1H==\'1l\'){1H=\'y\';1s=!1s}$.1c.2J.2a.2x(3,2v)},28:9(k){g o=3.5,I=$.4.I;8(o.2j||k.2I||k.33)m;g P=3.f.P;g 1P=3.f.1m(k.L);g 1a=t;3d(k.I){16 I.3t:16 I.3u:1a=3.f[(1P+1)%P];27;16 I.3s:16 I.37:1a=3.f[(1P-1+P)%P];27;16 I.3p:16 I.3v:m 3.1z({L:k.L},k.L)}8(1a){$(k.L).p(\'R\',\'-1\');$(1a).p(\'R\',\'0\');1a.1o();m t}m 13},26:9(){g o=3.5,T;8(o.1x){8($.1v.1N){g 2c=3.u.U().j(\'C\');3.u.U().j(\'C\',\'1R\')}T=3.u.U().v();8($.1v.1N){3.u.U().j(\'C\',2c)}3.f.1t(9(){T-=$(3).24()});g 1w=0;3.f.r().1t(9(){1w=1E.1G(1w,$(3).3c()-$(3).v())}).v(1E.1G(0,T-1w)).j(\'C\',\'3n\')}1e 8(o.O){T=0;3.f.r().1t(9(){T=1E.1G(T,$(3).24())}).v(T)}},3a:9(1m){g 6=3.1L(1m)[0];3.1z({L:6},6)},1L:9(1b){m 1b?39 1b=="3e"?3.f.17(":1J("+1b+")"):3.f.1C(3.f.1C(1b)):1b===t?$([]):3.f.17(":1J(0)")},1z:9(k,L){g o=3.5;8(o.2j)m t;8(!k.L&&o.y){3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');g h=3.6.r(),H={5:o,20:$([]),23:o.6,21:$([]),1Y:h},b=(3.6=$([]));3.1Q(b,h,H);m t}g S=$(k.3k||L);g D=S[0]==3.6[0];8(3.W||(!o.y&&D)){m t}3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');8(!D){S.z("4-n-19 4-q-18").l("4-n-6 4-q-1j").x(".4-Q").z(o.E.w).l(o.E.1g);S.r().l(\'4-c-F-6\')}g b=S.r(),h=3.6.r(),H={5:o,20:D&&o.y?$([]):S,23:3.6,21:D&&o.y?$([]):b.x(\'> *\'),1Y:h.x(\'> *\')},G=3.f.1m(3.6[0])>3.f.1m(S[0]);3.6=D?$([]):S;3.1Q(b,h,H,D,G);m t},1Q:9(b,h,H,D,G){g o=3.5,N=3;3.b=b;3.h=h;3.H=H;g J=9(){8(!N)m;m N.2u.2x(N,2v)};3.2k("3h",1O,3.H);3.W=h.1q()===0?b.1q():h.1q();8(o.1k){g 15={};8(o.y&&D){15={b:$([]),h:h,J:J,G:G,O:o.O||o.1x}}1e{15={b:b,h:h,J:J,G:G,O:o.O||o.1x}}8(!o.1h){o.1h=o.1k}8(!o.1f){o.1f=o.A}o.1k=$.2w(o.1h)?o.1h(15):o.1h;o.A=$.2w(o.1f)?o.1f(15):o.1f;g V=$.4.c.V,A=o.A,B=o.1k;8(!V[B]){V[B]=9(5){3.1r(5,{B:B,A:A||1Z})}}V[B](15)}1e{8(o.y&&D){b.3l()}1e{h.1y();b.1M()}J(13)}h.1I().p(\'1i-1n\',\'t\').p("R","-1").2n();b.1I().p(\'1i-1n\',\'13\').p("R","0").1o()},2u:9(2l){g o=3.5;3.W=2l?0:--3.W;8(3.W)m;8(o.2r){3.b.3b(3.h).j({v:"",C:""})}3.2k(\'3m\',1O,3.H)}});$.2s($.4.c,{3y:"1.7.2",1U:{6:1O,1l:13,1k:\'1r\',O:13,2r:t,y:t,k:"2G",1x:t,w:"> 1B > :2L-2F,> :1C(1B):2E",E:{w:"4-Q-2y-1-e",1g:"4-Q-2y-1-s"},2e:t,2t:9(){m 3.2o.2p()==35.2o.2p()}},V:{1r:9(5,2q){5=$.2s({B:"2h",A:2H},5,2q);8(!5.h.1q()){5.b.1F({v:"1M"},5);m}8(!5.b.1q()){5.h.1F({v:"1y"},5);m}g C=5.b.j(\'C\'),1K,1A={},1D={},2m=["v","3w","3q"],1T;g s=5.b;1T=s[0].2i.1u;s.1u(1p(s.U().1u(),10)-1p(s.j("3A"),10)-1p(s.j("3z"),10)-(1p(s.j("3x"),10)||0)-(1p(s.j("3f"),10)||0));$.1t(2m,9(i,M){1D[M]=\'1y\';g 1S=(\'\'+$.j(5.b[0],M)).3j(/^([\\d+-.]+)(.*)$/);1A[M]={1s:1S[1],25:1S[2]||\'3r\'}});5.b.j({v:0,C:\'1R\'}).1M();5.h.17(":1R").1t(5.J).1W().17(":3g").1F(1D,{3i:9(22,K){8(K.M==\'v\'){1K=(K.22-K.1X)/(K.1W-K.1X)}5.b[0].2i[K.M]=(1K*1A[K.M].1s)+1A[K.M].25},A:5.A,B:5.B,J:9(){8(!5.O){5.b.j("v","")}5.b.j("1u",1T);5.b.j({C:C});5.J()}})},3o:9(5){3.1r(5,{B:5.G?"2K":"2h",A:5.G?2z:2A})},2D:9(5){3.1r(5,{B:"2T",A:1Z})}}})})(38);',62,223,'|||this|ui|options|active||if|function||toShow|accordion|||headers|var|toHide||css|event|addClass|return|state||attr|corner|next||false|element|height|header|find|collapsible|removeClass|duration|easing|overflow|clickedIsActive|icons|content|down|data|keyCode|complete|settings|target|prop|self|autoHeight|length|icon|tabIndex|clicked|maxHeight|parent|animations|running|toggleClass|current|helper||removeAttr|role|true|bind|animOptions|case|filter|all|default|toFocus|selector|widget|reset|else|proxiedDuration|headerSelected|proxied|aria|top|animated|alwaysOpen|index|expanded|focus|parseInt|size|slide|value|each|width|browser|maxPadding|fillSpace|hide|_clickHandler|showProps|li|not|hideProps|Math|animate|max|key|prev|eq|percentDone|_findActive|show|msie|null|currentIndex|_toggle|hidden|parts|originalWidth|defaults|hover|end|start|oldContent|700|newHeader|newContent|now|oldHeader|outerHeight|unit|resize|break|_keydown|contents|_setData|bottom|defOverflow|unbind|navigation|tabindex|children|swing|style|disabled|_trigger|cancel|fxAttrs|blur|href|toLowerCase|additions|clearStyle|extend|navigationFilter|_completed|arguments|isFunction|apply|triangle|1000|200|remove|display|easeslide|even|child|click|300|altKey|prototype|easeOutBounce|first|_init|fillHeight|UL|zoom|tablist|tab|fix|easeinout|span|prependTo|mouseenter|keydown|tabpanel|destroy|removeData|mouseleave|call|ctrlKey|safari|location|nodeName|UP|jQuery|typeof|activate|add|innerHeight|switch|number|borderRightWidth|visible|changestart|step|match|currentTarget|toggle|change|auto|bounceslide|SPACE|paddingBottom|px|LEFT|RIGHT|DOWN|ENTER|paddingTop|borderLeftWidth|version|paddingRight|paddingLeft'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.core.packed.js b/themes/default/js/ui/packed/ui.core.packed.js
new file mode 100644
index 000000000..eab7ba37c
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.core.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';22.w||(6($){h 2u=$.15.1l,2k=$.G.4g&&(42($.G.2g)<1.9);$.w={2g:"1.7.2",1F:{1J:6(2h,1c,q){h 1i=$.w[2h].J;1w(h i 2Y q){1i.1k[i]=1i.1k[i]||[];1i.1k[i].2Z([1c,q[i]])}},L:6(n,d,z){h q=n.1k[d];e(!q||!n.f[0].2T){c}1w(h i=0;i<q.Q;i++){e(n.g[q[i][0]]){q[i][1].O(n.f,z)}}}},2f:6(a,b){c 1a.2i?a.2i(b)&16:a!==b&&a.2f(b)},3G:6(N,a){e($(N).V(\'I\')==\'24\'){c o}h H=(a&&a==\'1D\')?\'3E\':\'3D\',1p=o;e(N[H]>0){c E}N[H]=1;1p=(N[H]>0);N[H]=0;c 1p},1A:6(x,1s,2a){c(x>1s)&&(x<(1s+2a))},3s:6(y,x,2b,1D,2c,2j){c $.w.1A(y,2b,2c)&&$.w.1A(x,1D,2j)},3q:{3r:8,3n:20,3h:3g,3i:17,3l:46,3t:40,3u:35,3C:13,3F:27,3B:36,3A:45,3v:37,3y:3z,3H:2N,2R:2P,2Q:2S,2M:2O,3e:3a,31:34,3b:33,3c:3d,30:39,2V:16,2W:32,2X:9,3w:38}};e(2k){h m=$.m,12=$.15.12,1z="4k://4m.4i.4h/3I/4d/1t",M=/^1q-/,2r=/^2q:/;$.m=6(S,d,l){h q=l!==1C;c(d==\'4c\'?(q?m.L(4,S,d,"2q:"+l):(m.O(4,1f)||"").1d(2r,"")):(M.t(d)?(q?S.4o(1z,d.1d(M,"1t:"),l):m.L(4,S,d.1d(M,"1t:"))):m.O(4,1f)))};$.15.12=6(d){c(M.t(d)?4.1o(6(){4.4v(1z,d.1d(M,""))}):12.L(4,d))}}$.15.19({1l:6(){$("*",4).1J(4).1o(6(){$(4).4u("1l")});c 2u.O(4,1f)},4t:6(){c 4.m(\'11\',\'4p\').V(\'29\',\'\').1e(\'2l.w\')},4q:6(){c 4.m(\'11\',\'2z\').V(\'29\',\'4r\').B(\'2l.w\',6(){c o})},U:6(){h U;e(($.G.1h&&(/(4s|2m)/).t(4.V(\'1n\')))||(/2n/).t(4.V(\'1n\'))){U=4.1m().1L(6(){c(/(2m|2n|1X)/).t($.F(4,\'1n\',1))&&(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}4b{U=4.1m().1L(6(){c(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}c(/1X/).t(4.V(\'1n\'))||!U.Q?$(1a):U}});$.19($.3L[\':\'],{A:6(S,i,1Y){c!!$.A(S,1Y[3])},21:6(f){h T=f.T.3U(),P=$.m(f,\'23\');c(/3V|47|48|2L|49/.t(T)?!f.r:\'a\'==T||\'25\'==T?f.3X||!1v(P):!1v(P))&&!$(f)[\'25\'==T?\'1m\':\'3Z\'](\':24\').Q},4z:6(f){h P=$.m(f,\'23\');c(1v(P)||P>=0)&&$(f).3P(\':21\')}});6 1y(j,1F,2J,z){6 1x(C){h D=$[j][1F][C]||[];c(Z D==\'18\'?D.1u(/,?\\s+/):D)}h D=1x(\'1y\');e(z.Q==1&&Z z[0]==\'18\'){D=D.4l(1x(\'2G\'))}c($.2U(2J,D)!=-1)}$.10=6(d,J){h j=d.1u(".")[0];d=d.1u(".")[1];$.15[d]=6(g){h W=(Z g==\'18\'),z=3O.J.44.L(1f,1);e(W&&g.3Y(0,1)==\'3W\'){c 4}e(W&&1y(j,d,g,z)){h n=$.A(4[0],d);c(n?n[g].O(n,z):1C)}c 4.1o(6(){h n=$.A(4,d);(!n&&!W&&$.A(4,d,3N $[j][d](4,g)).2E());(n&&W&&$.2x(n[g])&&n[g].O(n,z))})};$[j]=$[j]||{};$[j][d]=6(f,g){h p=4;4.j=j;4.v=d;4.1r=$[j][d].3K||d;4.1E=j+\'-\'+d;4.g=$.19({},$.10.1b,$[j][d].1b,$.2w&&$.2w.3T(f)[d],g);4.f=$(f).B(\'3S.\'+d,6(5,k,l){e(5.R==f){c p.14(k,l)}}).B(\'3Q.\'+d,6(5,k){e(5.R==f){c p.1B(k)}}).B(\'1l\',6(){c p.2B()})};$[j][d].J=$.19({},$.10.J,J);$[j][d].2G=\'1c\'};$.10.J={2E:6(){},2B:6(){4.f.4y(4.v).2K(4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').12(\'1q-r\')},1c:6(k,l){h g=k,p=4;e(Z k=="18"){e(l===1C){c 4.1B(k)}g={};g[k]=l}$.1o(g,6(k,l){p.14(k,l)})},1B:6(k){c 4.g[k]},14:6(k,l){4.g[k]=l;e(k==\'r\'){4.f[l?\'4j\':\'2K\'](4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').m("1q-r",l)}},3m:6(){4.14(\'r\',o)},3k:6(){4.14(\'r\',E)},3x:6(C,5,A){h 1O=4.g[C],2o=(C==4.1r?C:4.1r+C);5=$.3R(5);5.C=2o;e(5.K){1w(h i=$.5.2A.Q,1g;i;){1g=$.5.2A[--i];5[1g]=5.K[1g]}}4.f.3f(5,A);c!($.2x(1O)&&1O.L(4.f[0],5,A)===o||5.3p())}};$.10.1b={r:o};$.w.2d={3o:6(){h p=4;4.f.B(\'4e.\'+4.v,6(5){c p.2y(5)}).B(\'4f.\'+4.v,6(5){e(p.1K){p.1K=o;5.4n();c o}});e($.G.1h){4.2D=4.f.m(\'11\');4.f.m(\'11\',\'2z\')}4.4w=o},4x:6(){4.f.1e(\'.\'+4.v);($.G.1h&&4.f.m(\'11\',4.2D))},2y:6(5){5.K=5.K||{};e(5.K.2H){c}(4.u&&4.Y(5));4.X=5;h p=4,2v=(5.4a==1),2C=(Z 4.g.1H=="18"?$(5.R).1m().1J(5.R).1L(4.g.1H).Q:o);e(!2v||2C||!4.2s(5)){c E}4.1j=!4.g.1Q;e(!4.1j){4.3M=43(6(){p.1j=E},4.g.1Q)}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(5)!==o);e(!4.u){5.1T();c E}}4.1S=6(5){c p.2I(5)};4.1G=6(5){c p.Y(5)};$(1a).B(\'1Z.\'+4.v,4.1S).B(\'26.\'+4.v,4.1G);($.G.41||5.1T());5.K.2H=E;c E},2I:6(5){e($.G.1h&&!5.2L){c 4.Y(5)}e(4.u){4.1M(5);c 5.1T()}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(4.X,5)!==o);(4.u?4.1M(5):4.Y(5))}c!4.u},Y:6(5){$(1a).1e(\'1Z.\'+4.v,4.1S).1e(\'26.\'+4.v,4.1G);e(4.u){4.u=o;4.1K=(5.R==4.X.R);4.2p(5)}c o},1N:6(5){c(1R.3J(1R.1V(4.X.28-5.28),1R.1V(4.X.1U-5.1U))>=4.g.2e)},1P:6(5){c 4.1j},1I:6(5){},1M:6(5){},2p:6(5){},2s:6(5){c E}};$.w.2d.1b={1H:3j,2e:1,1Q:0}})(22);',62,284,'||||this|event|function||||||return|name|if|element|options|var||namespace|key|value|attr|instance|false|self|set|disabled||test|_mouseStarted|widgetName|ui|||args|data|bind|type|methods|true|curCSS|browser|scroll|overflow|prototype|originalEvent|call|ariaState|el|apply|tabIndex|length|target|elem|nodeName|scrollParent|css|isMethodCall|_mouseDownEvent|_mouseUp|typeof|widget|unselectable|removeAttr||_setData|fn|||string|extend|document|defaults|option|replace|unbind|arguments|prop|msie|proto|mouseDelayMet|plugins|remove|parents|position|each|has|aria|widgetEventPrefix|reference|aaa|split|isNaN|for|getMethods|getter|ariaNS|isOverAxis|_getData|undefined|left|widgetBaseClass|plugin|_mouseUpDelegate|cancel|_mouseStart|add|_preventClickEvent|filter|_mouseDrag|_mouseDistanceMet|callback|_mouseDelayMet|delay|Math|_mouseMoveDelegate|preventDefault|pageY|abs|eq|fixed|match|mousemove||focusable|jQuery|tabindex|hidden|area|mouseup||pageX|MozUserSelect|size|top|height|mouse|distance|contains|version|module|compareDocumentPosition|width|isFF2|selectstart|relative|absolute|eventName|_mouseStop|wairole|ariaRole|_mouseCapture|auto|_remove|btnIsLeft|metadata|isFunction|_mouseDown|on|props|destroy|elIsCancel|_mouseUnselectable|_init|state|getterSetter|mouseHandled|_mouseMove|method|removeClass|button|NUMPAD_MULTIPLY|110|106|111|NUMPAD_ENTER|NUMPAD_DIVIDE|108|parentNode|inArray|SHIFT|SPACE|TAB|in|push|RIGHT|PAGE_DOWN|||||||||109|PAGE_UP|PERIOD|190|NUMPAD_SUBTRACT|trigger|188|COMMA|CONTROL|null|disable|DELETE|enable|CAPS_LOCK|_mouseInit|isDefaultPrevented|keyCode|BACKSPACE|isOver|DOWN|END|LEFT|UP|_trigger|NUMPAD_ADD|107|INSERT|HOME|ENTER|scrollTop|scrollLeft|ESCAPE|hasScroll|NUMPAD_DECIMAL|2005|max|eventPrefix|expr|_mouseDelayTimer|new|Array|is|getData|Event|setData|get|toLowerCase|input|_|href|substring|closest||safari|parseFloat|setTimeout|slice|||select|textarea|object|which|else|role|07|mousedown|click|mozilla|org|w3|addClass|http|concat|www|stopImmediatePropagation|setAttributeNS|off|disableSelection|none|static|enableSelection|triggerHandler|removeAttributeNS|started|_mouseDestroy|removeData|tabbable'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.datepicker.packed.js b/themes/default/js/ui/packed/ui.datepicker.packed.js
new file mode 100644
index 000000000..3aa592136
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.datepicker.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(p($){$.3i($.n,{f:{5a:"1.7.2"}});c 1X=\'f\';p 3J(){b.7c=B;b.2W=v;b.4L=B;b.2t=[];b.2X=B;b.2Y=B;b.5p=\'n-f-1h\';b.4T=\'n-f-1j\';b.7x=\'n-f-2c\';b.4V=\'n-f-2n\';b.5y=\'n-f-86\';b.84=\'n-f-2i\';b.5E=\'n-f-4f\';b.5G=\'n-f-7B-N\';b.4M=\'n-f-83-8g-7O\';b.5u=[];b.5u[\'\']={7d:\'7Q\',2d:\'7V\',29:\'7M\',2O:\'7L\',1p:[\'8h\',\'8F\',\'8E\',\'8S\',\'7I\',\'8o\',\'8I\',\'8t\',\'8v\',\'8m\',\'8C\',\'7Z\'],1q:[\'7S\',\'82\',\'81\',\'8M\',\'7I\',\'7P\',\'8D\',\'8P\',\'8u\',\'8j\',\'8i\',\'8l\'],1B:[\'8L\',\'8G\',\'8H\',\'7W\',\'7U\',\'7Y\',\'7R\'],1I:[\'85\',\'87\',\'8n\',\'8q\',\'8w\',\'8s\',\'8B\'],58:[\'8a\',\'8c\',\'8K\',\'8z\',\'7X\',\'8y\',\'8x\'],3h:\'4y/3F/2S\',1o:0,Z:B};b.1t={2U:\'2E\',1U:\'5l\',5h:{},1O:v,3V:\'\',2K:\'...\',3I:\'\',7m:B,3P:B,3D:B,5A:B,3a:B,3e:B,48:B,6C:\'-10:+10\',3r:B,5N:b.56,1E:\'+10\',P:v,T:v,1e:\'8r\',4k:v,4a:v,2H:v,6z:v,45:v,6n:1,4i:0,1Z:1,2P:12,41:\'\',4w:\'\',6K:1l,4A:B};$.3i(b.1t,b.5u[\'\']);b.O=$(\'<1h L="\'+b.5p+\'" R="n-f n-3A n-3A-5J n-50-5I n-1W-1N n-50-4K-8A"></1h>\')}$.3i(3J.74,{21:\'8O\',6a:p(){h(b.7c)8R.6a.2z(\'\',3w)},89:p(z){4j(b.1t,z||{});t b},6L:p(l,z){c 3y=v;1m(c 4v 6Y b.1t){c 4B=l.88(\'k:\'+4v);h(4B){3y=3y||{};5P{3y[4v]=8k(4B)}6b(7w){3y[4v]=4B}}}c 18=l.18.4d();c 1j=(18==\'1h\'||18==\'15\');h(!l.L)l.L=\'6j\'+(++b.5V);c 8=b.5e($(l),1j);8.z=$.3i({},z||{},3y||{});h(18==\'r\'){b.7y(l,8)}Q h(1j){b.6u(l,8)}},5e:p(l,1j){c L=l[0].L.80(/([:\\[\\]\\.])/g,\'\\\\\\\\$1\');t{L:L,r:l,1L:0,1u:0,1z:0,I:0,K:0,1j:1j,O:(!1j?b.O:$(\'<1h R="\'+b.4T+\' n-f n-3A n-3A-5J n-50-5I n-1W-1N"></1h>\'))}},7y:p(l,8){c r=$(l);8.2c=$([]);8.2n=$([]);h(r.2I(b.21))t;c 3V=b.q(8,\'3V\');c Z=b.q(8,\'Z\');h(3V){8.2c=$(\'<15 R="\'+b.7x+\'">\'+3V+\'</15>\');r[Z?\'7A\':\'7J\'](8.2c)}c 2U=b.q(8,\'2U\');h(2U==\'2E\'||2U==\'7n\')r.2E(b.3C);h(2U==\'1H\'||2U==\'7n\'){c 2K=b.q(8,\'2K\');c 3I=b.q(8,\'3I\');8.2n=$(b.q(8,\'7m\')?$(\'<4S/>\').2e(b.4V).7e({5Q:3I,7f:2K,2x:2K}):$(\'<1H 2V="1H"></1H>\').2e(b.4V).1v(3I==\'\'?2K:$(\'<4S/>\').7e({5Q:3I,7f:2K,2x:2K})));r[Z?\'7A\':\'7J\'](8.2n);8.2n.8e(p(){h($.f.2X&&$.f.3B==l)$.f.2m();Q $.f.3C(l);t B})}r.2e(b.21).5q(b.4D).6G(b.5s).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8)},6u:p(l,8){c 5f=$(l);h(5f.2I(b.21))t;5f.2e(b.21).2c(8.O).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8);b.65(8,b.54(8));b.2w(8);b.4F(8)},8p:p(r,72,2H,z,3G){c 8=b.6V;h(!8){c L=\'6j\'+(++b.5V);b.2l=$(\'<r 2V="8N" L="\'+L+\'" 2k="1" 8Q="20: 4U; 1x: -7D;"/>\');b.2l.5q(b.4D);$(\'2r\').2c(b.2l);8=b.6V=b.5e(b.2l,B);8.z={};$.2o(b.2l[0],1X,8)}4j(8.z,z||{});b.2l.2R(72);b.1F=(3G?(3G.1f?3G:[3G.8J,3G.8T]):v);h(!b.1F){c 76=4c.6e||1g.2J.57||1g.2r.57;c 6J=4c.6D||1g.2J.4Y||1g.2r.4Y;c 6T=1g.2J.4l||1g.2r.4l;c 6I=1g.2J.43||1g.2r.43;b.1F=[(76/2)-3d+6T,(6J/2)-7N+6I]}b.2l.1Y(\'1r\',b.1F[0]+\'4z\').1Y(\'1x\',b.1F[1]+\'4z\');8.z.2H=2H;b.2Y=1l;b.O.2e(b.5y);b.3C(b.2l[0]);h($.3Y)$.3Y(b.O);$.2o(b.2l[0],1X,8);t b},7T:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();$.8b(l,1X);h(18==\'r\'){8.2c.5b();8.2n.5b();$l.2B(b.21).4G(\'2E\',b.3C).4G(\'5q\',b.4D).4G(\'6G\',b.5s)}Q h(18==\'1h\'||18==\'15\')$l.2B(b.21).6X()},8d:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=B;8.2n.4J(\'1H\').3Z(p(){b.2i=B}).30().4J(\'4S\').1Y({6M:\'1.0\',6R:\'\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2B(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)})},8f:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=1l;8.2n.4J(\'1H\').3Z(p(){b.2i=1l}).30().4J(\'4S\').1Y({6M:\'0.5\',6R:\'2a\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2e(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)});b.2t[b.2t.1f]=l},3X:p(l){h(!l){t B}1m(c i=0;i<b.2t.1f;i++){h(b.2t[i]==l)t 1l}t B},1s:p(l){5P{t $.2o(l,1X)}6b(7w){3O\'7v 9c 2o 1m b f\'}},6N:p(l,V,G){c 8=b.1s(l);h(3w.1f==2&&1J V==\'3m\'){t(V==\'9Y\'?$.3i({},$.f.1t):(8?(V==\'1N\'?$.3i({},8.z):b.q(8,V)):v))}c z=V||{};h(1J V==\'3m\'){z={};z[V]=G}h(8){h(b.2W==8){b.2m(v)}c k=b.6Q(l);4j(8.z,z);b.6P(l,k);b.2w(8)}},9H:p(l,V,G){b.6N(l,V,G)},9G:p(l){c 8=b.1s(l);h(8){b.2w(8)}},6P:p(l,k,3N){c 8=b.1s(l);h(8){b.65(8,k,3N);b.2w(8);b.4F(8)}},6Q:p(l){c 8=b.1s(l);h(8&&!8.1j)b.5i(8);t(8?b.5K(8):v)},4D:p(u){c 8=$.f.1s(u.l);c 2h=1l;c Z=8.O.9F(\'.n-f-6c\');8.4L=1l;h($.f.2X)3H(u.5v){x 9:$.f.2m(v,\'\');F;x 13:c 5g=$(\'2C.\'+$.f.4M+\', 2C.\'+$.f.5G,8.O);h(5g[0])$.f.5F(u.l,8.1u,8.1z,5g[0]);Q $.f.2m(v,$.f.q(8,\'1e\'));t B;F;x 27:$.f.2m(v,$.f.q(8,\'1e\'));F;x 33:$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 34:$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 35:h(u.1k||u.1T)$.f.7l(u.l);2h=u.1k||u.1T;F;x 36:h(u.1k||u.1T)$.f.5M(u.l);2h=u.1k||u.1T;F;x 37:h(u.1k||u.1T)$.f.1K(u.l,(Z?+1:-1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 38:h(u.1k||u.1T)$.f.1K(u.l,-7,\'D\');2h=u.1k||u.1T;F;x 39:h(u.1k||u.1T)$.f.1K(u.l,(Z?-1:+1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 40:h(u.1k||u.1T)$.f.1K(u.l,+7,\'D\');2h=u.1k||u.1T;F;2a:2h=B}Q h(u.5v==36&&u.1k)$.f.3C(b);Q{2h=B}h(2h){u.9D();u.9E()}},5s:p(u){c 8=$.f.1s(u.l);h($.f.q(8,\'6K\')){c 2q=$.f.70($.f.q(8,\'3h\'));c 5d=9J.9K(u.6U==5S?u.5v:u.6U);t u.1k||(5d<\' \'||!2q||2q.42(5d)>-1)}},3C:p(r){r=r.l||r;h(r.18.4d()!=\'r\')r=$(\'r\',r.9Q)[0];h($.f.3X(r)||$.f.3B==r)t;c 8=$.f.1s(r);c 4a=$.f.q(8,\'4a\');4j(8.z,(4a?4a.2z(r,[r,8]):{}));$.f.2m(v,\'\');$.f.3B=r;$.f.5i(8);h($.f.2Y)r.G=\'\';h(!$.f.1F){$.f.1F=$.f.6B(r);$.f.1F[1]+=r.9M}c 2s=B;$(r).5o().3Z(p(){2s|=$(b).1Y(\'20\')==\'71\';t!2s});h(2s&&$.3k.9N){$.f.1F[0]-=1g.2J.4l;$.f.1F[1]-=1g.2J.43}c J={1r:$.f.1F[0],1x:$.f.1F[1]};$.f.1F=v;8.2j=v;8.O.1Y({20:\'4U\',6W:\'9L\',1x:\'-9O\'});$.f.2w(8);J=$.f.6h(8,J,2s);8.O.1Y({20:($.f.2Y&&$.3Y?\'9P\':(2s?\'71\':\'4U\')),6W:\'9R\',1r:J.1r+\'4z\',1x:J.1x+\'4z\'});h(!8.1j){c 1U=$.f.q(8,\'1U\')||\'5l\';c 1e=$.f.q(8,\'1e\');c 2N=p(){$.f.2X=1l;h($.3k.66&&1A($.3k.5a,10)<7)$(\'4I.n-f-60\').1Y({26:8.O.26()+4,3L:8.O.3L()+4})};h($.4E&&$.4E[1U])8.O.5l(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[1U](1e,2N);h(1e==\'\')2N();h(8.r[0].2V!=\'4K\')8.r[0].2E();$.f.2W=8}},2w:p(8){c 5m={26:8.O.26()+4,3L:8.O.3L()+4};c 6E=b;8.O.6X().2c(b.7u(8)).4b(\'4I.n-f-60\').1Y({26:5m.26,3L:5m.3L}).30().4b(\'1H, .n-f-2g, .n-f-2f, .n-f-59 2C a\').3t(\'9C\',p(){$(b).2B(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2B(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2B(\'n-f-2f-3f\')}).3t(\'6k\',p(){h(!6E.3X(8.1j?8.O.9I()[0]:8.r[0])){$(b).5o(\'.n-f-59\').4b(\'a\').2B(\'n-1y-3f\');$(b).2e(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2e(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2e(\'n-f-2f-3f\')}}).30().4b(\'.\'+b.4M+\' a\').2n(\'6k\').30();c 1c=b.53(8);c 4X=1c[1];c 26=17;h(4X>1){8.O.2e(\'n-f-3T-\'+4X).1Y(\'26\',(26*4X)+\'9T\')}Q{8.O.2B(\'n-f-3T-2 n-f-3T-3 n-f-3T-4\').26(\'\')}8.O[(1c[0]!=1||1c[1]!=1?\'6i\':\'5b\')+\'6g\'](\'n-f-3T\');8.O[(b.q(8,\'Z\')?\'6i\':\'5b\')+\'6g\'](\'n-f-6c\');h(8.r&&8.r[0].2V!=\'4K\'&&8==$.f.2W)$(8.r[0]).2E()},6h:p(8,J,2s){c 4n=8.O.6d();c 4Q=8.O.6f();c 6q=8.r?8.r.6d():0;c 5z=8.r?8.r.6f():0;c 4R=(4c.6e||1g.2J.57||1g.2r.57)+$(1g).4l();c 4N=(4c.6D||1g.2J.4Y||1g.2r.4Y)+$(1g).43();J.1r-=(b.q(8,\'Z\')?(4n-6q):0);J.1r-=(2s&&J.1r==8.r.J().1r)?$(1g).4l():0;J.1x-=(2s&&J.1x==(8.r.J().1x+5z))?$(1g).43():0;J.1r-=(J.1r+4n>4R&&4R>4n)?22.6A(J.1r+4n-4R):0;J.1x-=(J.1x+4Q>4N&&4N>4Q)?22.6A(J.1x+4Q+5z*2-4N):0;t J},6B:p(3b){2Q(3b&&(3b.2V==\'4K\'||3b.9V!=1)){3b=3b.a2}c 20=$(3b).J();t[20.1r,20.1x]},2m:p(r,1e){c 8=b.2W;h(!8||(r&&8!=$.2o(r,1X)))t;h(8.3M)b.51(\'#\'+8.L,b.3W(8,8.1w,8.24,8.1V));8.3M=B;h(b.2X){1e=(1e!=v?1e:b.q(8,\'1e\'));c 1U=b.q(8,\'1U\');c 2N=p(){$.f.5x(8)};h(1e!=\'\'&&$.4E&&$.4E[1U])8.O.5k(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[(1e==\'\'?\'5k\':(1U==\'a4\'?\'a3\':(1U==\'a5\'?\'a1\':\'5k\')))](1e,2N);h(1e==\'\')b.5x(8);c 45=b.q(8,\'45\');h(45)45.2z((8.r?8.r[0]:v),[(8.r?8.r.2R():\'\'),8]);b.2X=B;b.3B=v;h(b.2Y){b.2l.1Y({20:\'4U\',1r:\'0\',1x:\'-7D\'});h($.3Y){$.9Z();$(\'2r\').2c(b.O)}}b.2Y=B}b.2W=v},5x:p(8){8.O.2B(b.5y).4G(\'.n-f-59\')},75:p(u){h(!$.f.2W)t;c $l=$(u.l);h(($l.5o(\'#\'+$.f.5p).1f==0)&&!$l.2I($.f.21)&&!$l.2I($.f.4V)&&$.f.2X&&!($.f.2Y&&$.3Y))$.f.2m(v,\'\')},1K:p(L,J,1P){c l=$(L);c 8=b.1s(l[0]);h(b.3X(l[0])){t}b.4H(8,J+(1P==\'M\'?b.q(8,\'4i\'):0),1P);b.2w(8)},5M:p(L){c l=$(L);c 8=b.1s(l[0]);h(b.q(8,\'5A\')&&8.1w){8.1L=8.1w;8.I=8.1u=8.24;8.K=8.1z=8.1V}Q{c k=E C();8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U()}b.46(8);b.1K(l)},5Z:p(L,3l,1P){c l=$(L);c 8=b.1s(l[0]);8.4Z=B;8[\'4g\'+(1P==\'M\'?\'7i\':\'7h\')]=8[\'a0\'+(1P==\'M\'?\'7i\':\'7h\')]=1A(3l.23[3l.9U].G,10);b.46(8);b.1K(l)},61:p(L){c l=$(L);c 8=b.1s(l[0]);h(8.r&&8.4Z&&!$.3k.66)8.r[0].2E();8.4Z=!8.4Z},5F:p(L,H,A,2C){c l=$(L);h($(2C).2I(b.5E)||b.3X(l[0])){t}c 8=b.1s(l[0]);8.1L=8.1w=$(\'a\',2C).1v();8.1u=8.24=H;8.1z=8.1V=A;h(8.3M){8.3Q=8.55=8.1S=v}b.51(L,b.3W(8,8.1w,8.24,8.1V));h(8.3M){8.2j=b.1b(E C(8.1V,8.24,8.1w));b.2w(8)}},7l:p(L){c l=$(L);c 8=b.1s(l[0]);8.3M=B;8.3Q=8.55=8.1S=8.2j=v;b.51(l,\'\')},51:p(L,2D){c l=$(L);c 8=b.1s(l[0]);2D=(2D!=v?2D:b.3W(8));h(8.r)8.r.2R(2D);b.4F(8);c 2H=b.q(8,\'2H\');h(2H)2H.2z((8.r?8.r[0]:v),[2D,8]);Q h(8.r)8.r.2n(\'9W\');h(8.1j)b.2w(8);Q h(!8.3M){b.2m(v,b.q(8,\'1e\'));b.3B=8.r[0];h(1J(8.r[0])!=\'4q\')8.r[0].2E();b.3B=v}},4F:p(8){c 41=b.q(8,\'41\');h(41){c 4w=b.q(8,\'4w\')||b.q(8,\'3h\');c k=b.5K(8);2D=b.3x(4w,k,b.3g(8));$(41).3Z(p(){$(b).2R(2D)})}},9X:p(k){c N=k.3u();t[(N>0&&N<6),\'\']},56:p(k){c 25=E C(k.U(),k.1i(),k.16());c 3E=E C(25.U(),1-1,4);c 1o=3E.3u()||7;3E.3S(3E.16()+1-1o);h(1o<4&&25<3E){25.3S(25.16()-3);t $.f.56(25)}Q h(25>E C(25.U(),12-1,28)){1o=E C(25.U()+1,1-1,4).3u()||7;h(1o>4&&(25.3u()||7)<1o-3){t 1}}t 22.9S(((25-3E)/9A)/7)+1},6S:p(X,G,z){h(X==v||G==v)3O\'67 3w\';G=(1J G==\'4q\'?G.5R():G+\'\');h(G==\'\')t v;c 1E=(z?z.1E:v)||b.1t.1E;c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c A=-1;c H=-1;c N=-1;c 2T=-1;c 1G=B;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 3v=p(1n){1D(1n);c 5r=(1n==\'@\'?14:(1n==\'y\'?4:(1n==\'o\'?3:2)));c 2k=5r;c 2v=0;2Q(2k>0&&1M<G.1f&&G.1a(1M)>=\'0\'&&G.1a(1M)<=\'9\'){2v=2v*10+1A(G.1a(1M++),10);2k--}h(2k==5r)3O\'7v 63 5n 20 \'+1M;t 2v};c 5t=p(1n,4s,4u){c 4h=(1D(1n)?4u:4s);c 2k=0;1m(c j=0;j<4h.1f;j++)2k=22.3p(2k,4h[j].1f);c V=\'\';c 7z=1M;2Q(2k>0&&1M<G.1f){V+=G.1a(1M++);1m(c i=0;i<4h.1f;i++)h(V==4h[i])t i+1;2k--}3O\'99 V 5n 20 \'+7z};c 4x=p(){h(G.1a(1M)!=X.1a(S))3O\'98 1G 5n 20 \'+1M;1M++};c 1M=0;1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 4x();Q 3H(X.1a(S)){x\'d\':N=3v(\'d\');F;x\'D\':5t(\'D\',1I,1B);F;x\'o\':2T=3v(\'o\');F;x\'m\':H=3v(\'m\');F;x\'M\':H=5t(\'M\',1q,1p);F;x\'y\':A=3v(\'y\');F;x\'@\':c k=E C(3v(\'@\'));A=k.U();H=k.1i()+1;N=k.16();F;x"\'":h(1D("\'"))4x();Q 1G=1l;F;2a:4x()}}h(A==-1)A=E C().U();Q h(A<3d)A+=E C().U()-E C().U()%3d+(A<=1E?0:-3d);h(2T>-1){H=1;N=2T;97{c 5w=b.3n(A,H-1);h(N<=5w)F;H++;N-=5w}2Q(1l)}c k=b.1b(E C(A,H-1,N));h(k.U()!=A||k.1i()+1!=H||k.16()!=N)3O\'67 k\';t k},96:\'2S-4y-3F\',9a:\'D, 3F M 2S\',9b:\'2S-4y-3F\',9e:\'D, d M y\',9d:\'9B, 3F-M-y\',95:\'D, d M y\',94:\'D, d M 2S\',8Y:\'D, d M 2S\',8X:\'D, d M y\',8W:\'@\',8V:\'2S-4y-3F\',3x:p(X,k,z){h(!k)t\'\';c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 4p=p(1n,G,7F){c 2v=\'\'+G;h(1D(1n))2Q(2v.1f<7F)2v=\'0\'+2v;t 2v};c 5j=p(1n,G,4s,4u){t(1D(1n)?4u[G]:4s[G])};c 1R=\'\';c 1G=B;h(k)1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 1R+=X.1a(S);Q 3H(X.1a(S)){x\'d\':1R+=4p(\'d\',k.16(),2);F;x\'D\':1R+=5j(\'D\',k.3u(),1I,1B);F;x\'o\':c 2T=k.16();1m(c m=k.1i()-1;m>=0;m--)2T+=b.3n(k.U(),m);1R+=4p(\'o\',2T,3);F;x\'m\':1R+=4p(\'m\',k.1i()+1,2);F;x\'M\':1R+=5j(\'M\',k.1i(),1q,1p);F;x\'y\':1R+=(1D(\'y\')?k.U():(k.6p()%3d<10?\'0\':\'\')+k.6p()%3d);F;x\'@\':1R+=k.1d();F;x"\'":h(1D("\'"))1R+="\'";Q 1G=1l;F;2a:1R+=X.1a(S)}}t 1R},70:p(X){c 2q=\'\';c 1G=B;1m(c S=0;S<X.1f;S++)h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 2q+=X.1a(S);Q 3H(X.1a(S)){x\'d\':x\'m\':x\'y\':x\'@\':2q+=\'8U\';F;x\'D\':x\'M\':t v;x"\'":h(1D("\'"))2q+="\'";Q 1G=1l;F;2a:2q+=X.1a(S)}t 2q},q:p(8,V){t 8.z[V]!==5S?8.z[V]:b.1t[V]},5i:p(8){c 3h=b.q(8,\'3h\');c 4e=8.r?8.r.2R():v;8.3Q=8.55=8.1S=v;c k=1O=b.54(8);c z=b.3g(8);5P{k=b.6S(3h,4e,z)||1O}6b(u){b.6a(u);k=1O}8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();8.1w=(4e?k.16():0);8.24=(4e?k.1i():0);8.1V=(4e?k.U():0);b.4H(8)},54:p(8){c k=b.5c(b.q(8,\'1O\'),E C());c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);t k},5c:p(k,1O){c 7G=p(J){c k=E C();k.3S(k.16()+J);t k};c 7C=p(J,68){c k=E C();c A=k.U();c H=k.1i();c N=k.16();c 69=/([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;c 1C=69.7E(J);2Q(1C){3H(1C[2]||\'d\'){x\'d\':x\'D\':N+=1A(1C[1],10);F;x\'w\':x\'W\':N+=1A(1C[1],10)*7;F;x\'m\':x\'M\':H+=1A(1C[1],10);N=22.2u(N,68(A,H));F;x\'y\':x\'Y\':A+=1A(1C[1],10);N=22.2u(N,68(A,H));F}1C=69.7E(J)}t E C(A,H,N)};k=(k==v?1O:(1J k==\'3m\'?7C(k,b.3n):(1J k==\'63\'?(7b(k)?1O:7G(k)):k)));k=(k&&k.5R()==\'67 C\'?1O:k);h(k){k.7s(0);k.90(0);k.93(0);k.92(0)}t b.1b(k)},1b:p(k){h(!k)t v;k.7s(k.7r()>12?k.7r()+2:0);t k},65:p(8,k,3N){c 7p=!(k);c 7q=8.1u;c 7o=8.1z;k=b.5c(k,E C());8.1L=8.1w=k.16();8.I=8.1u=8.24=k.1i();8.K=8.1z=8.1V=k.U();h(7q!=8.1u||7o!=8.1z)b.46(8);b.4H(8);h(8.r){8.r.2R(7p?\'\':b.3W(8))}},5K:p(8){c 7t=(!8.1V||(8.r&&8.r.2R()==\'\')?v:b.1b(E C(8.1V,8.24,8.1w)));t 7t},7u:p(8){c 2y=E C();2y=b.1b(E C(2y.U(),2y.1i(),2y.16()));c Z=b.q(8,\'Z\');c 4A=b.q(8,\'4A\');c 3P=b.q(8,\'3P\');c 3D=b.q(8,\'3D\');c 1c=b.53(8);c 4i=b.q(8,\'4i\');c 1Z=b.q(8,\'1Z\');c 2P=b.q(8,\'2P\');c 4P=(1c[0]!=1||1c[1]!=1);c 47=b.1b((!8.1w?E C(91,9,9):E C(8.1V,8.24,8.1w)));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');c I=8.I-4i;c K=8.K;h(I<0){I+=12;K--}h(T){c 4o=b.1b(E C(T.U(),T.1i()-1c[1]+1,T.16()));4o=(P&&4o<P?P:4o);2Q(b.1b(E C(K,I,1))>4o){I--;h(I<0){I=11;K--}}}8.I=I;8.K=K;c 2d=b.q(8,\'2d\');2d=(!3D?2d:b.3x(2d,b.1b(E C(K,I-1Z,1)),b.3g(8)));c 2g=(b.5Y(8,-1,K,I)?\'<a R="n-f-2g n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', -\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\':(3P?\'\':\'<a R="n-f-2g n-1W-1N n-1y-2i" 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\'));c 29=b.q(8,\'29\');29=(!3D?29:b.3x(29,b.1b(E C(K,I+1Z,1)),b.3g(8)));c 2f=(b.5Y(8,+1,K,I)?\'<a R="n-f-2f n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', +\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\':(3P?\'\':\'<a R="n-f-2f n-1W-1N n-1y-2i" 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\'));c 2O=b.q(8,\'2O\');c 5L=(b.q(8,\'5A\')&&8.1w?47:2y);2O=(!3D?2O:b.3x(2O,5L,b.3g(8)));c 5O=(!8.1j?\'<1H 2V="1H" R="n-f-9f n-1y-2a n-7a-9g n-1W-1N" 3c="2b.f.2m();">\'+b.q(8,\'7d\')+\'</1H>\':\'\');c 6v=(4A)?\'<1h R="n-f-9u n-3A-5J">\'+(Z?5O:\'\')+(b.5X(8,5L)?\'<1H 2V="1H" R="n-f-7B n-1y-2a n-7a-3s n-1W-1N" 3c="2b.f.5M(\\\'#\'+8.L+\'\\\');"\'+\'>\'+2O+\'</1H>\':\'\')+(Z?\'\':5O)+\'</1h>\':\'\';c 1o=1A(b.q(8,\'1o\'),10);1o=(7b(1o)?0:1o);c 1B=b.q(8,\'1B\');c 1I=b.q(8,\'1I\');c 58=b.q(8,\'58\');c 1p=b.q(8,\'1p\');c 1q=b.q(8,\'1q\');c 4k=b.q(8,\'4k\');c 3r=b.q(8,\'3r\');c 5N=b.q(8,\'5N\')||b.56;c 3N=8.3Q?b.1b(E C(8.1S,8.55,8.3Q)):47;c 1O=b.54(8);c 1v=\'\';1m(c 31=0;31<1c[0];31++){c 49=\'\';1m(c 3K=0;3K<1c[1];3K++){c 2M=b.1b(E C(K,I,8.1L));c 2Z=\' n-1W-1N\';c 1Q=\'\';h(4P){1Q+=\'<1h R="n-f-49 n-f-49-\';3H(3K){x 0:1Q+=\'9t\';2Z=\' n-1W-\'+(Z?\'5H\':\'1r\');F;x 1c[1]-1:1Q+=\'9s\';2Z=\' n-1W-\'+(Z?\'1r\':\'5H\');F;2a:1Q+=\'9v\';2Z=\'\';F}1Q+=\'">\'}1Q+=\'<1h R="n-f-7g n-3A-7g n-50-5I\'+2Z+\'">\'+(/1N|1r/.7k(2Z)&&31==0?(Z?2f:2g):\'\')+(/1N|5H/.7k(2Z)&&31==0?(Z?2g:2f):\'\')+b.6r(8,I,K,P,T,2M,31>0||3K>0,1p,1q)+\'</1h><6Z R="n-f-59"><3U>\'+\'<4O>\';c 3U=\'\';1m(c 2p=0;2p<7;2p++){c N=(2p+1o)%7;3U+=\'<7j\'+((2p+1o+6)%7>=5?\' R="n-f-7K-30"\':\'\')+\'>\'+\'<15 2x="\'+1B[N]+\'">\'+58[N]+\'</15></7j>\'}1Q+=3U+\'</4O></3U><44>\';c 5C=b.3n(K,I);h(K==8.1z&&I==8.1u)8.1L=22.2u(8.1L,5C);c 5B=(b.6l(K,I)-1o+7)%7;c 7H=(4P?6:22.9w((5B+5C)/7)); c 19=b.1b(E C(K,I,1-5B));1m(c 5D=0;5D<7H;5D++){1Q+=\'<4O>\';c 44=\'\';1m(c 2p=0;2p<7;2p++){c 4m=(4k?4k.2z((8.r?8.r[0]:v),[19]):[1l,\'\']);c 3q=(19.1i()!=I);c 4f=3q||!4m[0]||(P&&19<P)||(T&&19>T);44+=\'<2C R="\'+((2p+1o+6)%7>=5?\' n-f-7K-30\':\'\')+(3q?\' n-f-9z-H\':\'\')+((19.1d()==2M.1d()&&I==8.1u&&8.4L)||(1O.1d()==19.1d()&&1O.1d()==2M.1d())?\' \'+b.4M:\'\')+(4f?\' \'+b.5E+\' n-1y-2i\':\'\')+(3q&&!3r?\'\':\' \'+4m[1]+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' \'+b.5G:\'\')+(19.1d()==2y.1d()?\' n-f-2y\':\'\'))+\'"\'+((!3q||3r)&&4m[2]?\' 2x="\'+4m[2]+\'"\':\'\')+(4f?\'\':\' 3c="2b.f.5F(\\\'#\'+8.L+\'\\\',\'+I+\',\'+K+\', b);t B;"\')+\'>\'+(3q?(3r?19.16():\'&#62;\'):(4f?\'<15 R="n-1y-2a">\'+19.16()+\'</15>\':\'<a R="n-1y-2a\'+(19.1d()==2y.1d()?\' n-1y-9y\':\'\')+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' n-1y-9x\':\'\')+\'" 9r="#">\'+19.16()+\'</a>\'))+\'</2C>\';19.3S(19.16()+1);19=b.1b(19)}1Q+=44+\'</4O>\'}I++;h(I>11){I=0;K++}1Q+=\'</44></6Z>\'+(4P?\'</1h>\'+((1c[0]>0&&3K==1c[1]-1)?\'<1h R="n-f-31-F"></1h>\':\'\'):\'\');49+=1Q}1v+=49}1v+=6v+($.3k.66&&1A($.3k.5a,10)<7&&!8.1j?\'<4I 5Q="9q:B;" R="n-f-60" 9k="0"></4I>\':\'\');8.4L=B;t 1v},6r:p(8,I,K,P,T,2M,3s,1p,1q){P=(8.2j&&P&&2M<P?2M:P);c 3a=b.q(8,\'3a\');c 3e=b.q(8,\'3e\');c 48=b.q(8,\'48\');c 1v=\'<1h R="n-f-2x">\';c 3j=\'\';h(3s||!3a)3j+=\'<15 R="n-f-H">\'+1p[I]+\'</15> \';Q{c 6s=(P&&P.U()==K);c 6x=(T&&T.U()==K);3j+=\'<3l R="n-f-H" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'M\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(c H=0;H<12;H++){h((!6s||H>=P.1i())&&(!6x||H<=T.1i()))3j+=\'<3R G="\'+H+\'"\'+(H==I?\' 4g="4g"\':\'\')+\'>\'+1q[H]+\'</3R>\'}3j+=\'</3l>\'}h(!48)1v+=3j+((3s||3a||3e)&&(!(3a&&3e))?\'&#62;\':\'\');h(3s||!3e)1v+=\'<15 R="n-f-A">\'+K+\'</15>\';Q{c 2L=b.q(8,\'6C\').9j(\':\');c A=0;c 1S=0;h(2L.1f!=2){A=K-10;1S=K+10}Q h(2L[0].1a(0)==\'+\'||2L[0].1a(0)==\'-\'){A=K+1A(2L[0],10);1S=K+1A(2L[1],10)}Q{A=1A(2L[0],10);1S=1A(2L[1],10)}A=(P?22.3p(A,P.U()):A);1S=(T?22.2u(1S,T.U()):1S);1v+=\'<3l R="n-f-A" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'Y\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(;A<=1S;A++){1v+=\'<3R G="\'+A+\'"\'+(A==K?\' 4g="4g"\':\'\')+\'>\'+A+\'</3R>\'}1v+=\'</3l>\'}h(48)1v+=(3s||3a||3e?\'&#62;\':\'\')+3j;1v+=\'</1h>\';t 1v},4H:p(8,J,1P){c A=8.K+(1P==\'Y\'?J:0);c H=8.I+(1P==\'M\'?J:0);c N=22.2u(8.1L,b.3n(A,H))+(1P==\'D\'?J:0);c k=b.1b(E C(A,H,N));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();h(1P==\'M\'||1P==\'Y\')b.46(8)},46:p(8){c 64=b.q(8,\'6z\');h(64)64.2z((8.r?8.r[0]:v),[8.1z,8.1u+1,8])},53:p(8){c 1c=b.q(8,\'6n\');t(1c==v?[1,1]:(1J 1c==\'63\'?[1,1c]:1c))},2A:p(8,6o,6m){c k=b.5c(b.q(8,6o+\'C\'),v);t(!6m||!8.2j?k:(!k||8.2j>k?8.2j:k))},3n:p(A,H){t 32-E C(A,H,32).16()},6l:p(A,H){t E C(A,H,1).3u()},5Y:p(8,J,6y,78){c 1c=b.53(8);c k=b.1b(E C(6y,78+(J<0?J:1c[1]),1));h(J<0)k.3S(b.3n(k.U(),k.1i()));t b.5X(8,k)},5X:p(8,k){c 3o=(!8.2j?v:b.1b(E C(8.1z,8.1u,8.1L)));3o=(3o&&8.2j<3o?8.2j:3o);c P=3o||b.2A(8,\'2u\');c T=b.2A(8,\'3p\');t((!P||k>=P)&&(!T||k<=T))},3g:p(8){c 1E=b.q(8,\'1E\');1E=(1J 1E!=\'3m\'?1E:E C().U()%3d+1A(1E,10));t{1E:1E,1I:b.q(8,\'1I\'),1B:b.q(8,\'1B\'),1q:b.q(8,\'1q\'),1p:b.q(8,\'1p\')}},3W:p(8,N,H,A){h(!N){8.1w=8.1L;8.24=8.1u;8.1V=8.1z}c k=(N?(1J N==\'4q\'?N:b.1b(E C(A,H,N))):b.1b(E C(8.1V,8.24,8.1w)));t b.3x(b.q(8,\'3h\'),k,b.3g(8))}});p 4j(l,3z){$.3i(l,3z);1m(c V 6Y 3z)h(3z[V]==v||3z[V]==5S)l[V]=3z[V];t l};p 9i(a){t(a&&(($.3k.9h&&1J a==\'4q\'&&a.1f)||(a.77&&a.77.5R().1n(/\\73\\(\\)/))))};$.9l.f=p(23){h(!$.f.5W){$(1g).9m($.f.75).4b(\'2r\').2c($.f.O);$.f.5W=1l}c 4W=73.74.9p.9o(3w,1);h(1J 23==\'3m\'&&(23==\'9n\'||23==\'16\'))t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));h(23==\'3R\'&&3w.1f==2&&1J 3w[1]==\'3m\')t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));t b.3Z(p(){1J 23==\'3m\'?$.f[\'5T\'+23+\'3J\'].2z($.f,[b].5U(4W)):$.f.6L(b,23)})};$.f=E 3J();$.f.5W=B;$.f.5V=E C().1d();$.f.5a="1.7.2";4c.2b=$})(8Z);',62,626,'||||||||inst|||this|var|||datepicker||if|||date|target||ui||function|_get|input||return|event|null||case||settings|year|false|Date||new|break|value|month|drawMonth|offset|drawYear|id||day|dpDiv|minDate|else|class|iFormat|maxDate|getFullYear|name||format||isRTL||||||span|getDate||nodeName|printDate|charAt|_daylightSavingAdjust|numMonths|getTime|duration|length|document|div|getMonth|inline|ctrlKey|true|for|match|firstDay|monthNames|monthNamesShort|left|_getInst|_defaults|selectedMonth|html|currentDay|top|state|selectedYear|parseInt|dayNames|matches|lookAhead|shortYearCutoff|_pos|literal|button|dayNamesShort|typeof|_adjustDate|selectedDay|iValue|all|defaultDate|period|calender|output|endYear|metaKey|showAnim|currentYear|corner|PROP_NAME|css|stepMonths|position|markerClassName|Math|options|currentMonth|checkDate|width|||nextText|default|DP_jQuery|append|prevText|addClass|next|prev|handled|disabled|rangeStart|size|_dialogInput|_hideDatepicker|trigger|data|dow|chars|body|isFixed|_disabledInputs|min|num|_updateDatepicker|title|today|apply|_getMinMaxDate|removeClass|td|dateStr|focus|icon|key|onSelect|hasClass|documentElement|buttonText|years|selectedDate|postProcess|currentText|stepBigMonths|while|val|yy|doy|showOn|type|_curInst|_datepickerShowing|_inDialog|cornerClass|end|row|||||||||changeMonth|obj|onclick|100|changeYear|hover|_getFormatConfig|dateFormat|extend|monthHtml|browser|select|string|_getDaysInMonth|newMinDate|max|otherMonth|showOtherMonths|secondary|bind|getDay|getNumber|arguments|formatDate|inlineSettings|props|widget|_lastInput|_showDatepicker|navigationAsDateFormat|firstMon|dd|pos|switch|buttonImage|Datepicker|col|height|stayOpen|endDate|throw|hideIfNoPrevNext|endDay|option|setDate|multi|thead|appendText|_formatDate|_isDisabledDatepicker|blockUI|each||altField|indexOf|scrollTop|tbody|onClose|_notifyChange|currentDate|showMonthAfterYear|group|beforeShow|find|window|toLowerCase|dates|unselectable|selected|names|showCurrentAtPos|extendRemove|beforeShowDay|scrollLeft|daySettings|dpWidth|maxDraw|formatNumber|object|children|shortNames|circle|longNames|attrName|altFormat|checkLiteral|mm|px|showButtonPanel|attrValue|triangle|_doKeyDown|effects|_updateAlternate|unbind|_adjustInstDate|iframe|filter|hidden|_keyEvent|_dayOverClass|viewHeight|tr|isMultiMonth|dpHeight|viewWidth|img|_inlineClass|absolute|_triggerClass|otherArgs|cols|clientHeight|_selectingMonthYear|helper|_selectDate|className|_getNumberOfMonths|_getDefaultDate|endMonth|iso8601Week|clientWidth|dayNamesMin|calendar|version|remove|_determineDate|chr|_newInst|divSpan|sel|showOptions|_setDateFromField|formatName|hide|show|dims|at|parents|_mainDivId|keydown|origSize|_doKeyPress|getName|regional|keyCode|dim|_tidyDialog|_dialogClass|inputHeight|gotoCurrent|leadDays|daysInMonth|dRow|_unselectableClass|_selectDay|_currentClass|right|clearfix|content|_getDate|gotoDate|_gotoToday|calculateWeek|controls|try|src|toString|undefined|_|concat|uuid|initialized|_isInRange|_canAdjustMonth|_selectMonthYear|cover|_clickMonthYear|xa0|number|onChange|_setDate|msie|Invalid|getDaysInMonth|pattern|log|catch|rtl|outerWidth|innerWidth|outerHeight|Class|_checkOffset|add|dp|mouseover|_getFirstDayOfMonth|checkRange|numberOfMonths|minMax|getYear|inputWidth|_generateMonthYearHeader|inMinYear|setData|_inlineDatepicker|buttonPanel|getData|inMaxYear|curYear|onChangeMonthYear|abs|_findPos|yearRange|innerHeight|self|originalEvent|keypress|altKey|scrollY|browserHeight|constrainInput|_attachDatepicker|opacity|_optionDatepicker|map|_setDateDatepicker|_getDateDatepicker|cursor|parseDate|scrollX|charCode|_dialogInst|display|empty|in|table|_possibleChars|fixed|dateText|Array|prototype|_checkExternalClick|browserWidth|constructor|curMonth|onchange|priority|isNaN|debug|closeText|attr|alt|header|Year|Month|th|test|_clearDate|buttonImageOnly|both|origYear|clear|origMonth|getHours|setHours|startDate|_generateHTML|Missing|err|_appendClass|_connectDatepicker|iInit|before|current|offsetString|100px|exec|len|offsetNumeric|numRows|May|after|week|Today|Next|150|over|Jun|Done|Saturday|Jan|_destroyDatepicker|Thursday|Prev|Wednesday|Th|Friday|December|replace|Mar|Feb|days|_disableClass|Sun|dialog|Mon|getAttribute|setDefaults|Su|removeData|Mo|_enableDatepicker|click|_disableDatepicker|cell|January|Nov|Oct|eval|Dec|October|Tue|June|_dialogDatepicker|Wed|normal|Fri|August|Sep|September|Thu|Sa|Fr|We|accessible|Sat|November|Jul|March|February|Monday|Tuesday|July|pageX|Tu|Sunday|Apr|text|hasDatepicker|Aug|style|console|April|pageY|0123456789|W3C|TIMESTAMP|RSS|RFC_2822|jQuery|setMinutes|9999|setMilliseconds|setSeconds|RFC_1123|RFC_1036|ATOM|do|Unexpected|Unknown|COOKIE|ISO_8601|instance|RFC_850|RFC_822|close|primary|safari|isArray|split|frameborder|fn|mousedown|isDisabled|call|slice|javascript|href|last|first|buttonpane|middle|ceil|active|highlight|other|86400000|DD|mouseout|preventDefault|stopPropagation|is|_refreshDatepicker|_changeDatepicker|parent|String|fromCharCode|block|offsetHeight|opera|1000px|static|parentNode|none|floor|em|selectedIndex|nodeType|change|noWeekends|defaults|unblockUI|draw|fadeOut|nextSibling|slideUp|slideDown|fadeIn'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.dialog.packed.js b/themes/default/js/ui/packed/ui.dialog.packed.js
new file mode 100644
index 000000000..cd10d9f1b
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.dialog.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){g 1O={26:"1L.F",16:"16.F",2e:"1H.F",1e:"1e.m",N:"N.m",1o:"1o.m",1n:"1n.m",2f:"1L.m",B:"16.m",2g:"1H.m"},1X=\'4-5 \'+\'4-E \'+\'4-E-H \'+\'4-1F-1K \';$.E("4.5",{3G:8(){3.1z=3.j.D(\'A\');g d=3,6=3.6,A=6.A||3.1z||\'&2G;\',1Q=$.4.5.36(3.j),9=(3.9=$(\'<12/>\')).I(l.T).U().p(1X+6.1r).u({1t:\'3H\',3I:\'3D\',18:6.18}).D(\'3O\',-1).u(\'3f\',0).2p(8(c){(6.2u&&c.W&&c.W==$.4.W.2C&&d.O(c))}).D({2N:\'5\',\'3q-3v\':1Q}).2m(8(c){d.20(C,c)}),3c=3.j.1u().3L(\'A\').p(\'4-5-H \'+\'4-E-H\').I(9),10=(3.10=$(\'<12></12>\')).p(\'4-5-1Z \'+\'4-E-3j \'+\'4-1F-1K \'+\'4-2K-2D\').2M(9),17=$(\'<a 3e="#"/>\').p(\'4-5-1Z-O \'+\'4-1F-1K\').D(\'2N\',\'1G\').14(8(){17.p(\'4-J-14\')},8(){17.X(\'4-J-14\')}).x(8(){17.p(\'4-J-x\')}).2E(8(){17.X(\'4-J-x\')}).2m(8(2W){2W.3t()}).2j(8(c){d.O(c);o C}).I(10),1S=(3.1S=$(\'<2O/>\')).p(\'4-1J \'+\'4-1J-3u\').1R(6.2n).I(17),3s=$(\'<2O/>\').p(\'4-5-A\').D(\'37\',1Q).2J(A).2M(10);10.1h("*").1j(10).3p();(6.F&&$.15.F&&3.2k());(6.m&&$.15.m&&3.2i());3.1U(6.Y);3.1l=C;(6.Z&&$.15.Z&&9.Z());(6.3b&&3.24())},Q:8(){(3.b&&3.b.Q());3.9.U();3.j.2t(\'.5\').3n(\'5\').X(\'4-5-H 4-E-H\').U().I(\'T\');3.9.2s();(3.1z&&3.j.D(\'A\',3.1z))},O:8(c){g d=3;h(C===d.1c(\'3r\',c)){o}(d.b&&d.b.Q());d.9.2t(\'2l.4-5\');(d.6.U?d.9.U(d.6.U,8(){d.1c(\'O\',c)}):d.9.U()&&d.1c(\'O\',c));$.4.5.b.B();d.1l=C;h(d.6.1b){g i=0;$(\'.4-5\').1k(8(){h(3!=d.9[0]){i=M.L(i,$(3).u(\'z-1E\'))}});$.4.5.i=i}},35:8(){o 3.1l},20:8(2Q,c){h((3.6.1b&&!2Q)||(!3.6.34&&!3.6.1b)){o 3.1c(\'x\',c)}h(3.6.18>$.4.5.i){$.4.5.i=3.6.18}(3.b&&3.b.$y.u(\'z-1E\',$.4.5.b.i=++$.4.5.i));g 2R={2d:3.j.D(\'2d\'),28:3.j.D(\'28\')};3.9.u(\'z-1E\',++$.4.5.i);3.j.D(2R);3.1c(\'x\',c)},24:8(){h(3.1l){o}g 6=3.6,9=3.9;3.b=6.1b?3g $.4.5.b(3):1v;(9.3d().1B&&9.I(\'T\'));3.2z();3.2x(6.1t);9.1u(6.1u);3.20(R);(6.1b&&9.1y(\'2l.4-5\',8(c){h(c.W!=$.4.W.3l){o}g 21=$(\':22\',3),11=21.23(\':11\')[0],1D=21.23(\':1D\')[0];h(c.2o==1D&&!c.2V){2w(8(){11.x()},1)}13 h(c.2o==11&&c.2V){2w(8(){1D.x()},1)}}));$([]).1j(9.1h(\'.4-5-H :22:11\')).1j(9.1h(\'.4-5-25 :22:11\')).1j(9).23(\':11\').x();3.1c(\'24\');3.1l=R},1U:8(Y){g d=3,1W=C,1Y=$(\'<12></12>\').p(\'4-5-25 \'+\'4-E-H \'+\'4-2K-2D\');3.9.1h(\'.4-5-25\').2s();(2y Y==\'3R\'&&Y!==1v&&$.1k(Y,8(){o!(1W=R)}));h(1W){$.1k(Y,8(2A,15){$(\'<1G 3V="1G"></1G>\').p(\'4-J-2h \'+\'4-1F-1K\').1R(2A).2j(8(){15.S(d.j[0],P)}).14(8(){$(3).p(\'4-J-14\')},8(){$(3).X(\'4-J-14\')}).x(8(){$(3).p(\'4-J-x\')}).2E(8(){$(3).X(\'4-J-x\')}).I(1Y)});1Y.I(3.9)}},2k:8(){g d=3,6=3.6,27;3.9.F({2S:\'.4-5-H\',3J:\'.4-5-1Z\',3B:\'l\',1L:8(){27=6.f;$(3).f($(3).f()).p("4-5-2H");(6.26&&6.26.S(d.j[0],P))},16:8(){(6.16&&6.16.S(d.j[0],P))},1H:8(){$(3).X("4-5-2H").f(27);(6.2e&&6.2e.S(d.j[0],P));$.4.5.b.B()}})},2i:8(V){V=(V===3C?3.6.m:V);g d=3,6=3.6,39=2y V==\'2B\'?V:\'n,e,s,w,1V,3E,3F,3o\';3.9.m({2S:\'.4-5-H\',3x:3.j,1o:6.1o,1e:6.1e,1n:6.1n,N:6.N,1L:8(){$(3).p("4-5-2Y");(6.2f&&6.2f.S(d.j[0],P))},B:8(){(6.B&&6.B.S(d.j[0],P))},V:39,1H:8(){$(3).X("4-5-2Y");6.f=$(3).f();6.k=$(3).k();(6.2g&&6.2g.S(d.j[0],P));$.4.5.b.B()}}).1h(\'.4-m-1V\').p(\'4-1J 4-1J-3M-3N-1V\')},2x:8(q){g 1p=$(1f),2c=$(l),G=2c.2d(),19=2c.28(),2Z=G;h($.2L(q,[\'1m\',\'1q\',\'29\',\'2b\',\'1N\'])>=0){q=[q==\'29\'||q==\'1N\'?q:\'1m\',q==\'1q\'||q==\'2b\'?q:\'1T\']}h(q.2a!=3k){q=[\'1m\',\'1T\']}h(q[0].2a==38){19+=q[0]}13{1P(q[0]){r\'1N\':19+=0;v;r\'29\':19+=1p.k()-3.9.30();v;2h:r\'1m\':19+=(1p.k()-3.9.30())/2}}h(q[1].2a==38){G+=q[1]}13{1P(q[1]){r\'1q\':G+=0;v;r\'2b\':G+=1p.f()-3.9.31();v;2h:r\'1T\':G+=(1p.f()-3.9.31())/2}}G=M.L(G,2Z);3.9.u({1q:G,1N:19})},3a:8(1x,t){(1O[1x]&&3.9.2T(1O[1x],t));1P(1x){r"Y":3.1U(t);v;r"2n":3.1S.1R(t);v;r"1r":3.9.X(3.6.1r).p(1X+t);v;r"F":(t?3.2k():3.9.F(\'Q\'));v;r"f":3.9.f(t);v;r"1t":3.2x(t);v;r"m":g 9=3.9,1M=3.9.3h(\':2T(m)\');(1M&&!t&&9.m(\'Q\'));(1M&&2y t==\'2B\'&&9.m(\'3U\',\'V\',t));(1M||3.2i(t));v;r"A":$(".4-5-A",3.10).2J(t||\'&2G;\');v;r"k":3.9.k(t);v}$.E.2P.3a.S(3,P)},2z:8(){g 6=3.6;3.j.u({f:0,N:0,k:\'1d\'});g 2v=3.9.u({f:\'1d\',k:6.k}).f();3.j.u({N:M.L(6.N-2v,0),f:6.f==\'1d\'?\'1d\':M.L(6.f-2v,0)})}});$.2r($.4.5,{2q:"1.7.2",3m:{3b:R,Z:C,Y:{},2u:R,2n:\'O\',1r:\'\',F:R,U:1v,f:\'1d\',1e:C,1o:C,N:33,1n:33,1b:C,1t:\'1m\',m:R,1u:1v,34:R,A:\'\',k:3i,18:3W},3P:\'35\',32:0,i:0,36:8($y){o\'4-5-A-\'+($y.D(\'37\')||++3.32)},b:8(5){3.$y=$.4.5.b.2I(5)}});$.2r($.4.5.b,{K:[],i:0,2F:$.3S(\'x,2m,3A,2p,2l,2j\'.3y(\',\'),8(c){o c+\'.5-b\'}).3z(\' \'),2I:8(5){h(3.K.1B===0){2w(8(){h($.4.5.b.K.1B){$(l).1y($.4.5.b.2F,8(c){g 2X=$(c.2o).3T(\'.4-5\').u(\'18\')||0;o(2X>$.4.5.b.i)})}},1);$(l).1y(\'2p.5-b\',8(c){(5.6.2u&&c.W&&c.W==$.4.W.2C&&5.O(c))});$(1f).1y(\'B.5-b\',$.4.5.b.B)}g $y=$(\'<12></12>\').I(l.T).p(\'4-E-b\').u({k:3.k(),f:3.f()});(5.6.Z&&$.15.Z&&$y.Z());3.K.3Q($y);o $y},Q:8($y){3.K.3w($.2L(3.K,$y),1);h(3.K.1B===0){$([l,1f]).2t(\'.5-b\')}$y.2s();g i=0;$.1k(3.K,8(){i=M.L(i,3.u(\'z-1E\'))});3.i=i},f:8(){h($.1A.2U&&$.1A.2q<7){g 1i=M.L(l.1w.1i,l.T.1i);g 1C=M.L(l.1w.1C,l.T.1C);h(1i<1C){o $(1f).f()+\'1a\'}13{o 1i+\'1a\'}}13{o $(l).f()+\'1a\'}},k:8(){h($.1A.2U&&$.1A.2q<7){g 1g=M.L(l.1w.1g,l.T.1g);g 1I=M.L(l.1w.1I,l.T.1I);h(1g<1I){o $(1f).k()+\'1a\'}13{o 1g+\'1a\'}}13{o $(l).k()+\'1a\'}},B:8(){g $1s=$([]);$.1k($.4.5.b.K,8(){$1s=$1s.1j(3)});$1s.u({k:0,f:0}).u({k:$.4.5.b.k(),f:$.4.5.b.f()})}});$.2r($.4.5.b.2P,{Q:8(){$.4.5.b.Q(3.$y)}})})(3K);',62,245,'|||this|ui|dialog|options||function|uiDialog||overlay|event|self||height|var|if|maxZ|element|width|document|resizable||return|addClass|pos|case||value|css|break||focus|el||title|resize|false|attr|widget|draggable|pTop|content|appendTo|state|instances|max|Math|minHeight|close|arguments|destroy|true|apply|body|hide|handles|keyCode|removeClass|buttons|bgiframe|uiDialogTitlebar|first|div|else|hover|fn|drag|uiDialogTitlebarClose|zIndex|pLeft|px|modal|_trigger|auto|maxHeight|window|scrollWidth|find|scrollHeight|add|each|_isOpen|center|minWidth|maxWidth|wnd|top|dialogClass|overlays|position|show|null|documentElement|key|bind|originalTitle|browser|length|offsetHeight|last|index|corner|button|stop|offsetWidth|icon|all|start|isResizable|left|setDataSwitch|switch|titleId|text|uiDialogTitlebarCloseText|middle|_createButtons|se|hasButtons|uiDialogClasses|uiDialogButtonPane|titlebar|moveToTop|tabbables|tabbable|filter|open|buttonpane|dragStart|heightBeforeDrag|scrollLeft|right|constructor|bottom|doc|scrollTop|dragStop|resizeStart|resizeStop|default|_makeResizable|click|_makeDraggable|keypress|mousedown|closeText|target|keydown|version|extend|remove|unbind|closeOnEscape|nonContentHeight|setTimeout|_position|typeof|_size|name|string|ESCAPE|clearfix|blur|events|nbsp|dragging|create|html|helper|inArray|prependTo|role|span|prototype|force|saveScroll|cancel|data|msie|shiftKey|ev|dialogZ|resizing|minTop|outerWidth|outerHeight|uuid|150|stack|isOpen|getTitleId|id|Number|resizeHandles|_setData|autoOpen|uiDialogContent|next|href|outline|new|is|300|header|Array|TAB|defaults|removeData|nw|disableSelection|aria|beforeclose|uiDialogTitle|stopPropagation|closethick|labelledby|splice|alsoResize|split|join|mouseup|containment|undefined|hidden|sw|ne|_init|absolute|overflow|handle|jQuery|removeAttr|grip|diagonal|tabIndex|getter|push|object|map|parents|option|type|1000'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.draggable.packed.js b/themes/default/js/ui/packed/ui.draggable.packed.js
new file mode 100644
index 000000000..e2ddd379e
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.draggable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(m($){$.2H("9.q",$.1C({},$.9.3U,{3Z:m(){8(4.j.n==\'2v\'&&!(/^(?:r|a|f)/).1T(4.A.s("C")))4.A[0].1D.C=\'F\';(4.j.3c&&4.A.2f("9-q"));(4.j.1O&&4.A.2f("9-q-1O"));4.3I()},3N:m(){8(!4.A.G(\'q\'))E;4.A.4o("q").4h(".q").2L("9-q"+" 9-q-2r"+" 9-q-1O");4.3G()},33:m(c){h o=4.j;8(4.n||o.1O||$(c.2d).4b(\'.9-4f-15\'))E z;4.15=4.35(c);8(!4.15)E z;E K},34:m(c){h o=4.j;4.n=4.2Z(c);4.2e();8($.9.18)$.9.18.44=4;4.2J();4.Q=4.n.s("C");4.u=4.n.u();4.g=4.A.g();4.g={6:4.g.6-4.D.6,5:4.g.5-4.D.5};$.1C(4.g,{w:{5:c.O-4.g.5,6:c.P-4.g.6},I:4.2Q(),F:4.2l()});4.2t=4.2m(c);4.2h=c.O;4.2j=c.P;8(o.2u)4.32(o.2u);8(o.v)4.2O();4.11("1h",c);4.2e();8($.9.18&&!o.2y)$.9.18.31(4,c);4.n.2f("9-q-2r");4.2g(c,K);E K},2g:m(c,2X){4.C=4.2m(c);4.1k=4.12("1b");8(!2X){h 9=4.1I();4.11(\'1w\',c,9);4.C=9.C}8(!4.j.T||4.j.T!="y")4.n[0].1D.5=4.C.5+\'1Z\';8(!4.j.T||4.j.T!="x")4.n[0].1D.6=4.C.6+\'1Z\';8($.9.18)$.9.18.1w(4,c);E z},2F:m(c){h Z=z;8($.9.18&&!4.j.2y)Z=$.9.18.3F(4,c);8(4.Z){Z=4.Z;4.Z=z}8((4.j.1f=="3v"&&!Z)||(4.j.1f=="3q"&&Z)||4.j.1f===K||($.30(4.j.1f)&&4.j.1f.1U(4.A,Z))){h 1P=4;$(4.n).47(4.2t,H(4.j.2U,10),m(){1P.11("1u",c);1P.2a()})}14{4.11("1u",c);4.2a()}E z},35:m(c){h 15=!4.j.15||!$(4.j.15,4.A).25?K:z;$(4.j.15,4.A).3s("*").3t().1i(m(){8(4==c.2d)15=K});E 15},2Z:m(c){h o=4.j;h n=$.30(o.n)?$(o.n.3u(4.A[0],[c])):(o.n==\'2c\'?4.A.2c():4.A);8(!n.3r(\'1l\').25)n.1N((o.1N==\'I\'?4.A[0].22:o.1N));8(n[0]!=4.A[0]&&!(/(19|1b)/).1T(n.s("C")))n.s("C","1b");E n},32:m(1a){8(1a.5!=1Y)4.g.w.5=1a.5+4.D.5;8(1a.39!=1Y)4.g.w.5=4.N.U-1a.39+4.D.5;8(1a.6!=1Y)4.g.w.6=1a.6+4.D.6;8(1a.38!=1Y)4.g.w.6=4.N.S-1a.38+4.D.6},2Q:m(){4.R=4.n.R();h 1L=4.R.g();8(4.Q==\'1b\'&&4.u[0]!=B&&$.9.2n(4.u[0],4.R[0])){1L.5+=4.u.M();1L.6+=4.u.L()}8((4.R[0]==B.1l)||(4.R[0].1M&&4.R[0].1M.3o()==\'2o\'&&$.1R.3p))1L={6:0,5:0};E{6:1L.6+(H(4.R.s("2q"),10)||0),5:1L.5+(H(4.R.s("2b"),10)||0)}},2l:m(){8(4.Q=="F"){h p=4.A.C();E{6:p.6-(H(4.n.s("6"),10)||0)+4.u.L(),5:p.5-(H(4.n.s("5"),10)||0)+4.u.M()}}14{E{6:0,5:0}}},2J:m(){4.D={5:(H(4.A.s("3m"),10)||0),6:(H(4.A.s("3w"),10)||0)}},2e:m(){4.N={U:4.n.2P(),S:4.n.2W()}},2O:m(){h o=4.j;8(o.v==\'I\')o.v=4.n[0].22;8(o.v==\'B\'||o.v==\'1G\')4.v=[0-4.g.F.5-4.g.I.5,0-4.g.F.6-4.g.I.6,$(o.v==\'B\'?B:1G).U()-4.N.U-4.D.5,($(o.v==\'B\'?B:1G).S()||B.1l.22.2R)-4.N.S-4.D.6];8(!(/^(B|1G|I)$/).1T(o.v)&&o.v.2z!=2S){h J=$(o.v)[0];8(!J)E;h 1V=$(o.v).g();h 2k=($(J).s("3D")!=\'3E\');4.v=[1V.5+(H($(J).s("2b"),10)||0)+(H($(J).s("3B"),10)||0)-4.D.5,1V.6+(H($(J).s("2q"),10)||0)+(H($(J).s("3A"),10)||0)-4.D.6,1V.5+(2k?W.2K(J.3x,J.29):J.29)-(H($(J).s("2b"),10)||0)-(H($(J).s("3z"),10)||0)-4.N.U-4.D.5,1V.6+(2k?W.2K(J.2R,J.28):J.28)-(H($(J).s("2q"),10)||0)-(H($(J).s("3j"),10)||0)-4.N.S-4.D.6]}14 8(o.v.2z==2S){4.v=o.v}},12:m(d,1S){8(!1S)1S=4.C;h 1t=d=="1b"?1:-1;h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);E{6:(1S.6+4.g.F.6*1t+4.g.I.6*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L()))*1t)),5:(1S.5+4.g.F.5*1t+4.g.I.5*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())*1t))}},2m:m(c){h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);8(4.Q==\'F\'&&!(4.u[0]!=B&&4.u[0]!=4.R[0])){4.g.F=4.2l()}h O=c.O;h P=c.P;8(4.2t){8(4.v){8(c.O-4.g.w.5<4.v[0])O=4.v[0]+4.g.w.5;8(c.P-4.g.w.6<4.v[1])P=4.v[1]+4.g.w.6;8(c.O-4.g.w.5>4.v[2])O=4.v[2]+4.g.w.5;8(c.P-4.g.w.6>4.v[3])P=4.v[3]+4.g.w.6}8(o.16){h 6=4.2j+W.2G((P-4.2j)/o.16[1])*o.16[1];P=4.v?(!(6-4.g.w.6<4.v[1]||6-4.g.w.6>4.v[3])?6:(!(6-4.g.w.6<4.v[1])?6-o.16[1]:6+o.16[1])):6;h 5=4.2h+W.2G((O-4.2h)/o.16[0])*o.16[0];O=4.v?(!(5-4.g.w.5<4.v[0]||5-4.g.w.5>4.v[2])?5:(!(5-4.g.w.5<4.v[0])?5-o.16[0]:5+o.16[0])):5}}E{6:(P-4.g.w.6-4.g.F.6-4.g.I.6+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L())))),5:(O-4.g.w.5-4.g.F.5-4.g.I.5+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())))}},2a:m(){4.n.2L("9-q-2r");8(4.n[0]!=4.A[0]&&!4.1J)4.n.2B();4.n=4a;4.1J=z},11:m(27,c,9){9=9||4.1I();$.9.1g.1U(4,27,[c,9]);8(27=="1w")4.1k=4.12("1b");E $.2H.46.11.1U(4,27,c,9)},48:{},1I:m(c){E{n:4.n,C:4.C,49:4.1k,g:4.1k}}}));$.1C($.9.q,{4g:"1.7.2",4q:"1w",4r:{3c:K,1N:"I",T:z,4n:":4m,4i",2p:z,v:z,1x:"2s",2u:z,4k:0,4l:1,16:z,15:z,n:"2v",1K:z,1j:z,45:z,1f:z,2U:3O,3P:"3Q",13:K,1d:20,1c:20,Y:z,2A:"3R",2T:20,1y:z,X:z}});$.9.1g.1m("q","2p",{1h:m(c,9){h e=$(4).G("q"),o=e.j,21=$.1C({},9,{1H:e.A});e.23=[];$(o.2p).1i(m(){h 1e=$.G(4,\'1e\');8(1e&&!1e.j.1O){e.23.2I({k:1e,2N:1e.j.1f});1e.3H();1e.11("3J",c,21)}})},1u:m(c,9){h e=$(4).G("q"),21=$.1C({},9,{1H:e.A});$.1i(e.23,m(){8(4.k.1B){4.k.1B=0;e.1J=K;4.k.1J=z;8(4.2N)4.k.j.1f=K;4.k.2F(c);4.k.j.n=4.k.j.2D;8(e.j.n==\'2v\')4.k.1F.s({6:\'2s\',5:\'2s\'})}14{4.k.1J=z;4.k.11("3L",c,21)}})},1w:m(c,9){h e=$(4).G("q"),1P=4;h 3T=m(o){h 3d=4.g.w.6,3e=4.g.w.5;h 2Y=4.1k.6,3b=4.1k.5;h 3f=o.S,3a=o.U;h 3h=o.6,3g=o.5;E $.9.1B(2Y+3d,3b+3e,3h,3g,3f,3a)};$.1i(e.23,m(i){4.k.1k=e.1k;4.k.N=e.N;4.k.g.w=e.g.w;8(4.k.42(4.k.43)){8(!4.k.1B){4.k.1B=1;4.k.1F=$(1P).2c().1N(4.k.A).G("1e-1H",K);4.k.j.2D=4.k.j.n;4.k.j.n=m(){E 9.n[0]};c.2d=4.k.1F[0];4.k.33(c,K);4.k.34(c,K,K);4.k.g.w.6=e.g.w.6;4.k.g.w.5=e.g.w.5;4.k.g.I.5-=e.g.I.5-4.k.g.I.5;4.k.g.I.6-=e.g.I.6-4.k.g.I.6;e.11("3V",c);e.Z=4.k.A;e.1F=e.A;4.k.3W=e}8(4.k.1F)4.k.2g(c)}14{8(4.k.1B){4.k.1B=0;4.k.1J=K;4.k.j.1f=z;4.k.11(\'3X\',c,4.k.1I(4.k));4.k.2F(c,K);4.k.j.n=4.k.j.2D;4.k.1F.2B();8(4.k.37)4.k.37.2B();e.11("3Y",c);e.Z=z}}})}});$.9.1g.1m("q","1x",{1h:m(c,9){h t=$(\'1l\'),o=$(4).G(\'q\').j;8(t.s("1x"))o.2C=t.s("1x");t.s("1x",o.1x)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2C)$(\'1l\').s("1x",o.2C)}});$.9.1g.1m("q","1K",{1h:m(c,9){h o=$(4).G(\'q\').j;$(o.1K===K?"41":o.1K).1i(m(){$(\'<2w 40="9-q-1K" 1D="3S: #3K;"></2w>\').s({U:4.29+"1Z",S:4.28+"1Z",C:"1b",1j:"0.3M",X:4p}).s($(4).g()).1N("1l")})},1u:m(c,9){$("2w.9-q-1K").1i(m(){4.22.4j(4)})}});$.9.1g.1m("q","1j",{1h:m(c,9){h t=$(9.n),o=$(4).G(\'q\').j;8(t.s("1j"))o.2x=t.s("1j");t.s(\'1j\',o.1j)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2x)$(9.n).s(\'1j\',o.2x)}});$.9.1g.1m("q","13",{1h:m(c,9){h i=$(4).G("q");8(i.u[0]!=B&&i.u[0].1M!=\'2M\')i.1Q=i.u.g()},1w:m(c,9){h i=$(4).G("q"),o=i.j,17=z;8(i.u[0]!=B&&i.u[0].1M!=\'2M\'){8(!o.T||o.T!=\'x\'){8((i.1Q.6+i.u[0].28)-c.P<o.1d)i.u[0].L=17=i.u[0].L+o.1c;14 8(c.P-i.1Q.6<o.1d)i.u[0].L=17=i.u[0].L-o.1c}8(!o.T||o.T!=\'y\'){8((i.1Q.5+i.u[0].29)-c.O<o.1d)i.u[0].M=17=i.u[0].M+o.1c;14 8(c.O-i.1Q.5<o.1d)i.u[0].M=17=i.u[0].M-o.1c}}14{8(!o.T||o.T!=\'x\'){8(c.P-$(B).L()<o.1d)17=$(B).L($(B).L()-o.1c);14 8($(1G).S()-(c.P-$(B).L())<o.1d)17=$(B).L($(B).L()+o.1c)}8(!o.T||o.T!=\'y\'){8(c.O-$(B).M()<o.1d)17=$(B).M($(B).M()-o.1c);14 8($(1G).U()-(c.O-$(B).M())<o.1d)17=$(B).M($(B).M()+o.1c)}}8(17!==z&&$.9.18&&!o.2y)$.9.18.31(i,c)}});$.9.1g.1m("q","Y",{1h:m(c,9){h i=$(4).G("q"),o=i.j;i.V=[];$(o.Y.2z!=3i?(o.Y.3l||\':G(q)\'):o.Y).1i(m(){h $t=$(4);h $o=$t.g();8(4!=i.A[0])i.V.2I({1H:4,U:$t.2P(),S:$t.2W(),6:$o.6,5:$o.5})})},1w:m(c,9){h e=$(4).G("q"),o=e.j;h d=o.2T;h 1p=9.g.5,1A=1p+e.N.U,1n=9.g.6,1z=1n+e.N.S;3k(h i=e.V.25-1;i>=0;i--){h l=e.V[i].5,r=l+e.V[i].U,t=e.V[i].6,b=t+e.V[i].S;8(!((l-d<1p&&1p<r+d&&t-d<1n&&1n<b+d)||(l-d<1p&&1p<r+d&&t-d<1z&&1z<b+d)||(l-d<1A&&1A<r+d&&t-d<1n&&1n<b+d)||(l-d<1A&&1A<r+d&&t-d<1z&&1z<b+d))){8(e.V[i].26)(e.j.Y.2V&&e.j.Y.2V.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=z;3y}8(o.2A!=\'3C\'){h 1v=W.1o(t-1z)<=d;h 1s=W.1o(b-1n)<=d;h 1q=W.1o(l-1A)<=d;h 1r=W.1o(r-1p)<=d;8(1v)9.C.6=e.12("F",{6:t-e.N.S,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l-e.N.U}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r}).5-e.D.5}h 2E=(1v||1s||1q||1r);8(o.2A!=\'3n\'){h 1v=W.1o(t-1n)<=d;h 1s=W.1o(b-1z)<=d;h 1q=W.1o(l-1p)<=d;h 1r=W.1o(r-1A)<=d;8(1v)9.C.6=e.12("F",{6:t,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b-e.N.S,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r-e.N.U}).5-e.D.5}8(!e.V[i].26&&(1v||1s||1q||1r||2E))(e.j.Y.Y&&e.j.Y.Y.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=(1v||1s||1q||1r||2E)}}});$.9.1g.1m("q","1y",{1h:m(c,9){h o=$(4).G("q").j;h 24=$.4c($(o.1y.24)).4e(m(a,b){E(H($(a).s("X"),10)||o.1y.1X)-(H($(b).s("X"),10)||o.1y.1X)});$(24).1i(m(i){4.1D.X=o.1y.1X+i});4[0].1D.X=o.1y.1X+24.25}});$.9.1g.1m("q","X",{1h:m(c,9){h t=$(9.n),o=$(4).G("q").j;8(t.s("X"))o.2i=t.s("X");t.s(\'X\',o.X)},1u:m(c,9){h o=$(4).G("q").j;8(o.2i)$(9.n).s(\'X\',o.2i)}})})(4d);',62,276,'||||this|left|top||if|ui|||event||inst||offset|var||options|instance||function|helper|||draggable||css||scrollParent|containment|click|||false|element|document|position|margins|return|relative|data|parseInt|parent|ce|true|scrollTop|scrollLeft|helperProportions|pageX|pageY|cssPosition|offsetParent|height|axis|width|snapElements|Math|zIndex|snap|dropped||_trigger|_convertPositionTo|scroll|else|handle|grid|scrolled|ddmanager|fixed|obj|absolute|scrollSpeed|scrollSensitivity|sortable|revert|plugin|start|each|opacity|positionAbs|body|add|y1|abs|x1|ls|rs|bs|mod|stop|ts|drag|cursor|stack|y2|x2|isOver|extend|style|scrollIsRootNode|currentItem|window|item|_uiHash|cancelHelperRemoval|iframeFix|po|tagName|appendTo|disabled|self|overflowOffset|browser|pos|test|call|co|safari|min|undefined|px||uiSortable|parentNode|sortables|group|length|snapping|type|offsetHeight|offsetWidth|_clear|borderLeftWidth|clone|target|_cacheHelperProportions|addClass|_mouseDrag|originalPageX|_zIndex|originalPageY|over|_getRelativeOffset|_generatePosition|contains|html|connectToSortable|borderTopWidth|dragging|auto|originalPosition|cursorAt|original|div|_opacity|dropBehaviour|constructor|snapMode|remove|_cursor|_helper|first|_mouseStop|round|widget|push|_cacheMargins|max|removeClass|HTML|shouldRevert|_setContainment|outerWidth|_getParentOffset|scrollHeight|Array|snapTolerance|revertDuration|release|outerHeight|noPropagation|helperTop|_createHelper|isFunction|prepareOffsets|_adjustOffsetFromHelper|_mouseCapture|_mouseStart|_getHandle|snapItem|placeholder|bottom|right|itemWidth|helperLeft|addClasses|dyClick|dxClick|itemHeight|itemLeft|itemTop|String|paddingBottom|for|items|marginLeft|outer|toLowerCase|msie|valid|parents|find|andSelf|apply|invalid|marginTop|scrollWidth|continue|paddingRight|paddingTop|paddingLeft|inner|overflow|hidden|drop|_mouseDestroy|_refreshItems|_mouseInit|activate|fff|deactivate|001|destroy|500|scope|default|both|background|checkPos|mouse|toSortable|fromOutside|out|fromSortable|_init|class|iframe|_intersectsWith|containerCache|current|refreshPositions|prototype|animate|plugins|absolutePosition|null|is|makeArray|jQuery|sort|resizable|version|unbind|option|removeChild|delay|distance|input|cancel|removeData|1000|eventPrefix|defaults'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.droppable.packed.js b/themes/default/js/ui/packed/ui.droppable.packed.js
new file mode 100644
index 000000000..496e477f0
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.droppable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h($){$.1v("8.g",{1T:h(){a o=3.5,k=o.k;3.u=0;3.y=1;3.5.k=3.5.k&&$.1n(3.5.k)?3.5.k:h(d){f d.1m(k)};3.E={F:3.6[0].1A,z:3.6[0].1z};$.8.n.A[3.5.x]=$.8.n.A[3.5.x]||[];$.8.n.A[3.5.x].1S(3);(3.5.1t&&3.6.1c("8-g"))},1R:h(){a H=$.8.n.A[3.5.x];18(a i=0;i<H.Z;i++)9(H[i]==3)H.1U(i,1);3.6.P("8-g 8-g-V").1V("g").1Y(".g")},1w:h(1k,U){9(1k==\'k\'){3.5.k=U&&$.1n(U)?U:h(d){f d.1m(U)}}1X{$.1v.1Q.1w.1J(3,1I)}},1B:h(e){a 4=$.8.n.N;9(3.5.D)3.6.1c(3.5.D);(4&&3.R(\'1H\',e,3.8(4)))},1C:h(e){a 4=$.8.n.N;9(3.5.D)3.6.P(3.5.D);(4&&3.R(\'1K\',e,3.8(4)))},1f:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.1c(3.5.B);3.R(\'1L\',e,3.8(4))}},15:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.P(3.5.B);3.R(\'1O\',e,3.8(4))}},1G:h(e,1s){a 4=1s||$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f s;a 1e=s;3.6.1y(":W(g)").20(".8-4-1M").1b(h(){a S=$.W(3,\'g\');9(S.5.1h&&$.8.J(4,$.1q(S,{w:S.6.w()}),S.5.Y)){1e=1u;f s}});9(1e)f s;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.D)3.6.P(3.5.D);9(3.5.B)3.6.P(3.5.B);3.R(\'H\',e,3.8(4));f 3.6}f s},8:h(c){f{4:(c.v||c.6),1r:c.1r,M:c.M,2c:c.K,w:c.K}}});$.1q($.8.g,{2e:"1.7.2",29:\'H\',23:{k:\'*\',D:s,1t:1u,1h:s,B:s,x:\'16\',Y:\'J\'}});$.8.J=h(4,g,1p){9(!g.w)f s;a G=(4.K||4.M.10).X,O=G+4.L.F,C=(4.K||4.M.10).11,I=C+4.L.z;a l=g.w.X,r=l+g.E.F,t=g.w.11,b=t+g.E.z;24(1p){12\'28\':f(l<G&&O<r&&t<C&&I<b);Q;12\'J\':f(l<G+(4.L.F/2) &&O-(4.L.F/2)<r &&t<C+(4.L.z/2) &&I-(4.L.z/2)<b); Q;12\'26\':a 1o=((4.K||4.M.10).X+(4.1x||4.w.1j).X),1l=((4.K||4.M.10).11+(4.1x||4.w.1j).11),1d=$.8.1d(1l,1o,t,l,g.E.z,g.E.F);f 1d;Q;12\'2d\':f((C>=t&&C<=b)||(I>=t&&I<=b)||(C<t&&I>b))&&((G>=l&&G<=r)||(O>=l&&O<=r)||(G<l&&O>r));Q;16:f s;Q}};$.8.n={N:1a,A:{\'16\':[]},1E:h(t,e){a m=$.8.n.A[t.5.x];a 1g=e?e.1g:1a;a 19=(t.v||t.6).1y(":W(g)").2a();1F:18(a i=0;i<m.Z;i++){9(m[i].5.V||(t&&!m[i].5.k.q(m[i].6[0],(t.v||t.6))))17;18(a j=0;j<19.Z;j++){9(19[j]==m[i].6[0]){m[i].E.z=0;17 1F}};m[i].T=m[i].6.27("25")!="21";9(!m[i].T)17;m[i].w=m[i].6.w();m[i].E={F:m[i].6[0].1A,z:m[i].6[0].1z};9(1g=="22")m[i].1B.q(m[i],e)}},H:h(4,e){a 13=s;$.1b($.8.n.A[4.5.x],h(){9(!3.5)f;9(!3.5.V&&3.T&&$.8.J(4,3,3.5.Y))13=3.1G.q(3,e);9(!3.5.V&&3.T&&3.5.k.q(3.6[0],(4.v||4.6))){3.y=1;3.u=0;3.1C.q(3,e)}});f 13},1Z:h(4,e){9(4.5.1N)$.8.n.1E(4,e);$.1b($.8.n.A[4.5.x],h(){9(3.5.V||3.1D||!3.T)f;a 1i=$.8.J(4,3,3.5.Y);a c=!1i&&3.u==1?\'y\':(1i&&3.u==0?\'u\':1a);9(!c)f;a p;9(3.5.1h){a 14=3.6.1P(\':W(g):1W(0)\');9(14.Z){p=$.W(14[0],\'g\');p.1D=(c==\'u\'?1:0)}}9(p&&c==\'u\'){p[\'u\']=0;p[\'y\']=1;p.15.q(p,e)}3[c]=1;3[c==\'y\'?\'u\':\'y\']=0;3[c=="u"?"1f":"15"].q(3,e);9(p&&c==\'y\'){p[\'y\']=0;p[\'u\']=1;p.1f.q(p,e)}})}}})(2b);',62,139,'|||this|draggable|options|element||ui|if|var||||event|return|droppable|function|||accept|||ddmanager||parentInstance|call||false||isover|currentItem|offset|scope|isout|height|droppables|hoverClass|y1|activeClass|proportions|width|x1|drop|y2|intersect|positionAbs|helperProportions|position|current|x2|removeClass|break|_trigger|inst|visible|value|disabled|data|left|tolerance|length|absolute|top|case|dropped|parent|_out|default|continue|for|list|null|each|addClass|isOver|childrenIntersection|_over|type|greedy|intersects|click|key|draggableTop|is|isFunction|draggableLeft|toleranceMode|extend|helper|custom|addClasses|true|widget|_setData|clickOffset|find|offsetHeight|offsetWidth|_activate|_deactivate|greedyChild|prepareOffsets|droppablesLoop|_drop|activate|arguments|apply|deactivate|over|dragging|refreshPositions|out|parents|prototype|destroy|push|_init|splice|removeData|eq|else|unbind|drag|not|none|mousedown|defaults|switch|display|pointer|css|fit|eventPrefix|andSelf|jQuery|absolutePosition|touch|version'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.resizable.packed.js b/themes/default/js/ui/packed/ui.resizable.packed.js
new file mode 100644
index 000000000..f54998ba4
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.resizable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(t($){$.3W("m.r",$.1e({},$.m.4M,{4T:t(){k 5=4,o=4.B;4.l.1p("m-r");$.1e(4,{1S:!!(o.S),S:o.S,D:4.l,1o:[],E:o.z||o.Q||o.1l?o.z||\'m-r-z\':12});f(4.l[0].2r.2M(/4k|2q|2C|3D|3B|4h/i)){f(/15/.A(4.l.j(\'q\'))&&$.1c.2e)4.l.j({q:\'15\',d:\'1n\',6:\'1n\'});4.l.4c($(\'<1E 3q="m-1k" 1r="34: 2c;"></1E>\').j({q:4.l.j(\'q\'),8:4.l.1j(),9:4.l.1m(),d:4.l.j(\'d\'),6:4.l.j(\'6\')}));4.l=4.l.21().g("r",4.l.g(\'r\'));4.2E=1U;4.l.j({2s:4.D.j("2s"),2Z:4.D.j("2Z"),2y:4.D.j("2y"),2B:4.D.j("2B")});4.D.j({2s:0,2Z:0,2y:0,2B:0});4.3K=4.D.j(\'T\');4.D.j(\'T\',\'4q\');4.1o.4w(4.D.j({q:\'30\',4u:1,3y:\'3x\'}));4.D.j({2W:4.D.j(\'2W\')});4.1Q()}4.H=o.H||(!$(\'.m-r-U\',4.l).X?"e,s,M":{n:\'.m-r-n\',e:\'.m-r-e\',s:\'.m-r-s\',w:\'.m-r-w\',M:\'.m-r-M\',11:\'.m-r-11\',1b:\'.m-r-1b\',Z:\'.m-r-Z\'});f(4.H.3w==3z){f(4.H==\'4m\')4.H=\'n,e,s,w,M,11,1b,Z\';k n=4.H.4S(",");4.H={};2l(k i=0;i<n.X;i++){k U=$.4W(n[i]),32=\'m-r-\'+U;k F=$(\'<1E 3q="m-r-U \'+32+\'"></1E>\');f(/11|M|1b|Z/.A(U))F.j({1I:++o.1I});f(\'M\'==U){F.1p(\'m-3Q m-3Q-3U-3V-M\')};4.H[U]=\'.m-r-\'+U;4.l.3R(F)}}4.3m=t(20){20=20||4.l;2l(k i 3H 4.H){f(4.H[i].3w==3z)4.H[i]=$(4.H[i],4.l).3F();f(4.2E&&4.D[0].2r.2M(/2q|2C|3D|3B/i)){k F=$(4.H[i],4.l),2I=0;2I=/11|1b|Z|M|n|s/.A(i)?F.1m():F.1j();k 3t=[\'2m\',/1b|Z|n/.A(i)?\'3s\':/M|11|s/.A(i)?\'3j\':/^e$/.A(i)?\'3o\':\'3n\'].46("");20.j(3t,2I);4.1Q()}f(!$(4.H[i]).X)3a}};4.3m(4.l);4.1T=$(\'.m-r-U\',4.l).3f();4.1T.47(t(){f(!5.1u){f(4.3k)k F=4.3k.2M(/m-r-(M|11|1b|Z|n|e|s|w)/i);5.F=F&&F[1]?F[1]:\'M\'}});f(o.3O){4.1T.3i();$(4.l).1p("m-r-2H").43(t(){$(4).2t("m-r-2H");5.1T.3F()},t(){f(!5.1u){$(4).1p("m-r-2H");5.1T.3i()}})}4.44()},45:t(){4.48();k 2x=t(1a){$(1a).2t("m-r m-r-3L m-r-1u").3M("r").3Z(".r").49(\'.m-r-U\').2V()};f(4.2E){2x(4.l);k 1k=4.l;1k.21().3R(4.D.j({q:1k.j(\'q\'),8:1k.1j(),9:1k.1m(),d:1k.j(\'d\'),6:1k.j(\'6\')})).3S().2V()}4.D.j(\'T\',4.3K);2x(4.D)},3T:t(u){k U=N;2l(k i 3H 4.H){f($(4.H[i])[0]==u.20)U=1U}C 4.B.3L||!!U},3X:t(u){k o=4.B,31=4.l.q(),y=4.l;4.1u=1U;4.3Y={d:$(1h).39(),6:$(1h).3e()};f(y.3d(\'.m-42\')||(/1Z/).A(y.j(\'q\'))){y.j({q:\'1Z\',d:31.d,6:31.6})}f($.1c.2e&&(/15/).A(y.j(\'q\')))y.j({q:\'15\',d:\'1n\',6:\'1n\'});4.36();k 24=2f(4.z.j(\'6\')),22=2f(4.z.j(\'d\'));f(o.1F){24+=$(o.1F).3e()||0;22+=$(o.1F).39()||0}4.R=4.z.R();4.q={6:24,d:22};4.x=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.V=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.W={6:24,d:22};4.17={8:y.1j()-y.8(),9:y.1m()-y.9()};4.3g={6:u.3h,d:u.3b};4.S=(1K o.S==\'3G\')?o.S:((4.V.8/4.V.9)||1);k 1H=$(\'.m-r-\'+4.F).j(\'1H\');$(\'2b\').j(\'1H\',1H==\'1n\'?4.F+\'-T\':1H);y.1p("m-r-1u");4.1J("1v",u);C 1U},41:t(u){k y=4.z,o=4.B,40={},5=4,2A=4.3g,a=4.F;k I=(u.3h-2A.6)||0,G=(u.3b-2A.d)||0;k 2v=4.18[a];f(!2v)C N;k g=2v.1g(4,[u,I,G]),28=$.1c.2G&&$.1c.2z<7,4X=4.17;f(4.1S||u.2a)g=4.3c(g,u);g=4.35(g,u);4.1J("T",u);y.j({d:4.q.d+"1A",6:4.q.6+"1A",8:4.x.8+"1A",9:4.x.9+"1A"});f(!4.E&&4.1o.X)4.1Q();4.2U(g);4.38(\'T\',u,4.m());C N},4H:t(u){4.1u=N;k o=4.B,5=4;f(4.E){k 14=4.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k s={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;f(!o.1l)4.l.j($.1e(s,{d:d,6:6}));5.z.9(5.x.9);5.z.8(5.x.8);f(4.E&&!o.1l)4.1Q()}$(\'2b\').j(\'1H\',\'1n\');4.l.2t("m-r-1u");4.1J("1X",u);f(4.E)4.z.2V();C N},2U:t(g){k o=4.B;4.R=4.z.R();f(1d(g.6))4.q.6=g.6;f(1d(g.d))4.q.d=g.d;f(1d(g.9))4.x.9=g.9;f(1d(g.8))4.x.8=g.8},3c:t(g,u){k o=4.B,2i=4.q,1y=4.x,a=4.F;f(g.9)g.8=(1y.9*4.S);19 f(g.8)g.9=(1y.8/4.S);f(a==\'11\'){g.6=2i.6+(1y.8-g.8);g.d=12}f(a==\'Z\'){g.d=2i.d+(1y.9-g.9);g.6=2i.6+(1y.8-g.8)}C g},35:t(g,u){k y=4.z,o=4.B,1z=4.1S||u.2a,a=4.F,2S=1d(g.8)&&o.1P&&(o.1P<g.8),2N=1d(g.9)&&o.1O&&(o.1O<g.9),2R=1d(g.8)&&o.1R&&(o.1R>g.8),2O=1d(g.9)&&o.1N&&(o.1N>g.9);f(2R)g.8=o.1R;f(2O)g.9=o.1N;f(2S)g.8=o.1P;f(2N)g.9=o.1O;k 2T=4.W.6+4.V.8,2J=4.q.d+4.x.9;k 1M=/11|Z|w/.A(a),1L=/Z|1b|n/.A(a);f(2R&&1M)g.6=2T-o.1R;f(2S&&1M)g.6=2T-o.1P;f(2O&&1L)g.d=2J-o.1N;f(2N&&1L)g.d=2J-o.1O;k 2K=!g.8&&!g.9;f(2K&&!g.6&&g.d)g.d=12;19 f(2K&&!g.d&&g.6)g.6=12;C g},1Q:t(){k o=4.B;f(!4.1o.X)C;k l=4.z||4.l;2l(k i=0;i<4.1o.X;i++){k 16=4.1o[i];f(!4.1C){k b=[16.j(\'4I\'),16.j(\'4J\'),16.j(\'4K\'),16.j(\'4G\')],p=[16.j(\'4F\'),16.j(\'4B\'),16.j(\'4A\'),16.j(\'4C\')];4.1C=$.4D(b,t(v,i){k 33=J(v,10)||0,2m=J(p[i],10)||0;C 33+2m})}f($.1c.2G&&!(!($(l).3d(\':2c\')||$(l).4E(\':2c\').X)))3a;16.j({9:(l.9()-4.1C[0]-4.1C[2])||0,8:(l.8()-4.1C[1]-4.1C[3])||0})}},36:t(){k y=4.l,o=4.B;4.2w=y.R();f(4.E){4.z=4.z||$(\'<1E 1r="34:2c;"></1E>\');k 28=$.1c.2G&&$.1c.2z<7,2F=(28?1:0),2D=(28?2:-1);4.z.1p(4.E).j({8:4.l.1j()+2D,9:4.l.1m()+2D,q:\'1Z\',6:4.2w.6-2F+\'1A\',d:4.2w.d-2F+\'1A\',1I:++o.1I});4.z.3v("2b").3f()}19{4.z=4.l}},18:{e:t(u,I,G){C{8:4.V.8+I}},w:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{6:2o.6+I,8:13.8-I}},n:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{d:2o.d+G,9:13.9-G}},s:t(u,I,G){C{9:4.V.9+G}},M:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.e.1g(4,[u,I,G]))},11:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.w.1g(4,[u,I,G]))},1b:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.e.1g(4,[u,I,G]))},Z:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.w.1g(4,[u,I,G]))}},1J:t(n,u){$.m.1B.4U(4,n,[u,4.m()]);(n!="T"&&4.38(n,u,4.m()))},4V:{},m:t(){C{D:4.D,l:4.l,z:4.z,q:4.q,x:4.x,V:4.V,W:4.W}}}));$.1e($.m.r,{2z:"1.7.2",4R:"T",4a:{P:N,1l:N,3I:"4O",3p:"4P",S:N,3O:N,4Q:":2C,4z",1F:N,4y:0,4i:1,Q:N,Y:N,H:"e,s,M",z:N,1O:12,1P:12,1N:10,1R:10,1I:4j}});$.m.1B.1Y("r","P",{1v:t(u,m){k 5=$(4).g("r"),o=5.B;23=t(1a){$(1a).1x(t(){$(4).g("r-2Y",{8:J($(4).8(),10),9:J($(4).9(),10),6:J($(4).j(\'6\'),10),d:J($(4).j(\'d\'),10)})})};f(1K(o.P)==\'3J\'&&!o.P.3r){f(o.P.X){o.P=o.P[0];23(o.P)}19{$.1x(o.P,t(1a,c){23(1a)})}}19{23(o.P)}},T:t(u,m){k 5=$(4).g("r"),o=5.B,O=5.V,1q=5.W;k 3P={9:(5.x.9-O.9)||0,8:(5.x.8-O.8)||0,d:(5.q.d-1q.d)||0,6:(5.q.6-1q.6)||0},2u=t(1a,c){$(1a).1x(t(){k y=$(4),1v=$(4).g("r-2Y"),1r={},j=c&&c.X?c:[\'8\',\'9\',\'d\',\'6\'];$.1x(j||[\'8\',\'9\',\'d\',\'6\'],t(i,27){k 26=(1v[27]||0)+(3P[27]||0);f(26&&26>=0)1r[27]=26||12});f(/15/.A(y.j(\'q\'))&&$.1c.2e){5.2L=1U;y.j({q:\'1Z\',d:\'1n\',6:\'1n\'})}y.j(1r)})};f(1K(o.P)==\'3J\'&&!o.P.4l){$.1x(o.P,t(1a,c){2u(1a,c)})}19{2u(o.P)}},1X:t(u,m){k 5=$(4).g("r");f(5.2L&&$.1c.2e){5.2L=N;y.j({q:\'15\'})}$(4).3M("r-2Y-1v")}});$.m.1B.1Y("r","1l",{1X:t(u,m){k 5=$(4).g("r"),o=5.B;k 14=5.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k 1r={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;5.l.1l($.1e(1r,d&&6?{d:d,6:6}:{}),{4b:o.3I,4d:o.3p,4e:t(){k g={8:J(5.l.j(\'8\'),10),9:J(5.l.j(\'9\'),10),d:J(5.l.j(\'d\'),10),6:J(5.l.j(\'6\'),10)};f(14&&14.X)$(14[0]).j({8:g.8,9:g.9});5.2U(g);5.1J("T",u)}})}});$.m.1B.1Y("r","1F",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,y=5.l;k 1s=o.1F,L=(1s 4f $)?1s.1G(0):(/21/.A(1s))?y.21().1G(0):1s;f(!L)C;5.1W=$(L);f(/1h/.A(1s)||1s==1h){5.1V={6:0,d:0};5.2Q={6:0,d:0};5.1i={l:$(1h),6:0,d:0,8:$(1h).8(),9:$(1h).9()||1h.2b.3r.3u}}19{k l=$(L),p=[];$(["3s","3o","3n","3j"]).1x(t(i,3l){p[i]=2f(l.j("2m"+3l))});5.1V=l.R();5.2Q=l.q();5.2d={9:(l.4n()-p[3]),8:(l.4v()-p[1])};k K=5.1V,1L=5.2d.9,1M=5.2d.8,8=($.m.2j(L,"6")?L.4x:1M),9=($.m.2j(L)?L.3u:1L);5.1i={l:L,6:K.6,d:K.d,8:8,9:9}}},T:t(u,m){k 5=$(4).g("r"),o=5.B,4t=5.2d,K=5.1V,13=5.x,2h=5.q,1z=5.1S||u.2a,1f={d:0,6:0},L=5.1W;f(L[0]!=1h&&(/30/).A(L.j(\'q\')))1f=K;f(2h.6<(5.E?K.6:0)){5.x.8=5.x.8+(5.E?(5.q.6-K.6):(5.q.6-1f.6));f(1z)5.x.9=5.x.8/o.S;5.q.6=o.z?K.6:0}f(2h.d<(5.E?K.d:0)){5.x.9=5.x.9+(5.E?(5.q.d-K.d):5.q.d);f(1z)5.x.8=5.x.9*o.S;5.q.d=5.E?K.d:0}5.R.6=5.1i.6+5.q.6;5.R.d=5.1i.d+5.q.d;k 2g=2p.3C((5.E?5.R.6-1f.6:(5.R.6-1f.6))+5.17.8),2P=2p.3C((5.E?5.R.d-1f.d:(5.R.d-K.d))+5.17.9);k 3E=5.1W.1G(0)==5.l.21().1G(0),3A=/15|1Z/.A(5.1W.j(\'q\'));f(3E&&3A)2g-=5.1i.6;f(2g+5.x.8>=5.1i.8){5.x.8=5.1i.8-2g;f(1z)5.x.9=5.x.8/5.S}f(2P+5.x.9>=5.1i.9){5.x.9=5.1i.9-2P;f(1z)5.x.8=5.x.9*5.S}},1X:t(u,m){k 5=$(4).g("r"),o=5.B,2h=5.q,K=5.1V,1f=5.2Q,L=5.1W;k z=$(5.z),2X=z.R(),w=z.1j()-5.17.8,h=z.1m()-5.17.9;f(5.E&&!o.1l&&(/15/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h});f(5.E&&!o.1l&&(/30/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h})}});$.m.1B.1Y("r","Q",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x;5.Q=5.D.4r();5.Q.j({4N:.25,3y:\'3x\',q:\'15\',9:13.9,8:13.8,2W:0,6:0,d:0}).1p(\'m-r-Q\').1p(1K o.Q==\'4p\'?o.Q:\'\');5.Q.3v(5.z)},T:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q)5.Q.j({q:\'15\',9:5.x.9,8:5.x.8})},1X:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q&&5.z)5.z.1G(0).4o(5.Q.1G(0))}});$.m.1B.1Y("r","Y",{T:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x,O=5.V,1q=5.W,a=5.F,4s=o.1S||u.2a;o.Y=1K o.Y=="3G"?[o.Y,o.Y]:o.Y;k 1w=2p.3N((13.8-O.8)/(o.Y[0]||1))*(o.Y[0]||1),1t=2p.3N((13.9-O.9)/(o.Y[1]||1))*(o.Y[1]||1);f(/^(M|s|e)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t}19 f(/^(1b)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t}19 f(/^(11)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.6=1q.6-1w}19{5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t;5.q.6=1q.6-1w}}});k 2f=t(v){C J(v,10)||0};k 1d=t(37){C!4L(J(37,10))}})(4g);',62,308,'||||this|self|left||width|height||||top||if|data|||css|var|element|ui||||position|resizable||function|event|||size|el|helper|test|options|return|originalElement|_helper|axis|dy|handles|dx|parseInt|co|ce|se|false|os|alsoResize|ghost|offset|aspectRatio|resize|handle|originalSize|originalPosition|length|grid|nw||sw|null|cs|pr|relative|prel|sizeDiff|_change|else|exp|ne|browser|isNumber|extend|cop|apply|document|parentData|outerWidth|wrapper|animate|outerHeight|auto|_proportionallyResizeElements|addClass|op|style|oc|oy|resizing|start|ox|each|csize|pRatio|px|plugin|borderDif|ista|div|containment|get|cursor|zIndex|_propagate|typeof|ch|cw|minHeight|maxHeight|maxWidth|_proportionallyResize|minWidth|_aspectRatio|_handles|true|containerOffset|containerElement|stop|add|absolute|target|parent|curtop|_store|curleft||sum|prop|ie6|soffseth|shiftKey|body|hidden|containerSize|opera|num|woset|cp|cpos|hasScroll|arguments|for|padding|soffsetw|sp|Math|textarea|nodeName|marginLeft|removeClass|_alsoResize|trigger|elementOffset|_destroy|marginRight|version|smp|marginBottom|input|pxyoffset|elementIsWrapper|ie6offset|msie|autohide|padWrapper|dh|isNotwh|_revertToRelativePosition|match|ismaxh|isminh|hoset|containerPosition|isminw|ismaxw|dw|_updateCache|remove|margin|ho|alsoresize|marginTop|static|iniPos|hname|border|overflow|_respectSize|_renderProxy|value|_trigger|scrollTop|continue|pageY|_updateRatio|is|scrollLeft|disableSelection|originalMousePosition|pageX|hide|Bottom|className|name|_renderAxis|Left|Right|animateEasing|class|parentNode|Top|padPos|scrollHeight|appendTo|constructor|block|display|String|isOffsetRelative|button|abs|select|isParent|show|number|in|animateDuration|object|originalResizeStyle|disabled|removeData|round|autoHide|delta|icon|append|end|_mouseCapture|gripsmall|diagonal|widget|_mouseStart|documentScroll|unbind|props|_mouseDrag|draggable|hover|_mouseInit|destroy|join|mouseover|_mouseDestroy|find|defaults|duration|wrap|easing|step|instanceof|jQuery|img|distance|1000|canvas|nodeType|all|innerHeight|removeChild|string|none|clone|ratio|ps|zoom|innerWidth|push|scrollWidth|delay|option|paddingBottom|paddingRight|paddingLeft|map|parents|paddingTop|borderLeftWidth|_mouseStop|borderTopWidth|borderRightWidth|borderBottomWidth|isNaN|mouse|opacity|slow|swing|cancel|eventPrefix|split|_init|call|plugins|trim|csdif'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.selectable.packed.js b/themes/default/js/ui/packed/ui.selectable.packed.js
new file mode 100644
index 000000000..a397c5184
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.selectable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(i($){$.12("6.f",$.W({},$.6.19,{1j:i(){b g=4;4.5.l("6-f");4.O=e;b o;4.L=i(){o=$(g.h.D,g.5[0]);o.v(i(){b $4=$(4);b B=$4.1c();$.w(4,"f-x",{5:4,$5:$4,q:B.q,s:B.s,P:B.q+$4.1a(),F:B.s+$4.1g(),r:e,d:$4.H(\'6-d\'),a:$4.H(\'6-a\'),8:$4.H(\'6-8\')})})};4.L();4.o=o.l("6-3");4.1k();4.A=$(1f.1d(\'1h\')).K({1l:\'1b 1i 11\'}).l("6-f-A")},10:i(){4.5.k("6-f 6-f-M").Z("f").13(".f");4.18()},17:i(9){b g=4;4.N=[9.V,9.T];c(4.h.M)y;b h=4.h;4.o=$(h.D,4.5[0]);4.m("16",9);$(h.U).15(4.A);4.A.K({"z-1e":1q,"1A":"1z","q":9.1y,"s":9.1C,"S":0,"X":0});c(h.R){4.L()}4.o.D(\'.6-d\').v(i(){b 3=$.w(4,"f-x");3.r=j;c(!9.I){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}});$(9.1E).1G().1F().v(i(){b 3=$.w(4,"f-x");c(3){3.$5.k("6-8").l(\'6-a\');3.8=e;3.a=j;3.d=j;g.m("a",9,{a:3.5});y e}})},1m:i(9){b g=4;4.O=j;c(4.h.M)y;b h=4.h;b n=4.N[0],p=4.N[1],t=9.V,u=9.T;c(n>t){b E=t;t=n;n=E}c(p>u){b E=u;u=p;p=E}4.A.K({q:n,s:p,S:t-n,X:u-p});4.o.v(i(){b 3=$.w(4,"f-x");c(!3||3.5==g.5[0])y;b C=e;c(h.J==\'Q\'){C=(!(3.q>t||3.P<n||3.s>u||3.F<p))}G c(h.J==\'1w\'){C=(3.q>n&&3.P<t&&3.s>p&&3.F<u)}c(C){c(3.d){3.$5.k(\'6-d\');3.d=e}c(3.8){3.$5.k(\'6-8\');3.8=e}c(!3.a){3.$5.l(\'6-a\');3.a=j;g.m("a",9,{a:3.5})}}G{c(3.a){c(9.I&&3.r){3.$5.k(\'6-a\');3.a=e;3.$5.l(\'6-d\');3.d=j}G{3.$5.k(\'6-a\');3.a=e;c(3.r){3.$5.l(\'6-8\');3.8=j}g.m("8",9,{8:3.5})}}c(3.d){c(!9.I&&!3.r){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}}}});y e},1v:i(9){b g=4;4.O=e;b h=4.h;$(\'.6-8\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-8\');3.8=e;3.r=e;g.m("Y",9,{Y:3.5})});$(\'.6-a\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-a\').l(\'6-d\');3.a=e;3.d=j;3.r=j;g.m("d",9,{d:3.5})});4.m("14",9);4.A.1x();y e}}));$.W($.6.f,{1r:"1.7.2",1D:{U:\'1B\',R:j,1t:":1u,1s",1o:0,1p:0,D:\'*\',J:\'Q\'}})})(1n);',62,105,'|||selectee|this|element|ui||unselecting|event|selecting|var|if|selected|false|selectable|self|options|function|true|removeClass|addClass|_trigger|x1|selectees|y1|left|startselected|top|x2|y2|each|data|item|return||helper|pos|hit|filter|tmp|bottom|else|hasClass|metaKey|tolerance|css|refresh|disabled|opos|dragged|right|touch|autoRefresh|width|pageY|appendTo|pageX|extend|height|unselected|removeData|destroy|black|widget|unbind|stop|append|start|_mouseStart|_mouseDestroy|mouse|outerWidth|1px|offset|createElement|index|document|outerHeight|div|dotted|_init|_mouseInit|border|_mouseDrag|jQuery|delay|distance|100|version|option|cancel|input|_mouseStop|fit|remove|clientX|absolute|position|body|clientY|defaults|target|andSelf|parents'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.slider.packed.js b/themes/default/js/ui/packed/ui.slider.packed.js
new file mode 100644
index 000000000..9d269f0c1
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.slider.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(g($){$.V("4.l",$.21({},$.4.2x,{2w:g(){b e=3,o=3.d;3.1b=v;3.Y=Z;3.1Q();3.2z();3.D.E("4-l"+" 4-l-"+3.s+" 4-V"+" 4-V-22"+" 4-1L-1I");3.h=$([]);8(o.h){8(o.h===N){3.h=$(\'<1s></1s>\');8(!o.6)o.6=[3.u(),3.u()];8(o.6.q&&o.6.q!=2){o.6=[o.6[0],o.6[0]]}}H{3.h=$(\'<1s></1s>\')}3.h.1K(3.D).E("4-l-h");8(o.h=="11"||o.h=="1c"){3.h.E("4-l-h-"+o.h)}3.h.E("4-V-2K")}8($(".4-l-r",3.D).q==0)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r");8(o.6&&o.6.q){2T($(".4-l-r",3.D).q<o.6.q)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r")}3.n=$(".4-l-r",3.D).E("4-A-2o"+" 4-1L-1I");3.r=3.n.2f(0);3.n.2W(3.h).1W("a").2s(g(c){c.2t()}).1o(g(){8(!o.L){$(3).E(\'4-A-1o\')}},g(){$(3).O(\'4-A-1o\')}).T(g(){8(!o.L){$(".4-l .4-A-T").O(\'4-A-T\');$(3).E(\'4-A-T\')}H{$(3).1S()}}).1S(g(){$(3).O(\'4-A-T\')});3.n.1U(g(i){$(3).1x("9.4-l-r",i)});3.n.2m(g(c){b 1D=N;b 9=$(3).1x("9.4-l-r");8(e.d.L)m;1P(c.w){t $.4.w.2b:t $.4.w.26:t $.4.w.28:t $.4.w.1V:t $.4.w.2c:t $.4.w.29:1D=v;8(!e.1b){e.1b=N;$(3).E("4-A-1n");e.1B(c,9)}S}b W,p,J=e.1Y();8(e.d.6&&e.d.6.q){W=p=e.6(9)}H{W=p=e.k()}1P(c.w){t $.4.w.2b:p=e.u();S;t $.4.w.26:p=e.G();S;t $.4.w.28:t $.4.w.1V:8(W==e.G())m;p=W+J;S;t $.4.w.2c:t $.4.w.29:8(W==e.u())m;p=W-J;S}e.1p(c,9,p);m 1D}).2p(g(c){b 9=$(3).1x("9.4-l-r");8(e.1b){e.1T(c,9);e.18(c,9);e.1b=v;$(3).O("4-A-1n")}});3.1f()},2l:g(){3.n.20();3.h.20();3.D.O("4-l"+" 4-l-I"+" 4-l-U"+" 4-l-L"+" 4-V"+" 4-V-22"+" 4-1L-1I").2r("l").2u(".l");3.2k()},2e:g(c){b o=3.d;8(o.L)m v;3.1E={12:3.D.2g(),15:3.D.2i()};3.1C=3.D.17();b R={x:c.1J,y:c.1M};b M=3.1k(R);b 1v=3.G()-3.u()+1,K;b e=3,9;3.n.1U(g(i){b 1H=2h.2j(M-e.6(i));8(1v>1H){1v=1H;K=$(3);9=i}});8(o.h==N&&3.6(1)==o.11){K=$(3.n[++9])}3.1B(c,9);e.Y=9;K.E("4-A-1n").T();b 17=K.17();b 25=!$(c.2n).2V().2P().2Q(\'.4-l-r\');3.13=25?{Q:0,1h:0}:{Q:c.1J-17.Q-(K.12()/2),1h:c.1M-17.1h-(K.15()/2)-(1G(K.z(\'2N\'),10)||0)-(1G(K.z(\'2L\'),10)||0)+(1G(K.z(\'2M\'),10)||0)};M=3.1k(R);3.1p(c,9,M);m N},2S:g(c){m N},2Y:g(c){b R={x:c.1J,y:c.1M};b M=3.1k(R);3.1p(c,3.Y,M);m v},2X:g(c){3.n.O("4-A-1n");3.1T(c,3.Y);3.18(c,3.Y);3.Y=Z;3.13=Z;m v},1Q:g(){3.s=3.d.s==\'U\'?\'U\':\'I\'},1k:g(R){b 1m,1r;8(\'I\'==3.s){1m=3.1E.12;1r=R.x-3.1C.Q-(3.13?3.13.Q:0)}H{1m=3.1E.15;1r=R.y-3.1C.1h-(3.13?3.13.1h:0)}b P=(1r/1m);8(P>1)P=1;8(P<0)P=0;8(\'U\'==3.s)P=1-P;b 2d=3.G()-3.u(),1y=P*2d,1O=1y%3.d.J,M=3.u()+1y-1O;8(1O>(3.d.J/2))M+=3.d.J;m 2A(M.2B(5))},1B:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2y",c,F)},1p:g(c,9,p){b r=3.n[9];8(3.d.6&&3.d.6.q){b 1e=3.6(9?0:1);8((3.d.6.q==2&&3.d.h===N)&&((9==0&&p>1e)||(9==1&&p<1e))){p=1e}8(p!=3.6(9)){b 1N=3.6();1N[9]=p;b 1q=3.1g("1F",c,{r:3.n[9],k:p,6:1N});b 1e=3.6(9?0:1);8(1q!==v){3.6(9,p,(c.2a==\'27\'&&3.d.f),N)}}}H{8(p!=3.k()){b 1q=3.1g("1F",c,{r:3.n[9],k:p});8(1q!==v){3.1l(\'k\',p,(c.2a==\'27\'&&3.d.f))}}}},1T:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("X",c,F)},18:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2D",c,F)},k:g(1t){8(19.q){3.1l("k",1t);3.18(Z,0)}m 3.1Z()},6:g(9,1t,1a,1X){8(19.q>1){3.d.6[9]=1t;3.1f(1a);8(!1X)3.18(Z,9)}8(19.q){8(3.d.6&&3.d.6.q){m 3.1R(9)}H{m 3.k()}}H{m 3.1R()}},1l:g(24,k,1a){$.V.2G.1l.2E(3,19);1P(24){t\'L\':8(k){3.n.1W(".4-A-T").1S();3.n.O("4-A-1o");3.n.2R("L","L")}H{3.n.2F("L")}t\'s\':3.1Q();3.D.O("4-l-I 4-l-U").E("4-l-"+3.s);3.1f(1a);S;t\'k\':3.1f(1a);S}},1Y:g(){b J=3.d.J;m J},1Z:g(){b C=3.d.k;8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C},1R:g(9){8(19.q){b C=3.d.6[9];8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C}H{m 3.d.6}},u:g(){b 16=3.d.11;m 16},G:g(){b 1j=3.d.1c;m 1j},1f:g(f){b 1i=3.d.h,o=3.d,e=3;8(3.d.6&&3.d.6.q){b 2I,2C;3.n.1U(g(i,j){b B=(e.6(i)-e.u())/(e.G()-e.u())*1d;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';$(3).X(1,1)[f?\'f\':\'z\'](14,o.f);8(e.d.h===N){8(e.s==\'I\'){(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({Q:B+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({12:(B-1A)+\'%\'},{1u:v,1w:o.f})}H{(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({1z:(B)+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({15:(B-1A)+\'%\'},{1u:v,1w:o.f})}}1A=B})}H{b k=3.k(),16=3.u(),1j=3.G(),B=1j!=16?(k-16)/(1j-16)*1d:0;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';3.r.X(1,1)[f?\'f\':\'z\'](14,o.f);(1i=="11")&&(3.s=="I")&&3.h.X(1,1)[f?\'f\':\'z\']({12:B+\'%\'},o.f);(1i=="1c")&&(3.s=="I")&&3.h[f?\'f\':\'z\']({12:(1d-B)+\'%\'},{1u:v,1w:o.f});(1i=="11")&&(3.s=="U")&&3.h.X(1,1)[f?\'f\':\'z\']({15:B+\'%\'},o.f);(1i=="1c")&&(3.s=="U")&&3.h[f?\'f\':\'z\']({15:(1d-B)+\'%\'},{1u:v,1w:o.f})}}}));$.21($.4.l,{2J:"k 6",2U:"1.7.2",2v:"1F",2O:{f:v,2q:0,1v:0,1c:1d,11:0,s:\'I\',h:v,J:1,k:0,6:Z}})})(2H);',62,185,'|||this|ui||values||if|index||var|event|options|self|animate|function|range|||value|slider|return|handles||newVal|length|handle|orientation|case|_valueMin|false|keyCode|||css|state|valPercent|val|element|addClass|uiHash|_valueMax|else|horizontal|step|closestHandle|disabled|normValue|true|removeClass|percentMouse|left|position|break|focus|vertical|widget|curVal|stop|_handleIndex|null||min|width|_clickOffset|_set|height|valueMin|offset|_change|arguments|animated|_keySliding|max|100|otherVal|_refreshValue|_trigger|top|oRange|valueMax|_normValueFromMouse|_setData|pixelTotal|active|hover|_slide|allowed|pixelMouse|div|newValue|queue|distance|duration|data|valueMouse|bottom|lastValPercent|_start|elementOffset|ret|elementSize|slide|parseInt|thisDistance|all|pageX|appendTo|corner|pageY|newValues|valueMouseModStep|switch|_detectOrientation|_values|blur|_stop|each|RIGHT|filter|noPropagation|_step|_value|remove|extend|content|href|key|mouseOverHandle|END|mousedown|UP|LEFT|type|HOME|DOWN|valueTotal|_mouseCapture|eq|outerWidth|Math|outerHeight|abs|_mouseDestroy|destroy|keydown|target|default|keyup|delay|removeData|click|preventDefault|unbind|eventPrefix|_init|mouse|start|_mouseInit|parseFloat|toFixed|vp1|change|apply|removeAttr|prototype|jQuery|vp0|getter|header|borderBottomWidth|marginTop|borderTopWidth|defaults|andSelf|is|attr|_mouseStart|while|version|parents|add|_mouseStop|_mouseDrag'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.sortable.packed.js b/themes/default/js/ui/packed/ui.sortable.packed.js
new file mode 100644
index 000000000..668e8803d
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.sortable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(k($){$.4f("z.N",$.2a({},$.z.4r,{4J:k(){6 o=4.n;4.12={};4.J.2N("z-N");4.3t();4.1t=4.u.K?(/8|1K/).29(4.u[0].g.v(\'4A\')):B;4.f=4.J.f();4.4z()},4w:k(){4.J.2h("z-N z-N-2g").3T("N").4E(".N");4.4F();O(6 i=4.u.K-1;i>=0;i--)4.u[i].g.3T("N-g")},4G:k(9,2n){5(4.2k){w B}5(4.n.2g||4.n.3R==\'3L\')w B;4.38(9);6 h=17,q=4,4H=$(9.28).48().1S(k(){5($.1I(4,\'N-g\')==q){h=$(4);w B}});5($.1I(9.28,\'N-g\')==q)h=$(9.28);5(!h)w B;5(4.n.2J&&!2n){6 2S=B;$(4.n.2J,h).3s("*").4N().1S(k(){5(4==9.28)2S=16});5(!2S)w B}4.h=h;4.3v();w 16},4m:k(9,2n,3S){6 o=4.n,q=4;4.1J=4;4.2i();4.m=4.45(9);4.2D();4.4g();4.A=4.m.A();4.f=4.h.f();4.f={e:4.f.e-4.V.e,8:4.f.8-4.V.8};4.m.v("1c","1B");4.14=4.m.v("1c");$.2a(4.f,{E:{8:9.Z-4.f.8,e:9.X-4.f.e},P:4.2H(),1i:4.35()});4.3Z=4.2t(9);4.3c=9.Z;4.34=9.X;5(o.2R)4.44(o.2R);4.1M={1z:4.h.1z()[0],P:4.h.P()[0]};5(4.m[0]!=4.h[0]){4.h.4p()}4.3B();5(o.C)4.4e();5(o.1D){5($(\'1e\').v("1D"))4.39=$(\'1e\').v("1D");$(\'1e\').v("1D",o.1D)}5(o.1w){5(4.m.v("1w"))4.2P=4.m.v("1w");4.m.v("1w",o.1w)}5(o.1v){5(4.m.v("1v"))4.2f=4.m.v("1v");4.m.v("1v",o.1v)}5(4.A[0]!=D&&4.A[0].1H!=\'3W\')4.1T=4.A.f();4.L("4q",9,4.M());5(!4.4o)4.2D();5(!3S){O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4n",9,q.M(4))}}5($.z.1h)$.z.1h.4l=4;5($.z.1h&&!o.2F)$.z.1h.3Y(4,9);4.2e=16;4.m.2N("z-N-m");4.3U(9);w 16},3U:k(9){4.1c=4.2t(9);4.Y=4.2s("1B");5(!4.1O){4.1O=4.Y}5(4.n.1j){6 o=4.n,1k=B;5(4.A[0]!=D&&4.A[0].1H!=\'3W\'){5((4.1T.e+4.A[0].2z)-9.X<o.1m)4.A[0].T=1k=4.A[0].T+o.1n;11 5(9.X-4.1T.e<o.1m)4.A[0].T=1k=4.A[0].T-o.1n;5((4.1T.8+4.A[0].2L)-9.Z<o.1m)4.A[0].S=1k=4.A[0].S+o.1n;11 5(9.Z-4.1T.8<o.1m)4.A[0].S=1k=4.A[0].S-o.1n}11{5(9.X-$(D).T()<o.1m)1k=$(D).T($(D).T()-o.1n);11 5($(1A).H()-(9.X-$(D).T())<o.1m)1k=$(D).T($(D).T()+o.1n);5(9.Z-$(D).S()<o.1m)1k=$(D).S($(D).S()-o.1n);11 5($(1A).I()-(9.Z-$(D).S())<o.1m)1k=$(D).S($(D).S()+o.1n)}5(1k!==B&&$.z.1h&&!o.2F)$.z.1h.3Y(4,9)}4.Y=4.2s("1B");5(!4.n.1W||4.n.1W!="y")4.m[0].1s.8=4.1c.8+\'40\';5(!4.n.1W||4.n.1W!="x")4.m[0].1s.e=4.1c.e+\'40\';O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i],1P=g.g[0],2b=4.3E(g);5(!2b)26;5(1P!=4.h[0]&&4.F[2b==1?"4s":"1z"]()[0]!=1P&&!$.z.1p(4.F[0],1P)&&(4.n.3R==\'4M-4L\'?!$.z.1p(4.J[0],1P):16)){4.3O=2b==1?"1G":"2q";5(4.n.2d=="2B"||4.3q(g)){4.25(9,g)}11{3N}4.L("32",9,4.M());3N}}4.3i(9);5($.z.1h)$.z.1h.4D(4,9);4.L(\'3u\',9,4.M());4.1O=4.Y;w B},4C:k(9,1d){5(!9)w;5($.z.1h&&!4.n.2F)$.z.1h.4v(4,9);5(4.n.2X){6 q=4;6 1a=q.F.f();q.2k=16;$(4.m).4u({8:1a.8-4.f.P.8-q.V.8+(4.Q[0]==D.1e?0:4.Q[0].S),e:1a.e-4.f.P.e-q.V.e+(4.Q[0]==D.1e?0:4.Q[0].T)},R(4.n.2X,10)||4t,k(){q.2U(9)})}11{4.2U(9,1d)}w B},2u:k(){6 q=4;5(4.2e){4.4I();5(4.n.m=="2W")4.h.v(4.1y).2h("z-N-m");11 4.h.43();O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4h",17,q.M(4));5(4.s[i].12.1b){4.s[i].L("36",17,q.M(4));4.s[i].12.1b=0}}}5(4.F[0].1l)4.F[0].1l.4j(4.F[0]);5(4.n.m!="2W"&&4.m&&4.m[0].1l)4.m.2M();$.2a(4,{m:17,2e:B,2k:B,31:17});5(4.1M.1z){$(4.1M.1z).3g(4.h)}11{$(4.1M.P).4B(4.h)}w 16},4c:k(o){6 u=4.30(o&&o.27);6 2E=[];o=o||{};$(u).1S(k(){6 1Y=($(o.g||4).3r(o.3G||\'3k\')||\'\').4y(o.3f||(/(.+)[-=4x](.+)/));5(1Y)2E.W((o.3m||1Y[1]+\'[]\')+\'=\'+(o.3m&&o.3f?1Y[1]:1Y[2]))});w 2E.4K(\'&\')},47:k(o){6 u=4.30(o&&o.27);6 2y=[];o=o||{};u.1S(k(){2y.W($(o.g||4).3r(o.3G||\'3k\')||\'\')});w 2y},3j:k(g){6 1Q=4.Y.8,3o=1Q+4.13.I,1Z=4.Y.e,3l=1Z+4.13.H;6 l=g.8,r=l+g.I,t=g.e,b=t+g.H;6 3b=4.f.E.e,2v=4.f.E.8;6 2j=(1Z+3b)>t&&(1Z+3b)<b&&(1Q+2v)>l&&(1Q+2v)<r;5(4.n.2d=="2B"||4.n.4R||(4.n.2d!="2B"&&4.13[4.1t?\'I\':\'H\']>g[4.1t?\'I\':\'H\'])){w 2j}11{w(l<1Q+(4.13.I/2) &&3o-(4.13.I/2)<r &&t<1Z+(4.13.H/2) &&3l-(4.13.H/2)<b); }},3E:k(g){6 3n=$.z.2m(4.Y.e+4.f.E.e,g.e,g.H),3w=$.z.2m(4.Y.8+4.f.E.8,g.8,g.I),2j=3n&&3w,1q=4.2Q(),1u=4.3d();5(!2j)w B;w 4.1t?(((1u&&1u=="1K")||1q=="1G")?2:1):(1q&&(1q=="1G"?2:1))},3q:k(g){6 2Z=$.z.2m(4.Y.e+4.f.E.e,g.e+(g.H/2),g.H),2V=$.z.2m(4.Y.8+4.f.E.8,g.8+(g.I/2),g.I),1q=4.2Q(),1u=4.3d();5(4.1t&&1u){w((1u=="1K"&&2V)||(1u=="8"&&!2V))}11{w 1q&&((1q=="1G"&&2Z)||(1q=="2q"&&!2Z))}},2Q:k(){6 1F=4.Y.e-4.1O.e;w 1F!=0&&(1F>0?"1G":"2q")},3d:k(){6 1F=4.Y.8-4.1O.8;w 1F!=0&&(1F>0?"1K":"8")},3t:k(9){4.38(9);4.2i()},33:k(){6 n=4.n;w n.15.3z==3A?[n.15]:n.15},30:k(27){6 q=4;6 u=[];6 1f=[];6 15=4.33();5(15&&27){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J):$(G.n.u,G.J).2p(".z-N-m"),G])}}}}1f.W([$.23(4.n.u)?4.n.u.19(4.J,17,{n:4.n,g:4.h}):$(4.n.u,4.J).2p(".z-N-m"),4]);O(6 i=1f.K-1;i>=0;i--){1f[i][0].1S(k(){u.W(4)})};w $(u)},3v:k(){6 3a=4.h.3s(":1I(N-g)");O(6 i=0;i<4.u.K;i++){O(6 j=0;j<3a.K;j++){5(3a[j]==4.u[i].g[0])4.u.5f(i,1)}}},38:k(9){4.u=[];4.s=[4];6 u=4.u;6 q=4;6 1f=[[$.23(4.n.u)?4.n.u.19(4.J[0],9,{g:4.h}):$(4.n.u,4.J),4]];6 15=4.33();5(15){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J[0],9,{g:4.h}):$(G.n.u,G.J),G]);4.s.W(G)}}}}O(6 i=1f.K-1;i>=0;i--){6 2o=1f[i][1];6 2w=1f[i][0];O(6 j=0,3p=2w.K;j<3p;j++){6 g=$(2w[j]);g.1I(\'N-g\',2o);u.W({g:g,3x:2o,I:0,H:0,8:0,e:0})}}},2i:k(3F){5(4.Q&&4.m){4.f.P=4.2H()}O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i];5(g.3x!=4.1J&&4.1J&&g.g[0]!=4.h[0])26;6 t=4.n.3D?$(4.n.3D,g.g):g.g;5(!3F){g.I=t.2C();g.H=t.2A()}6 p=t.f();g.8=p.8;g.e=p.e};5(4.n.2I&&4.n.2I.3C){4.n.2I.3C.19(4)}11{O(6 i=4.s.K-1;i>=0;i--){6 p=4.s[i].J.f();4.s[i].12.8=p.8;4.s[i].12.e=p.e;4.s[i].12.I=4.s[i].J.2C();4.s[i].12.H=4.s[i].J.2A()}}},3B:k(3y){6 q=3y||4,o=q.n;5(!o.F||o.F.3z==3A){6 21=o.F;o.F={J:k(){6 2G=$(D.5c(q.h[0].59)).2N(21||q.h[0].21+" z-N-F").2h("z-N-m")[0];5(!21)2G.1s.5a="46";w 2G},22:k(5h,p){5(21&&!o.4k)w;5(!p.H()){p.H(q.h.5g()-R(q.h.v(\'3H\')||0,10)-R(q.h.v(\'3J\')||0,10))};5(!p.I()){p.I(q.h.5m()-R(q.h.v(\'42\')||0,10)-R(q.h.v(\'3P\')||0,10))}}}}q.F=$(o.F.J.19(q.J,q.h));q.h.3g(q.F);o.F.22(q,q.F)},3i:k(9){O(6 i=4.s.K-1;i>=0;i--){5(4.3j(4.s[i].12)){5(!4.s[i].12.1b){5(4.1J!=4.s[i]){6 37=5o;6 1X=17;6 3e=4.Y[4.s[i].1t?\'8\':\'e\'];O(6 j=4.u.K-1;j>=0;j--){5(!$.z.1p(4.s[i].J[0],4.u[j].g[0]))26;6 1a=4.u[j][4.s[i].1t?\'8\':\'e\'];5(1N.3h(1a-3e)<37){37=1N.3h(1a-3e);1X=4.u[j]}}5(!1X&&!4.n.3Q)26;4.1J=4.s[i];1X?4.25(9,1X,17,16):4.25(9,17,4.s[i].J,16);4.L("32",9,4.M());4.s[i].L("32",9,4.M(4));4.n.F.22(4.1J,4.F)}4.s[i].L("1b",9,4.M(4));4.s[i].12.1b=1}}11{5(4.s[i].12.1b){4.s[i].L("36",9,4.M(4));4.s[i].12.1b=0}}}},45:k(9){6 o=4.n;6 m=$.23(o.m)?$(o.m.3K(4.J[0],[9,4.h])):(o.m==\'4a\'?4.h.4a():4.h);5(!m.48(\'1e\').K)$(o.2r!=\'P\'?o.2r:4.h[0].1l)[0].3V(m[0]);5(m[0]==4.h[0])4.1y={I:4.h[0].1s.I,H:4.h[0].1s.H,1c:4.h.v("1c"),e:4.h.v("e"),8:4.h.v("8")};5(m[0].1s.I==\'\'||o.2Y)m.I(4.h.I());5(m[0].1s.H==\'\'||o.2Y)m.H(4.h.H());w m},44:k(1o){5(1o.8!=2c)4.f.E.8=1o.8+4.V.8;5(1o.1K!=2c)4.f.E.8=4.13.I-1o.1K+4.V.8;5(1o.e!=2c)4.f.E.e=1o.e+4.V.e;5(1o.4i!=2c)4.f.E.e=4.13.H-1o.4i+4.V.e},2H:k(){4.Q=4.m.Q();6 1L=4.Q.f();5(4.14==\'1B\'&&4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0])){1L.8+=4.A.S();1L.e+=4.A.T()}5((4.Q[0]==D.1e)||(4.Q[0].1H&&4.Q[0].1H.5n()==\'2O\'&&$.1U.5i))1L={e:0,8:0};w{e:1L.e+(R(4.Q.v("2x"),10)||0),8:1L.8+(R(4.Q.v("2K"),10)||0)}},35:k(){5(4.14=="1i"){6 p=4.h.1c();w{e:p.e-(R(4.m.v("e"),10)||0)+4.A.T(),8:p.8-(R(4.m.v("8"),10)||0)+4.A.S()}}11{w{e:0,8:0}}},4g:k(){4.V={8:(R(4.h.v("5k"),10)||0),e:(R(4.h.v("4O"),10)||0)}},2D:k(){4.13={I:4.m.2C(),H:4.m.2A()}},4e:k(){6 o=4.n;5(o.C==\'P\')o.C=4.m[0].1l;5(o.C==\'D\'||o.C==\'1A\')4.C=[0-4.f.1i.8-4.f.P.8,0-4.f.1i.e-4.f.P.e,$(o.C==\'D\'?D:1A).I()-4.13.I-4.V.8,($(o.C==\'D\'?D:1A).H()||D.1e.1l.3I)-4.13.H-4.V.e];5(!(/^(D|1A|P)$/).29(o.C)){6 U=$(o.C)[0];6 1V=$(o.C).f();6 1b=($(U).v("5b")!=\'46\');4.C=[1V.8+(R($(U).v("2K"),10)||0)+(R($(U).v("42"),10)||0)-4.V.8,1V.e+(R($(U).v("2x"),10)||0)+(R($(U).v("3H"),10)||0)-4.V.e,1V.8+(1b?1N.3M(U.58,U.2L):U.2L)-(R($(U).v("2K"),10)||0)-(R($(U).v("3P"),10)||0)-4.13.I-4.V.8,1V.e+(1b?1N.3M(U.3I,U.2z):U.2z)-(R($(U).v("2x"),10)||0)-(R($(U).v("3J"),10)||0)-4.13.H-4.V.e]}},2s:k(d,1R){5(!1R)1R=4.1c;6 1C=d=="1B"?1:-1;6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);w{e:(1R.e+4.f.1i.e*1C+4.f.P.e*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T()))*1C)),8:(1R.8+4.f.1i.8*1C+4.f.P.8*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())*1C))}},2t:k(9){6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);5(4.14==\'1i\'&&!(4.A[0]!=D&&4.A[0]!=4.Q[0])){4.f.1i=4.35()}6 Z=9.Z;6 X=9.X;5(4.3Z){5(4.C){5(9.Z-4.f.E.8<4.C[0])Z=4.C[0]+4.f.E.8;5(9.X-4.f.E.e<4.C[1])X=4.C[1]+4.f.E.e;5(9.Z-4.f.E.8>4.C[2])Z=4.C[2]+4.f.E.8;5(9.X-4.f.E.e>4.C[3])X=4.C[3]+4.f.E.e}5(o.1g){6 e=4.34+1N.41((X-4.34)/o.1g[1])*o.1g[1];X=4.C?(!(e-4.f.E.e<4.C[1]||e-4.f.E.e>4.C[3])?e:(!(e-4.f.E.e<4.C[1])?e-o.1g[1]:e+o.1g[1])):e;6 8=4.3c+1N.41((Z-4.3c)/o.1g[0])*o.1g[0];Z=4.C?(!(8-4.f.E.8<4.C[0]||8-4.f.E.8>4.C[2])?8:(!(8-4.f.E.8<4.C[0])?8-o.1g[0]:8+o.1g[0])):8}}w{e:(X-4.f.E.e-4.f.1i.e-4.f.P.e+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T())))),8:(Z-4.f.E.8-4.f.1i.8-4.f.P.8+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())))}},25:k(9,i,a,3X){a?a[0].3V(4.F[0]):i.g[0].1l.55(4.F[0],(4.3O==\'1G\'?i.g[0]:i.g[0].56));4.1x=4.1x?++4.1x:1;6 q=4,1x=4.1x;1A.53(k(){5(1x==q.1x)q.2i(!3X)},0)},2U:k(9,1d){4.2k=B;6 18=[],q=4;5(!4.31&&4.h[0].1l)4.F.52(4.h);4.31=17;5(4.m[0]==4.h[0]){O(6 i 4Z 4.1y){5(4.1y[i]==\'2T\'||4.1y[i]==\'3L\')4.1y[i]=\'\'}4.h.v(4.1y).2h("z-N-m")}11{4.h.43()}5(4.2l&&!1d)18.W(k(9){4.L("4d",9,4.M(4.2l))});5((4.2l||4.1M.1z!=4.h.1z().2p(".z-N-m")[0]||4.1M.P!=4.h.P()[0])&&!1d)18.W(k(9){4.L("22",9,4.M())});5(!$.z.1p(4.J[0],4.h[0])){5(!1d)18.W(k(9){4.L("2M",9,4.M())});O(6 i=4.s.K-1;i>=0;i--){5($.z.1p(4.s[i].J[0],4.h[0])&&!1d){18.W((k(c){w k(9){c.L("4d",9,4.M(4))}}).19(4,4.s[i]));18.W((k(c){w k(9){c.L("22",9,4.M(4))}}).19(4,4.s[i]))}}};O(6 i=4.s.K-1;i>=0;i--){5(!1d)18.W((k(c){w k(9){c.L("4h",9,4.M(4))}}).19(4,4.s[i]));5(4.s[i].12.1b){18.W((k(c){w k(9){c.L("36",9,4.M(4))}}).19(4,4.s[i]));4.s[i].12.1b=0}}5(4.39)$(\'1e\').v("1D",4.39);5(4.2P)4.m.v("1w",4.2P);5(4.2f)4.m.v("1v",4.2f==\'2T\'?\'\':4.2f);4.2e=B;5(4.51){5(!1d){4.L("49",9,4.M());O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}w B}5(!1d)4.L("49",9,4.M());4.F[0].1l.4j(4.F[0]);5(4.m[0]!=4.h[0])4.m.2M();4.m=17;5(!1d){O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}4.2l=B;w 16},L:k(){5($.4f.57.L.3K(4,50)===B){4.2u()}},M:k(G){6 q=G||4;w{m:q.m,F:q.F||$([]),1c:q.1c,4X:q.Y,f:q.Y,g:q.h,4W:G?G.J:17}}}));$.2a($.z.N,{5p:"4c 47",5d:"1.7.2",5e:"3u",5l:{2r:"P",1W:B,2u:":5j,4S",15:B,C:B,1D:\'2T\',2R:B,4Y:0,54:1,3Q:16,4k:B,2Y:B,1g:B,2J:B,m:"2W",u:\'> *\',1w:B,F:B,2X:B,1j:16,1m:20,1n:20,4Q:"4P",2d:"4T",1v:4U}})})(4V);',62,336,'||||this|if|var||left|event|||||top|offset|item|currentItem|||function||helper|options|||self||containers||items|css|return|||ui|scrollParent|false|containment|document|click|placeholder|inst|height|width|element|length|_trigger|_uiHash|sortable|for|parent|offsetParent|parseInt|scrollLeft|scrollTop|ce|margins|push|pageY|positionAbs|pageX||else|containerCache|helperProportions|cssPosition|connectWith|true|null|delayedTriggers|call|cur|over|position|noPropagation|body|queries|grid|ddmanager|relative|scroll|scrolled|parentNode|scrollSensitivity|scrollSpeed|obj|contains|verticalDirection|fixed|style|floating|horizontalDirection|zIndex|opacity|counter|_storedCSS|prev|window|absolute|mod|cursor|scrollIsRootNode|delta|down|tagName|data|currentContainer|right|po|domPosition|Math|lastPositionAbs|itemElement|x1|pos|each|overflowOffset|browser|co|axis|itemWithLeastDistance|res|y1||className|update|isFunction|safari|_rearrange|continue|connected|target|test|extend|intersection|undefined|tolerance|dragging|_storedZIndex|disabled|removeClass|refreshPositions|isOverElement|reverting|fromOutside|isOverAxis|overrideHandle|targetData|not|up|appendTo|_convertPositionTo|_generatePosition|cancel|dxClick|_queries|borderTopWidth|ret|offsetHeight|outerHeight|pointer|outerWidth|_cacheHelperProportions|str|dropBehaviour|el|_getParentOffset|custom|handle|borderLeftWidth|offsetWidth|remove|addClass|html|_storedOpacity|_getDragVerticalDirection|cursorAt|validHandle|auto|_clear|isOverRightHalf|original|revert|forceHelperSize|isOverBottomHalf|_getItemsAsjQuery|_noFinalSort|change|_connectWith|originalPageY|_getRelativeOffset|out|dist|_refreshItems|_storedCursor|list|dyClick|originalPageX|_getDragHorizontalDirection|base|expression|after|abs|_contactContainers|_intersectsWith|id|y2|key|isOverElementHeight|x2|queriesLength|_intersectsWithSides|attr|find|refresh|sort|_removeCurrentsFromItems|isOverElementWidth|instance|that|constructor|String|_createPlaceholder|refreshContainers|toleranceElement|_intersectsWithPointer|fast|attribute|paddingTop|scrollHeight|paddingBottom|apply|static|max|break|direction|paddingRight|dropOnEmpty|type|noActivation|removeData|_mouseDrag|appendChild|HTML|hardRefresh|prepareOffsets|originalPosition|px|round|paddingLeft|show|_adjustOffsetFromHelper|_createHelper|hidden|toArray|parents|beforeStop|clone|stop|serialize|receive|_setContainment|widget|_cacheMargins|deactivate|bottom|removeChild|forcePlaceholderSize|current|_mouseStart|activate|_preserveHelperProportions|hide|start|mouse|next|500|animate|drop|destroy|_|match|_mouseInit|float|prepend|_mouseStop|drag|unbind|_mouseDestroy|_mouseCapture|nodes|_mouseUp|_init|join|dynamic|semi|andSelf|marginTop|default|scope|forcePointerForContainers|option|intersect|1000|jQuery|sender|absolutePosition|delay|in|arguments|cancelHelperRemoval|before|setTimeout|distance|insertBefore|nextSibling|prototype|scrollWidth|nodeName|visibility|overflow|createElement|version|eventPrefix|splice|innerHeight|container|msie|input|marginLeft|defaults|innerWidth|toLowerCase|10000|getter'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.tabs.packed.js b/themes/default/js/ui/packed/ui.tabs.packed.js
new file mode 100644
index 000000000..20da11c44
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.tabs.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){$.J("4.5",{2W:8(){b(3.x.1J!==1O){3.x.Q=3.x.1J}3.1q(1e)},2X:8(1C,1m){b(1C==\'d\'){b(3.x.Q&&1m==3.x.d){z}3.1l(1m)}I{3.x[1C]=1m;b(1C==\'1J\'){3.x.Q=1m}3.1q()}},1Q:8(a){z a.29&&a.29.14(/\\s/g,\'26\').14(/[^A-2V-2U-9\\-26:\\.]/g,\'\')||3.x.2s+$.H(a)},1s:8(11){z 11.14(/:/g,\'\\\\:\')},16:8(){j B=3.B||(3.B=3.x.B.2S||\'4-5-\'+$.H(3.12[0]));z $.B.2T(y,[B].2h($.2Y(2Z)))},K:8(1G,u){z{1G:1G,u:u,c:3.f.c(1G)}},22:8(){3.k.V(\'.4-h-1B\').D(\'4-h-1B\').2n(\'1a:H(Y.5)\').1f(8(){j G=$(3);G.1u(G.H(\'Y.5\')).1n(\'Y.5\')})},1q:8(28){3.12=3.C.35(\'33:32\');3.k=$(\'l:30(a[m])\',3.12);3.f=3.k.1z(8(){z $(\'a\',3)[0]});3.w=$([]);j 6=3,o=3.x;j 24=/^#.+/;3.f.1f(8(i,a){j m=$(a).1R(\'m\');j 1D=m.2a(\'#\')[0],1U;b(1D&&(1D===1L.31().2a(\'#\')[0]||(1U=$(\'2P\')[0])&&1D===1U.m)){m=a.11;a.m=m}b(24.2J(m)){6.w=6.w.19(6.1s(m))}I b(m!=\'#\'){$.H(a,\'m.5\',m);$.H(a,\'R.5\',m.14(/#.*$/,\'\'));j T=6.1Q(a);a.m=\'#\'+T;j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).v(\'4-5-u 4-J-1h 4-M-1t\').2F(6.w[i-1]||6.12);$u.H(\'1o.5\',1e)}6.w=6.w.19($u)}I{o.p.2y(i)}});b(28){3.C.v(\'4-5 4-J 4-J-1h 4-M-1w\');3.12.v(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.k.v(\'4-h-15 4-M-1P\');3.w.v(\'4-5-u 4-J-1h 4-M-1t\');b(o.d===1O){b(1L.11){3.f.1f(8(i,a){b(a.11==1L.11){o.d=i;z O}})}b(1X o.d!=\'2l\'&&o.B){o.d=2Q(6.16(),10)}b(1X o.d!=\'2l\'&&3.k.V(\'.4-5-d\').F){o.d=3.k.c(3.k.V(\'.4-5-d\'))}o.d=o.d||0}I b(o.d===y){o.d=-1}o.d=((o.d>=0&&3.f[o.d])||o.d<0)?o.d:0;o.p=$.2O(o.p.2h($.1z(3.k.V(\'.4-h-p\'),8(n,i){z 6.k.c(n)}))).2r();b($.1y(o.d,o.p)!=-1){o.p.2N($.1y(o.d,o.p),1)}3.w.v(\'4-5-q\');3.k.D(\'4-5-d 4-h-Z\');b(o.d>=0&&3.f.F){3.w.N(o.d).D(\'4-5-q\');3.k.N(o.d).v(\'4-5-d 4-h-Z\');6.C.13("5",8(){6.P(\'E\',y,6.K(6.f[o.d],6.w[o.d]))});3.R(o.d)}$(2L).S(\'37\',8(){6.k.19(6.f).1c(\'.5\');6.k=6.f=6.w=y})}I{o.d=3.k.c(3.k.V(\'.4-5-d\'))}3.C[o.Q?\'v\':\'D\'](\'4-5-Q\');b(o.B){3.16(o.d,o.B)}2M(j i=0,l;(l=3.k[i]);i++){$(l)[$.1y(i,o.p)!=-1&&!$(l).1g(\'4-5-d\')?\'v\':\'D\'](\'4-h-p\')}b(o.U===O){3.f.1n(\'U.5\')}3.k.19(3.f).1c(\'.5\');b(o.1d!=\'2g\'){j 1N=8(h,G){b(G.36(\':27(.4-h-p)\')){G.v(\'4-h-\'+h)}};j 1I=8(h,G){G.D(\'4-h-\'+h)};3.k.S(\'2g.5\',8(){1N(\'1K\',$(3))});3.k.S(\'3q.5\',8(){1I(\'1K\',$(3))});3.f.S(\'1A.5\',8(){1N(\'1A\',$(3).1r(\'l\'))});3.f.S(\'1j.5\',8(){1I(\'1A\',$(3).1r(\'l\'))})}j 18,1b;b(o.X){b($.3o(o.X)){18=o.X[0];1b=o.X[1]}I{18=1b=o.X}}8 21($G,X){$G.3m({3n:\'\'});b($.2e.25&&X.3t){$G[0].3s.3u(\'V\')}}j 23=1b?8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.q().D(\'4-5-q\').2i(1b,1b.2k||\'2m\',8(){21($E,1b);6.P(\'E\',y,6.K(W,$E[0]))})}:8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.D(\'4-5-q\');6.P(\'E\',y,6.K(W,$E[0]))};j 1Z=18?8(W,$q){$q.2i(18,18.2k||\'2m\',8(){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');21($q,18);6.C.1i("5")})}:8(W,$q,$E){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');6.C.1i("5")};3.f.S(o.1d+\'.5\',8(){j G=3,$l=$(3).1r(\'l\'),$q=6.w.V(\':27(.4-5-q)\'),$E=$(6.1s(3.11));b(($l.1g(\'4-5-d\')&&!o.Q)||$l.1g(\'4-h-p\')||$l.1g(\'4-h-1B\')||6.P(\'1l\',y,6.K(3,$E[0]))===O){3.1j();z O}o.d=6.f.c(3);6.1k();b(o.Q){b($l.1g(\'4-5-d\')){o.d=-1;b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){1Z(G,$q)}).1i("5");3.1j();z O}I b(!$q.F){b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3));3.1j();z O}}b(o.B){6.16(o.d,o.B)}b($E.F){b($q.F){6.C.13("5",8(){1Z(G,$q)})}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3))}I{3a\'2E 38 39: 3d 3e 3j.\'}b($.2e.25){3.1j()}});3.f.S(\'2o.5\',8(){z O})},1o:8(){j o=3.x;3.1k();3.C.1c(\'.5\').D(\'4-5 4-J 4-J-1h 4-M-1w 4-5-Q\').1n(\'5\');3.12.D(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.f.1f(8(){j m=$.H(3,\'m.5\');b(m){3.m=m}j $3=$(3).1c(\'.5\');$.1f([\'m\',\'R\',\'U\'],8(i,2f){$3.1n(2f+\'.5\')})});3.k.1c(\'.5\').19(3.w).1f(8(){b($.H(3,\'1o.5\')){$(3).1p()}I{$(3).D([\'4-h-15\',\'4-M-1P\',\'4-5-d\',\'4-h-Z\',\'4-h-1K\',\'4-h-1A\',\'4-h-p\',\'4-5-u\',\'4-J-1h\',\'4-M-1t\',\'4-5-q\'].2K(\' \'))}});b(o.B){3.16(y,o.B)}},19:8(L,Y,c){b(c===1O){c=3.f.F}j 6=3,o=3.x,$l=$(o.2x.14(/#\\{m\\}/g,L).14(/#\\{Y\\}/g,Y)),T=!L.3p(\'#\')?L.14(\'#\',\'\'):3.1Q($(\'a\',$l)[0]);$l.v(\'4-h-15 4-M-1P\').H(\'1o.5\',1e);j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).H(\'1o.5\',1e)}$u.v(\'4-5-u 4-J-1h 4-M-1t 4-5-q\');b(c>=3.k.F){$l.2B(3.12);$u.2B(3.12[0].2R)}I{$l.2D(3.k[c]);$u.2D(3.w[c])}o.p=$.1z(o.p,8(n,i){z n>=c?++n:n});3.1q();b(3.f.F==1){$l.v(\'4-5-d 4-h-Z\');$u.D(\'4-5-q\');3.C.13("5",8(){6.P(\'E\',y,6.K(6.f[0],6.w[0]))});3.R(0)}3.P(\'19\',y,3.K(3.f[c],3.w[c]))},1p:8(c){j o=3.x,$l=3.k.N(c).1p(),$u=3.w.N(c).1p();b($l.1g(\'4-5-d\')&&3.f.F>1){3.1l(c+(c+1<3.f.F?1:-1))}o.p=$.1z($.2A(o.p,8(n,i){z n!=c}),8(n,i){z n>=c?--n:n});3.1q();3.P(\'1p\',y,3.K($l.2n(\'a\')[0],$u[0]))},2C:8(c){j o=3.x;b($.1y(c,o.p)==-1){z}3.k.N(c).D(\'4-h-p\');o.p=$.2A(o.p,8(n,i){z n!=c});3.P(\'2C\',y,3.K(3.f[c],3.w[c]))},2q:8(c){j 6=3,o=3.x;b(c!=o.d){3.k.N(c).v(\'4-h-p\');o.p.2y(c);o.p.2r();3.P(\'2q\',y,3.K(3.f[c],3.w[c]))}},1l:8(c){b(1X c==\'3g\'){c=3.f.c(3.f.V(\'[m$=\'+c+\']\'))}I b(c===y){c=-1}b(c==-1&&3.x.Q){c=3.x.d}3.f.N(c).3f(3.x.1d+\'.5\')},R:8(c){j 6=3,o=3.x,a=3.f.N(c)[0],L=$.H(a,\'R.5\');3.1k();b(!L||3.C.13("5").F!==0&&$.H(a,\'U.5\')){3.C.1i("5");z}3.k.N(c).v(\'4-h-1B\');b(o.1M){j 1a=$(\'1a\',a);1a.H(\'Y.5\',1a.1u()).1u(o.1M)}3.1F=$.3h($.1V({},o.20,{L:L,2p:8(r,s){$(6.1s(a.11)).1u(r);6.22();b(o.U){$.H(a,\'U.5\',1e)}6.P(\'R\',y,6.K(6.f[c],6.w[c]));3i{o.20.2p(r,s)}3l(e){}6.C.1i("5")}}))},1k:8(){3.C.13([]);3.w.1v(O,1e);b(3.1F){3.1F.1k();1W 3.1F}3.22()},L:8(c,L){3.f.N(c).1n(\'U.5\').H(\'R.5\',L)},F:8(){z 3.f.F}});$.1V($.4.5,{3c:\'1.7.2\',3k:\'F\',3v:{20:y,U:O,B:y,Q:O,p:[],1d:\'2o\',X:y,2s:\'4-5-\',1T:\'<2z></2z>\',1M:\'<2t>3r&#3b;</2t>\',2x:\'<l><a m="#{m}"><1a>#{Y}</1a></a></l>\'}});$.1V($.4.5.2I,{1E:y,17:8(1S,2w){j 6=3,o=3.x;j 17=6.1Y||(6.1Y=8(e){2v(6.1E);6.1E=2G(8(){j t=o.d;6.1l(++t<6.f.F?t:0)},1S);b(e){e.2H()}});j 1v=6.1H||(6.1H=!2w?8(e){b(e.34){6.17(y)}}:8(e){t=o.d;17()});b(1S){3.C.S(\'2u\',17);3.f.S(o.1d+\'.5\',1v);17()}I{2v(6.1E);3.C.1c(\'2u\',17);3.f.1c(o.1d+\'.5\',1v);1W 3.1Y;1W 3.1H}}})})(2E);',62,218,'|||this|ui|tabs|self||function|||if|index|selected||anchors||state||var|lis|li|href|||disabled|hide||||panel|addClass|panels|options|null|return||cookie|element|removeClass|show|length|el|data|else|widget|_ui|url|corner|eq|false|_trigger|collapsible|load|bind|id|cache|filter|clicked|fx|label|active||hash|list|queue|replace|default|_cookie|rotate|hideFx|add|span|showFx|unbind|event|true|each|hasClass|content|dequeue|blur|abort|select|value|removeData|destroy|remove|_tabify|closest|_sanitizeSelector|bottom|html|stop|all|helper|inArray|map|focus|processing|key|hrefBase|rotation|xhr|tab|_unrotate|removeState|deselectable|hover|location|spinner|addState|undefined|top|_tabId|attr|ms|panelTemplate|baseEl|extend|delete|typeof|_rotate|hideTab|ajaxOptions|resetStyle|_cleanup|showTab|fragmentId|msie|_|not|init|title|split|nav|clearfix|header|browser|prefix|mouseover|concat|animate|reset|duration|number|normal|find|click|success|disable|sort|idPrefix|em|tabsshow|clearTimeout|continuing|tabTemplate|push|div|grep|appendTo|enable|insertBefore|jQuery|insertAfter|setTimeout|stopPropagation|prototype|test|join|window|for|splice|unique|base|parseInt|parentNode|name|apply|z0|Za|_init|_setData|makeArray|arguments|has|toString|first|ul|clientX|children|is|unload|UI|Tabs|throw|8230|version|Mismatching|fragment|trigger|string|ajax|try|identifier|getter|catch|css|display|isArray|indexOf|mouseout|Loading|style|opacity|removeAttribute|defaults'.split('|'),0,{}))
diff --git a/themes/default/js/ui/theme/ui.datepicker.css b/themes/default/js/ui/theme/ui.datepicker.css
new file mode 100644
index 000000000..567f8c97b
--- /dev/null
+++ b/themes/default/js/ui/theme/ui.datepicker.css
@@ -0,0 +1,62 @@
+/* Datepicker
+----------------------------------*/
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+} \ No newline at end of file
diff --git a/themes/default/js/ui/ui.accordion.js b/themes/default/js/ui/ui.accordion.js
new file mode 100644
index 000000000..e469c3a61
--- /dev/null
+++ b/themes/default/js/ui/ui.accordion.js
@@ -0,0 +1,477 @@
+/*
+ * jQuery UI Accordion 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.accordion", {
+
+ _init: function() {
+
+ var o = this.options, self = this;
+ this.running = 0;
+
+ // if the user set the alwaysOpen option on init
+ // then we need to set the collapsible option
+ // if they set both on init, collapsible will take priority
+ if (o.collapsible == $.ui.accordion.defaults.collapsible &&
+ o.alwaysOpen != $.ui.accordion.defaults.alwaysOpen) {
+ o.collapsible = !o.alwaysOpen;
+ }
+
+ if ( o.navigation ) {
+ var current = this.element.find("a").filter(o.navigationFilter);
+ if ( current.length ) {
+ if ( current.filter(o.header).length ) {
+ this.active = current;
+ } else {
+ this.active = current.parent().parent().prev();
+ current.addClass("ui-accordion-content-active");
+ }
+ }
+ }
+
+ this.element.addClass("ui-accordion ui-widget ui-helper-reset");
+
+ // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix
+ if (this.element[0].nodeName == "UL") {
+ this.element.children("li").addClass("ui-accordion-li-fix");
+ }
+
+ this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
+ .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
+ .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); })
+ .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); })
+ .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); });
+
+ this.headers
+ .next()
+ .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+
+ this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
+ this.active.next().addClass('ui-accordion-content-active');
+
+ //Append icon elements
+ $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers);
+ this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);
+
+ // IE7-/Win - Extra vertical space in lists fixed
+ if ($.browser.msie) {
+ this.element.find('a').css('zoom', '1');
+ }
+
+ this.resize();
+
+ //ARIA
+ this.element.attr('role','tablist');
+
+ this.headers
+ .attr('role','tab')
+ .bind('keydown', function(event) { return self._keydown(event); })
+ .next()
+ .attr('role','tabpanel');
+
+ this.headers
+ .not(this.active || "")
+ .attr('aria-expanded','false')
+ .attr("tabIndex", "-1")
+ .next()
+ .hide();
+
+ // make sure at least one header is in the tab order
+ if (!this.active.length) {
+ this.headers.eq(0).attr('tabIndex','0');
+ } else {
+ this.active
+ .attr('aria-expanded','true')
+ .attr('tabIndex', '0');
+ }
+
+ // only need links in taborder for Safari
+ if (!$.browser.safari)
+ this.headers.find('a').attr('tabIndex','-1');
+
+ if (o.event) {
+ this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); });
+ }
+
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.element
+ .removeClass("ui-accordion ui-widget ui-helper-reset")
+ .removeAttr("role")
+ .unbind('.accordion')
+ .removeData('accordion');
+
+ this.headers
+ .unbind(".accordion")
+ .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
+ .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
+
+ this.headers.find("a").removeAttr("tabindex");
+ this.headers.children(".ui-icon").remove();
+ var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
+ if (o.autoHeight || o.fillHeight) {
+ contents.css("height", "");
+ }
+ },
+
+ _setData: function(key, value) {
+ if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; }
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _keydown: function(event) {
+
+ var o = this.options, keyCode = $.ui.keyCode;
+
+ if (o.disabled || event.altKey || event.ctrlKey)
+ return;
+
+ var length = this.headers.length;
+ var currentIndex = this.headers.index(event.target);
+ var toFocus = false;
+
+ switch(event.keyCode) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[(currentIndex + 1) % length];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[(currentIndex - 1 + length) % length];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ return this._clickHandler({ target: event.target }, event.target);
+ }
+
+ if (toFocus) {
+ $(event.target).attr('tabIndex','-1');
+ $(toFocus).attr('tabIndex','0');
+ toFocus.focus();
+ return false;
+ }
+
+ return true;
+
+ },
+
+ resize: function() {
+
+ var o = this.options, maxHeight;
+
+ if (o.fillSpace) {
+
+ if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); }
+ maxHeight = this.element.parent().height();
+ if($.browser.msie) { this.element.parent().css('overflow', defOverflow); }
+
+ this.headers.each(function() {
+ maxHeight -= $(this).outerHeight();
+ });
+
+ var maxPadding = 0;
+ this.headers.next().each(function() {
+ maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
+ }).height(Math.max(0, maxHeight - maxPadding))
+ .css('overflow', 'auto');
+
+ } else if ( o.autoHeight ) {
+ maxHeight = 0;
+ this.headers.next().each(function() {
+ maxHeight = Math.max(maxHeight, $(this).outerHeight());
+ }).height(maxHeight);
+ }
+
+ },
+
+ activate: function(index) {
+ // call clickHandler with custom event
+ var active = this._findActive(index)[0];
+ this._clickHandler({ target: active }, active);
+ },
+
+ _findActive: function(selector) {
+ return selector
+ ? typeof selector == "number"
+ ? this.headers.filter(":eq(" + selector + ")")
+ : this.headers.not(this.headers.not(selector))
+ : selector === false
+ ? $([])
+ : this.headers.filter(":eq(0)");
+ },
+
+ _clickHandler: function(event, target) {
+
+ var o = this.options;
+ if (o.disabled) return false;
+
+ // called only when using activate(false) to close all parts programmatically
+ if (!event.target && o.collapsible) {
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ var toHide = this.active.next(),
+ data = {
+ options: o,
+ newHeader: $([]),
+ oldHeader: o.active,
+ newContent: $([]),
+ oldContent: toHide
+ },
+ toShow = (this.active = $([]));
+ this._toggle(toShow, toHide, data);
+ return false;
+ }
+
+ // get the click target
+ var clicked = $(event.currentTarget || target);
+ var clickedIsActive = clicked[0] == this.active[0];
+
+ // if animations are still active, or the active header is the target, ignore click
+ if (this.running || (!o.collapsible && clickedIsActive)) {
+ return false;
+ }
+
+ // switch classes
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ if (!clickedIsActive) {
+ clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
+ .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);
+ clicked.next().addClass('ui-accordion-content-active');
+ }
+
+ // find elements to show and hide
+ var toShow = clicked.next(),
+ toHide = this.active.next(),
+ data = {
+ options: o,
+ newHeader: clickedIsActive && o.collapsible ? $([]) : clicked,
+ oldHeader: this.active,
+ newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'),
+ oldContent: toHide.find('> *')
+ },
+ down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
+
+ this.active = clickedIsActive ? $([]) : clicked;
+ this._toggle(toShow, toHide, data, clickedIsActive, down);
+
+ return false;
+
+ },
+
+ _toggle: function(toShow, toHide, data, clickedIsActive, down) {
+
+ var o = this.options, self = this;
+
+ this.toShow = toShow;
+ this.toHide = toHide;
+ this.data = data;
+
+ var complete = function() { if(!self) return; return self._completed.apply(self, arguments); };
+
+ // trigger changestart event
+ this._trigger("changestart", null, this.data);
+
+ // count elements to animate
+ this.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+
+ if (o.animated) {
+
+ var animOptions = {};
+
+ if ( o.collapsible && clickedIsActive ) {
+ animOptions = {
+ toShow: $([]),
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ } else {
+ animOptions = {
+ toShow: toShow,
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ }
+
+ if (!o.proxied) {
+ o.proxied = o.animated;
+ }
+
+ if (!o.proxiedDuration) {
+ o.proxiedDuration = o.duration;
+ }
+
+ o.animated = $.isFunction(o.proxied) ?
+ o.proxied(animOptions) : o.proxied;
+
+ o.duration = $.isFunction(o.proxiedDuration) ?
+ o.proxiedDuration(animOptions) : o.proxiedDuration;
+
+ var animations = $.ui.accordion.animations,
+ duration = o.duration,
+ easing = o.animated;
+
+ if (!animations[easing]) {
+ animations[easing] = function(options) {
+ this.slide(options, {
+ easing: easing,
+ duration: duration || 700
+ });
+ };
+ }
+
+ animations[easing](animOptions);
+
+ } else {
+
+ if (o.collapsible && clickedIsActive) {
+ toShow.toggle();
+ } else {
+ toHide.hide();
+ toShow.show();
+ }
+
+ complete(true);
+
+ }
+
+ toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur();
+ toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();
+
+ },
+
+ _completed: function(cancel) {
+
+ var o = this.options;
+
+ this.running = cancel ? 0 : --this.running;
+ if (this.running) return;
+
+ if (o.clearStyle) {
+ this.toShow.add(this.toHide).css({
+ height: "",
+ overflow: ""
+ });
+ }
+
+ this._trigger('change', null, this.data);
+ }
+
+});
+
+
+$.extend($.ui.accordion, {
+ version: "1.7.2",
+ defaults: {
+ active: null,
+ alwaysOpen: true, //deprecated, use collapsible
+ animated: 'slide',
+ autoHeight: true,
+ clearStyle: false,
+ collapsible: false,
+ event: "click",
+ fillSpace: false,
+ header: "> li > :first-child,> :not(li):even",
+ icons: {
+ header: "ui-icon-triangle-1-e",
+ headerSelected: "ui-icon-triangle-1-s"
+ },
+ navigation: false,
+ navigationFilter: function() {
+ return this.href.toLowerCase() == location.href.toLowerCase();
+ }
+ },
+ animations: {
+ slide: function(options, additions) {
+ options = $.extend({
+ easing: "swing",
+ duration: 300
+ }, options, additions);
+ if ( !options.toHide.size() ) {
+ options.toShow.animate({height: "show"}, options);
+ return;
+ }
+ if ( !options.toShow.size() ) {
+ options.toHide.animate({height: "hide"}, options);
+ return;
+ }
+ var overflow = options.toShow.css('overflow'),
+ percentDone,
+ showProps = {},
+ hideProps = {},
+ fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
+ originalWidth;
+ // fix width before calculating height of hidden element
+ var s = options.toShow;
+ originalWidth = s[0].style.width;
+ s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) );
+
+ $.each(fxAttrs, function(i, prop) {
+ hideProps[prop] = 'hide';
+
+ var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/);
+ showProps[prop] = {
+ value: parts[1],
+ unit: parts[2] || 'px'
+ };
+ });
+ options.toShow.css({ height: 0, overflow: 'hidden' }).show();
+ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{
+ step: function(now, settings) {
+ // only calculate the percent when animating height
+ // IE gets very inconsistent results when animating elements
+ // with small values, which is common for padding
+ if (settings.prop == 'height') {
+ percentDone = (settings.now - settings.start) / (settings.end - settings.start);
+ }
+
+ options.toShow[0].style[settings.prop] =
+ (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit;
+ },
+ duration: options.duration,
+ easing: options.easing,
+ complete: function() {
+ if ( !options.autoHeight ) {
+ options.toShow.css("height", "");
+ }
+ options.toShow.css("width", originalWidth);
+ options.toShow.css({overflow: overflow});
+ options.complete();
+ }
+ });
+ },
+ bounceslide: function(options) {
+ this.slide(options, {
+ easing: options.down ? "easeOutBounce" : "swing",
+ duration: options.down ? 1000 : 200
+ });
+ },
+ easeslide: function(options) {
+ this.slide(options, {
+ easing: "easeinout",
+ duration: 700
+ });
+ }
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.core.js b/themes/default/js/ui/ui.core.js
new file mode 100644
index 000000000..5493e0aeb
--- /dev/null
+++ b/themes/default/js/ui/ui.core.js
@@ -0,0 +1,519 @@
+/*
+ * jQuery UI 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+;jQuery.ui || (function($) {
+
+var _remove = $.fn.remove,
+ isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
+
+//Helper functions and ui object
+$.ui = {
+ version: "1.7.2",
+
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function(module, option, set) {
+ var proto = $.ui[module].prototype;
+ for(var i in set) {
+ proto.plugins[i] = proto.plugins[i] || [];
+ proto.plugins[i].push([option, set[i]]);
+ }
+ },
+ call: function(instance, name, args) {
+ var set = instance.plugins[name];
+ if(!set || !instance.element[0].parentNode) { return; }
+
+ for (var i = 0; i < set.length; i++) {
+ if (instance.options[set[i][0]]) {
+ set[i][1].apply(instance.element, args);
+ }
+ }
+ }
+ },
+
+ contains: function(a, b) {
+ return document.compareDocumentPosition
+ ? a.compareDocumentPosition(b) & 16
+ : a !== b && a.contains(b);
+ },
+
+ hasScroll: function(el, a) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ($(el).css('overflow') == 'hidden') { return false; }
+
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (el[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[scroll] = 1;
+ has = (el[scroll] > 0);
+ el[scroll] = 0;
+ return has;
+ },
+
+ isOverAxis: function(x, reference, size) {
+ //Determines when x coordinate is over "b" element axis
+ return (x > reference) && (x < (reference + size));
+ },
+
+ isOver: function(y, x, top, left, height, width) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
+ },
+
+ keyCode: {
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+};
+
+// WAI-ARIA normalization
+if (isFF2) {
+ var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
+ ariaState = /^aria-/,
+ ariaRole = /^wairole:/;
+
+ $.attr = function(elem, name, value) {
+ var set = value !== undefined;
+
+ return (name == 'role'
+ ? (set
+ ? attr.call(this, elem, name, "wairole:" + value)
+ : (attr.apply(this, arguments) || "").replace(ariaRole, ""))
+ : (ariaState.test(name)
+ ? (set
+ ? elem.setAttributeNS(ariaNS,
+ name.replace(ariaState, "aaa:"), value)
+ : attr.call(this, elem, name.replace(ariaState, "aaa:")))
+ : attr.apply(this, arguments)));
+ };
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
+}
+
+//jQuery plugins
+$.fn.extend({
+ remove: function() {
+ // Safari has a native remove event which actually removes DOM elements,
+ // so we have to use triggerHandler instead of trigger (#3037).
+ $("*", this).add(this).each(function() {
+ $(this).triggerHandler("remove");
+ });
+ return _remove.apply(this, arguments );
+ },
+
+ enableSelection: function() {
+ return this
+ .attr('unselectable', 'off')
+ .css('MozUserSelect', '')
+ .unbind('selectstart.ui');
+ },
+
+ disableSelection: function() {
+ return this
+ .attr('unselectable', 'on')
+ .css('MozUserSelect', 'none')
+ .bind('selectstart.ui', function() { return false; });
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ }
+});
+
+
+//Additional selectors
+$.extend($.expr[':'], {
+ data: function(elem, i, match) {
+ return !!$.data(elem, match[3]);
+ },
+
+ focusable: function(element) {
+ var nodeName = element.nodeName.toLowerCase(),
+ tabIndex = $.attr(element, 'tabindex');
+ return (/input|select|textarea|button|object/.test(nodeName)
+ ? !element.disabled
+ : 'a' == nodeName || 'area' == nodeName
+ ? element.href || !isNaN(tabIndex)
+ : !isNaN(tabIndex))
+ // the element and all of its ancestors must be visible
+ // the browser may report that the area is hidden
+ && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ },
+
+ tabbable: function(element) {
+ var tabIndex = $.attr(element, 'tabindex');
+ return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ }
+});
+
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+function getter(namespace, plugin, method, args) {
+ function getMethods(type) {
+ var methods = $[namespace][plugin][type] || [];
+ return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
+ }
+
+ var methods = getMethods('getter');
+ if (args.length == 1 && typeof args[0] == 'string') {
+ methods = methods.concat(getMethods('getterSetter'));
+ }
+ return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+ var namespace = name.split(".")[0];
+ name = name.split(".")[1];
+
+ // create plugin method
+ $.fn[name] = function(options) {
+ var isMethodCall = (typeof options == 'string'),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ // prevent calls to internal methods
+ if (isMethodCall && options.substring(0, 1) == '_') {
+ return this;
+ }
+
+ // handle getter methods
+ if (isMethodCall && getter(namespace, name, options, args)) {
+ var instance = $.data(this[0], name);
+ return (instance ? instance[options].apply(instance, args)
+ : undefined);
+ }
+
+ // handle initialization and non-getter methods
+ return this.each(function() {
+ var instance = $.data(this, name);
+
+ // constructor
+ (!instance && !isMethodCall &&
+ $.data(this, name, new $[namespace][name](this, options))._init());
+
+ // method call
+ (instance && isMethodCall && $.isFunction(instance[options]) &&
+ instance[options].apply(instance, args));
+ });
+ };
+
+ // create widget constructor
+ $[namespace] = $[namespace] || {};
+ $[namespace][name] = function(element, options) {
+ var self = this;
+
+ this.namespace = namespace;
+ this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
+ this.widgetBaseClass = namespace + '-' + name;
+
+ this.options = $.extend({},
+ $.widget.defaults,
+ $[namespace][name].defaults,
+ $.metadata && $.metadata.get(element)[name],
+ options);
+
+ this.element = $(element)
+ .bind('setData.' + name, function(event, key, value) {
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
+ })
+ .bind('getData.' + name, function(event, key) {
+ if (event.target == element) {
+ return self._getData(key);
+ }
+ })
+ .bind('remove', function() {
+ return self.destroy();
+ });
+ };
+
+ // add widget prototype
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+
+ // TODO: merge getter and getterSetter properties from widget prototype
+ // and plugin prototype
+ $[namespace][name].getterSetter = 'option';
+};
+
+$.widget.prototype = {
+ _init: function() {},
+ destroy: function() {
+ this.element.removeData(this.widgetName)
+ .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
+ .removeAttr('aria-disabled');
+ },
+
+ option: function(key, value) {
+ var options = key,
+ self = this;
+
+ if (typeof key == "string") {
+ if (value === undefined) {
+ return this._getData(key);
+ }
+ options = {};
+ options[key] = value;
+ }
+
+ $.each(options, function(key, value) {
+ self._setData(key, value);
+ });
+ },
+ _getData: function(key) {
+ return this.options[key];
+ },
+ _setData: function(key, value) {
+ this.options[key] = value;
+
+ if (key == 'disabled') {
+ this.element
+ [value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
+ }
+ },
+
+ enable: function() {
+ this._setData('disabled', false);
+ },
+ disable: function() {
+ this._setData('disabled', true);
+ },
+
+ _trigger: function(type, event, data) {
+ var callback = this.options[type],
+ eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+
+ event = $.Event(event);
+ event.type = eventName;
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if (event.originalEvent) {
+ for (var i = $.event.props.length, prop; i;) {
+ prop = $.event.props[--i];
+ event[prop] = event.originalEvent[prop];
+ }
+ }
+
+ this.element.trigger(event, data);
+
+ return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
+ || event.isDefaultPrevented());
+ }
+};
+
+$.widget.defaults = {
+ disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if(self._preventClickEvent) {
+ self._preventClickEvent = false;
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ // Prevent text selection in IE
+ if ($.browser.msie) {
+ this._mouseUnselectable = this.element.attr('unselectable');
+ this.element.attr('unselectable', 'on');
+ }
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+
+ // Restore text selection in IE
+ ($.browser.msie
+ && this.element.attr('unselectable', this._mouseUnselectable));
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ // TODO: figure out why we have to use originalEvent
+ event.originalEvent = event.originalEvent || {};
+ if (event.originalEvent.mouseHandled) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
+ event.originalEvent.mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+ this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+};
+
+$.ui.mouse.defaults = {
+ cancel: null,
+ distance: 1,
+ delay: 0
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.datepicker.js b/themes/default/js/ui/ui.datepicker.js
new file mode 100644
index 000000000..0ce166efd
--- /dev/null
+++ b/themes/default/js/ui/ui.datepicker.js
@@ -0,0 +1,1636 @@
+/*
+ * jQuery UI Datepicker 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * ui.core.js
+ */
+
+(function($) { // hide the namespace
+
+$.extend($.ui, { datepicker: { version: "1.7.2" } });
+
+var PROP_NAME = 'datepicker';
+
+/* Date picker manager.
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+ Settings for (groups of) date pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+function Datepicker() {
+ this.debug = false; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
+ this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
+ this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
+ this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
+ this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
+ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ closeText: 'Done', // Display text for close link
+ prevText: 'Prev', // Display text for previous month link
+ nextText: 'Next', // Display text for next month link
+ currentText: 'Today', // Display text for current month link
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
+ dateFormat: 'mm/dd/yy', // See format options on parseDate
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ isRTL: false // True if right-to-left language, false if left-to-right
+ };
+ this._defaults = { // Global defaults for all the date picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either
+ showAnim: 'show', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ defaultDate: null, // Used when field is blank: actual date,
+ // +/-number for offset from today, null for today
+ appendText: '', // Display text following the input box, e.g. showing the format
+ buttonText: '...', // Text for trigger button
+ buttonImage: '', // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+ gotoCurrent: false, // True if today link goes back to current selection instead
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+ yearRange: '-10:+10', // Range of years to display in drop-down,
+ // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+ // takes a Date and returns the number of the week for it
+ shortYearCutoff: '+10', // Short year values < this are in the current century,
+ // > this are in the previous century,
+ // string value starting with '+' for current year + value
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ duration: 'normal', // Duration of display/closure
+ beforeShowDay: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
+ beforeShow: null, // Function that takes an input field and
+ // returns a set of custom settings for the date picker
+ onSelect: null, // Define a callback function when a date is selected
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
+ onClose: null, // Define a callback function when the datepicker is closed
+ numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+ stepMonths: 1, // Number of months to step back/forward
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
+ altField: '', // Selector for an alternate field to store selected dates into
+ altFormat: '', // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false // True to show button panel, false to not show it
+ };
+ $.extend(this._defaults, this.regional['']);
+ this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
+}
+
+$.extend(Datepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a date picker. */
+ markerClassName: 'hasDatepicker',
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ /* Override the default settings for all instances of the date picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function(settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the date picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this date picker instance (anonymous) */
+ _attachDatepicker: function(target, settings) {
+ // check for settings on the control itself - in namespace 'date:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('date:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+ if (!target.id)
+ target.id = 'dp' + (++this.uuid);
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectDatepicker(target, inst);
+ } else if (inline) {
+ this._inlineDatepicker(target, inst);
+ }
+ },
+
+ /* Create a new instance object. */
+ _newInst: function(target, inline) {
+ var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars
+ return {id: id, input: target, // associated target
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+ drawMonth: 0, drawYear: 0, // month being drawn
+ inline: inline, // is datepicker inline or not
+ dpDiv: (!inline ? this.dpDiv : // presentation div
+ $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};
+ },
+
+ /* Attach the date picker to an input field. */
+ _connectDatepicker: function(target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName))
+ return;
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
+ input.focus(this._showDatepicker);
+ if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
+ var buttonText = this._get(inst, 'buttonText');
+ var buttonImage = this._get(inst, 'buttonImage');
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
+ $('<img/>').addClass(this._triggerClass).
+ attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+ $('<button type="button"></button>').addClass(this._triggerClass).
+ html(buttonImage == '' ? buttonText : $('<img/>').attr(
+ { src:buttonImage, alt:buttonText, title:buttonText })));
+ input[isRTL ? 'before' : 'after'](inst.trigger);
+ inst.trigger.click(function() {
+ if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
+ $.datepicker._hideDatepicker();
+ else
+ $.datepicker._showDatepicker(target);
+ return false;
+ });
+ }
+ input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
+ bind("setData.datepicker", function(event, key, value) {
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key) {
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ },
+
+ /* Attach an inline date picker to a div. */
+ _inlineDatepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
+ bind("setData.datepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ this._setDate(inst, this._getDefaultDate(inst));
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ },
+
+ /* Pop-up the date picker in a "dialog" box.
+ @param input element - ignored
+ @param dateText string - the initial date to display (in the current format)
+ @param onSelect function - the function(dateText) to call when a date is selected
+ @param settings object - update the dialog date picker instance's settings (anonymous object)
+ @param pos int[2] - coordinates for the dialog's position within the screen or
+ event - with x/y coordinates or
+ leave empty for default (screen centre)
+ @return the manager object */
+ _dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
+ var inst = this._dialogInst; // internal instance
+ if (!inst) {
+ var id = 'dp' + (++this.uuid);
+ this._dialogInput = $('<input type="text" id="' + id +
+ '" size="1" style="position: absolute; top: -100px;"/>');
+ this._dialogInput.keydown(this._doKeyDown);
+ $('body').append(this._dialogInput);
+ inst = this._dialogInst = this._newInst(this._dialogInput, false);
+ inst.settings = {};
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ }
+ extendRemove(inst.settings, settings || {});
+ this._dialogInput.val(dateText);
+
+ this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+ if (!this._pos) {
+ var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = // should use actual width/height below
+ [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+ }
+
+ // move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
+ inst.settings.onSelect = onSelect;
+ this._inDialog = true;
+ this.dpDiv.addClass(this._dialogClass);
+ this._showDatepicker(this._dialogInput[0]);
+ if ($.blockUI)
+ $.blockUI(this.dpDiv);
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ return this;
+ },
+
+ /* Detach a datepicker from its control.
+ @param target element - the target input field or division or span */
+ _destroyDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ $.removeData(target, PROP_NAME);
+ if (nodeName == 'input') {
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass(this.markerClassName).
+ unbind('focus', this._showDatepicker).
+ unbind('keydown', this._doKeyDown).
+ unbind('keypress', this._doKeyPress);
+ } else if (nodeName == 'div' || nodeName == 'span')
+ $target.removeClass(this.markerClassName).empty();
+ },
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end().
+ filter('img').css({opacity: '1.0', cursor: ''});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ },
+
+ /* Disable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end().
+ filter('img').css({opacity: '0.5', cursor: 'default'});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = target;
+ },
+
+ /* Is the first field in a jQuery collection disabled as a datepicker?
+ @param target element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledDatepicker: function(target) {
+ if (!target) {
+ return false;
+ }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target)
+ return true;
+ }
+ return false;
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function(target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this datepicker';
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionDatepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideDatepicker(null);
+ }
+ var date = this._getDateDatepicker(target);
+ extendRemove(inst.settings, settings);
+ this._setDateDatepicker(target, date);
+ this._updateDatepicker(inst);
+ }
+ },
+
+ // change method deprecated
+ _changeDatepicker: function(target, name, value) {
+ this._optionDatepicker(target, name, value);
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ @param target element - the target input field or division or span */
+ _refreshDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Set the dates for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param date Date - the new date
+ @param endDate Date - the new end date for a range (optional) */
+ _setDateDatepicker: function(target, date, endDate) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setDate(inst, date, endDate);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ }
+ },
+
+ /* Get the date(s) for the first entry in a jQuery selection.
+ @param target element - the target input field or division or span
+ @return Date - the current date or
+ Date[2] - the current dates for a range */
+ _getDateDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst && !inst.inline)
+ this._setDateFromField(inst);
+ return (inst ? this._getDate(inst) : null);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ var handled = true;
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
+ inst._keyEvent = true;
+ if ($.datepicker._datepickerShowing)
+ switch (event.keyCode) {
+ case 9: $.datepicker._hideDatepicker(null, '');
+ break; // hide on tab out
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass +
+ ', td.' + $.datepicker._currentClass, inst.dpDiv);
+ if (sel[0])
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+ else
+ $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
+ break; // hide on escape
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // previous month/year on page up/+ ctrl
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // next month/year on page down/+ ctrl
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // -1 day on ctrl or command +left
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // +1 day on ctrl or command +right
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +right
+ break;
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
+ default: handled = false;
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
+ $.datepicker._showDatepicker(this);
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Filter entered characters - based on date format. */
+ _doKeyPress: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ }
+ },
+
+ /* Pop-up the date picker for a given input field.
+ @param input element - the input field attached to the date picker or
+ event - if triggered by focus */
+ _showDatepicker: function(input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
+ input = $('input', input.parentNode)[0];
+ if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
+ return;
+ var inst = $.datepicker._getInst(input);
+ var beforeShow = $.datepicker._get(inst, 'beforeShow');
+ extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+ $.datepicker._hideDatepicker(null, '');
+ $.datepicker._lastInput = input;
+ $.datepicker._setDateFromField(inst);
+ if ($.datepicker._inDialog) // hide cursor
+ input.value = '';
+ if (!$.datepicker._pos) { // position below input
+ $.datepicker._pos = $.datepicker._findPos(input);
+ $.datepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function() {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+ $.datepicker._pos[0] -= document.documentElement.scrollLeft;
+ $.datepicker._pos[1] -= document.documentElement.scrollTop;
+ }
+ var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+ $.datepicker._pos = null;
+ inst.rangeStart = null;
+ // determine sizing offscreen
+ inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
+ $.datepicker._updateDatepicker(inst);
+ // fix width for dynamic number of date pickers
+ // and adjust position before showing
+ offset = $.datepicker._checkOffset(inst, offset, isFixed);
+ inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'});
+ if (!inst.inline) {
+ var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
+ var duration = $.datepicker._get(inst, 'duration');
+ var postProcess = function() {
+ $.datepicker._datepickerShowing = true;
+ if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems
+ $('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
+ height: inst.dpDiv.height() + 4});
+ };
+ if ($.effects && $.effects[showAnim])
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[showAnim](duration, postProcess);
+ if (duration == '')
+ postProcess();
+ if (inst.input[0].type != 'hidden')
+ inst.input[0].focus();
+ $.datepicker._curInst = inst;
+ }
+ },
+
+ /* Generate the date picker content. */
+ _updateDatepicker: function(inst) {
+ var dims = {width: inst.dpDiv.width() + 4,
+ height: inst.dpDiv.height() + 4};
+ var self = this;
+ inst.dpDiv.empty().append(this._generateHTML(inst))
+ .find('iframe.ui-datepicker-cover').
+ css({width: dims.width, height: dims.height})
+ .end()
+ .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
+ .bind('mouseout', function(){
+ $(this).removeClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
+ })
+ .bind('mouseover', function(){
+ if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
+ $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
+ }
+ })
+ .end()
+ .find('.' + this._dayOverClass + ' a')
+ .trigger('mouseover')
+ .end();
+ var numMonths = this._getNumberOfMonths(inst);
+ var cols = numMonths[1];
+ var width = 17;
+ if (cols > 1) {
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
+ } else {
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
+ }
+ inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-multi');
+ inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-rtl');
+ if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
+ $(inst.input[0]).focus();
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function(inst, offset, isFixed) {
+ var dpWidth = inst.dpDiv.outerWidth();
+ var dpHeight = inst.dpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
+ var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
+ offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function(obj) {
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+ obj = obj.nextSibling;
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Hide the date picker from view.
+ @param input element - the input field attached to the date picker
+ @param duration string - the duration over which to close the date picker */
+ _hideDatepicker: function(input, duration) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
+ return;
+ if (inst.stayOpen)
+ this._selectDate('#' + inst.id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ inst.stayOpen = false;
+ if (this._datepickerShowing) {
+ duration = (duration != null ? duration : this._get(inst, 'duration'));
+ var showAnim = this._get(inst, 'showAnim');
+ var postProcess = function() {
+ $.datepicker._tidyDialog(inst);
+ };
+ if (duration != '' && $.effects && $.effects[showAnim])
+ inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
+ duration, postProcess);
+ else
+ inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
+ if (duration == '')
+ this._tidyDialog(inst);
+ var onClose = this._get(inst, 'onClose');
+ if (onClose)
+ onClose.apply((inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
+ this._datepickerShowing = false;
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.dpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ this._curInst = null;
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function(inst) {
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
+ },
+
+ /* Close date picker if clicked elsewhere. */
+ _checkExternalClick: function(event) {
+ if (!$.datepicker._curInst)
+ return;
+ var $target = $(event.target);
+ if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
+ !$target.hasClass($.datepicker.markerClassName) &&
+ !$target.hasClass($.datepicker._triggerClass) &&
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
+ $.datepicker._hideDatepicker(null, '');
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(id, offset, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ this._adjustInstDate(inst, offset +
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+ period);
+ this._updateDatepicker(inst);
+ },
+
+ /* Action for current link. */
+ _gotoToday: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
+ inst.selectedDay = inst.currentDay;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+ inst.drawYear = inst.selectedYear = inst.currentYear;
+ }
+ else {
+ var date = new Date();
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ }
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function(id, select, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst._selectingMonthYear = false;
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
+ parseInt(select.options[select.selectedIndex].value,10);
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Restore input focus after not changing month/year. */
+ _clickMonthYear: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (inst.input && inst._selectingMonthYear && !$.browser.msie)
+ inst.input[0].focus();
+ inst._selectingMonthYear = !inst._selectingMonthYear;
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function(id, month, year, td) {
+ var target = $(id);
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ var inst = this._getInst(target[0]);
+ inst.selectedDay = inst.currentDay = $('a', td).html();
+ inst.selectedMonth = inst.currentMonth = month;
+ inst.selectedYear = inst.currentYear = year;
+ if (inst.stayOpen) {
+ inst.endDay = inst.endMonth = inst.endYear = null;
+ }
+ this._selectDate(id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ if (inst.stayOpen) {
+ inst.rangeStart = this._daylightSavingAdjust(
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Erase the input field and hide the date picker. */
+ _clearDate: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst.stayOpen = false;
+ inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
+ this._selectDate(target, '');
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function(id, dateStr) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+ if (inst.input)
+ inst.input.val(dateStr);
+ this._updateAlternate(inst);
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect)
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
+ else if (inst.input)
+ inst.input.trigger('change'); // fire the change event
+ if (inst.inline)
+ this._updateDatepicker(inst);
+ else if (!inst.stayOpen) {
+ this._hideDatepicker(null, this._get(inst, 'duration'));
+ this._lastInput = inst.input[0];
+ if (typeof(inst.input[0]) != 'object')
+ inst.input[0].focus(); // restore focus
+ this._lastInput = null;
+ }
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
+ var date = this._getDate(inst);
+ dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
+ $(altField).each(function() { $(this).val(dateStr); });
+ }
+ },
+
+ /* Set as beforeShowDay function to prevent selection of weekends.
+ @param date Date - the date to customise
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
+ noWeekends: function(date) {
+ var day = date.getDay();
+ return [(day > 0 && day < 6), ''];
+ },
+
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+ @param date Date - the date to get the week for
+ @return number - the number of the week within the year that contains this date */
+ iso8601Week: function(date) {
+ var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+ var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
+ var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
+ firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
+ if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
+ checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
+ return $.datepicker.iso8601Week(checkDate);
+ } else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
+ firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
+ if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
+ return 1;
+ }
+ }
+ return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
+ },
+
+ /* Parse a string value into a date object.
+ See formatDate below for the possible formats.
+
+ @param format string - the expected format of the date
+ @param value string - the date in the above format
+ @param settings Object - attributes include:
+ shortYearCutoff number - the cutoff year for determining the century (optional)
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return Date - the extracted date value or null if value is blank */
+ parseDate: function (format, value, settings) {
+ if (format == null || value == null)
+ throw 'Invalid arguments';
+ value = (typeof value == 'object' ? value.toString() : value + '');
+ if (value == '')
+ return null;
+ var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ var year = -1;
+ var month = -1;
+ var day = -1;
+ var doy = -1;
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Extract a number from the string value
+ var getNumber = function(match) {
+ lookAhead(match);
+ var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2)));
+ var size = origSize;
+ var num = 0;
+ while (size > 0 && iValue < value.length &&
+ value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
+ num = num * 10 + parseInt(value.charAt(iValue++),10);
+ size--;
+ }
+ if (size == origSize)
+ throw 'Missing number at position ' + iValue;
+ return num;
+ };
+ // Extract a name from the string value and convert to an index
+ var getName = function(match, shortNames, longNames) {
+ var names = (lookAhead(match) ? longNames : shortNames);
+ var size = 0;
+ for (var j = 0; j < names.length; j++)
+ size = Math.max(size, names[j].length);
+ var name = '';
+ var iInit = iValue;
+ while (size > 0 && iValue < value.length) {
+ name += value.charAt(iValue++);
+ for (var i = 0; i < names.length; i++)
+ if (name == names[i])
+ return i + 1;
+ size--;
+ }
+ throw 'Unknown name at position ' + iInit;
+ };
+ // Confirm that a literal character matches the string value
+ var checkLiteral = function() {
+ if (value.charAt(iValue) != format.charAt(iFormat))
+ throw 'Unexpected literal at position ' + iValue;
+ iValue++;
+ };
+ var iValue = 0;
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ checkLiteral();
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ day = getNumber('d');
+ break;
+ case 'D':
+ getName('D', dayNamesShort, dayNames);
+ break;
+ case 'o':
+ doy = getNumber('o');
+ break;
+ case 'm':
+ month = getNumber('m');
+ break;
+ case 'M':
+ month = getName('M', monthNamesShort, monthNames);
+ break;
+ case 'y':
+ year = getNumber('y');
+ break;
+ case '@':
+ var date = new Date(getNumber('@'));
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ checkLiteral();
+ else
+ literal = true;
+ break;
+ default:
+ checkLiteral();
+ }
+ }
+ if (year == -1)
+ year = new Date().getFullYear();
+ else if (year < 100)
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+ (year <= shortYearCutoff ? 0 : -100);
+ if (doy > -1) {
+ month = 1;
+ day = doy;
+ do {
+ var dim = this._getDaysInMonth(year, month - 1);
+ if (day <= dim)
+ break;
+ month++;
+ day -= dim;
+ } while (true);
+ }
+ var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
+ if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
+ throw 'Invalid date'; // E.g. 31/02/*
+ return date;
+ },
+
+ /* Standard date formats. */
+ ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
+ COOKIE: 'D, dd M yy',
+ ISO_8601: 'yy-mm-dd',
+ RFC_822: 'D, d M y',
+ RFC_850: 'DD, dd-M-y',
+ RFC_1036: 'D, d M y',
+ RFC_1123: 'D, d M yy',
+ RFC_2822: 'D, d M yy',
+ RSS: 'D, d M y', // RFC 822
+ TIMESTAMP: '@',
+ W3C: 'yy-mm-dd', // ISO 8601
+
+ /* Format a date object into a string value.
+ The format can be combinations of the following:
+ d - day of month (no leading zero)
+ dd - day of month (two digit)
+ o - day of year (no leading zeros)
+ oo - day of year (three digit)
+ D - day name short
+ DD - day name long
+ m - month of year (no leading zero)
+ mm - month of year (two digit)
+ M - month name short
+ MM - month name long
+ y - year (two digit)
+ yy - year (four digit)
+ @ - Unix timestamp (ms since 01/01/1970)
+ '...' - literal text
+ '' - single quote
+
+ @param format string - the desired format of the date
+ @param date Date - the date value to format
+ @param settings Object - attributes include:
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return string - the date in the above format */
+ formatDate: function (format, date, settings) {
+ if (!date)
+ return '';
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Format a number, with leading zero if necessary
+ var formatNumber = function(match, value, len) {
+ var num = '' + value;
+ if (lookAhead(match))
+ while (num.length < len)
+ num = '0' + num;
+ return num;
+ };
+ // Format a name, short or long as requested
+ var formatName = function(match, value, shortNames, longNames) {
+ return (lookAhead(match) ? longNames[value] : shortNames[value]);
+ };
+ var output = '';
+ var literal = false;
+ if (date)
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ output += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ output += formatNumber('d', date.getDate(), 2);
+ break;
+ case 'D':
+ output += formatName('D', date.getDay(), dayNamesShort, dayNames);
+ break;
+ case 'o':
+ var doy = date.getDate();
+ for (var m = date.getMonth() - 1; m >= 0; m--)
+ doy += this._getDaysInMonth(date.getFullYear(), m);
+ output += formatNumber('o', doy, 3);
+ break;
+ case 'm':
+ output += formatNumber('m', date.getMonth() + 1, 2);
+ break;
+ case 'M':
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
+ break;
+ case 'y':
+ output += (lookAhead('y') ? date.getFullYear() :
+ (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
+ break;
+ case '@':
+ output += date.getTime();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ output += "'";
+ else
+ literal = true;
+ break;
+ default:
+ output += format.charAt(iFormat);
+ }
+ }
+ return output;
+ },
+
+ /* Extract all possible characters from the date format. */
+ _possibleChars: function (format) {
+ var chars = '';
+ var literal = false;
+ for (var iFormat = 0; iFormat < format.length; iFormat++)
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ chars += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd': case 'm': case 'y': case '@':
+ chars += '0123456789';
+ break;
+ case 'D': case 'M':
+ return null; // Accept anything
+ case "'":
+ if (lookAhead("'"))
+ chars += "'";
+ else
+ literal = true;
+ break;
+ default:
+ chars += format.charAt(iFormat);
+ }
+ return chars;
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function(inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing date and initialise date picker. */
+ _setDateFromField: function(inst) {
+ var dateFormat = this._get(inst, 'dateFormat');
+ var dates = inst.input ? inst.input.val() : null;
+ inst.endDay = inst.endMonth = inst.endYear = null;
+ var date = defaultDate = this._getDefaultDate(inst);
+ var settings = this._getFormatConfig(inst);
+ try {
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+ } catch (event) {
+ this.log(event);
+ date = defaultDate;
+ }
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ inst.currentDay = (dates ? date.getDate() : 0);
+ inst.currentMonth = (dates ? date.getMonth() : 0);
+ inst.currentYear = (dates ? date.getFullYear() : 0);
+ this._adjustInstDate(inst);
+ },
+
+ /* Retrieve the default date shown on opening. */
+ _getDefaultDate: function(inst) {
+ var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ date = (minDate && date < minDate ? minDate : date);
+ date = (maxDate && date > maxDate ? maxDate : date);
+ return date;
+ },
+
+ /* A date may be specified as an exact value or a relative one. */
+ _determineDate: function(date, defaultDate) {
+ var offsetNumeric = function(offset) {
+ var date = new Date();
+ date.setDate(date.getDate() + offset);
+ return date;
+ };
+ var offsetString = function(offset, getDaysInMonth) {
+ var date = new Date();
+ var year = date.getFullYear();
+ var month = date.getMonth();
+ var day = date.getDate();
+ var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
+ var matches = pattern.exec(offset);
+ while (matches) {
+ switch (matches[2] || 'd') {
+ case 'd' : case 'D' :
+ day += parseInt(matches[1],10); break;
+ case 'w' : case 'W' :
+ day += parseInt(matches[1],10) * 7; break;
+ case 'm' : case 'M' :
+ month += parseInt(matches[1],10);
+ day = Math.min(day, getDaysInMonth(year, month));
+ break;
+ case 'y': case 'Y' :
+ year += parseInt(matches[1],10);
+ day = Math.min(day, getDaysInMonth(year, month));
+ break;
+ }
+ matches = pattern.exec(offset);
+ }
+ return new Date(year, month, day);
+ };
+ date = (date == null ? defaultDate :
+ (typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
+ date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
+ if (date) {
+ date.setHours(0);
+ date.setMinutes(0);
+ date.setSeconds(0);
+ date.setMilliseconds(0);
+ }
+ return this._daylightSavingAdjust(date);
+ },
+
+ /* Handle switch to/from daylight saving.
+ Hours may be non-zero on daylight saving cut-over:
+ > 12 when midnight changeover, but then cannot generate
+ midnight datetime, so jump to 1AM, otherwise reset.
+ @param date (Date) the date to check
+ @return (Date) the corrected date */
+ _daylightSavingAdjust: function(date) {
+ if (!date) return null;
+ date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
+ return date;
+ },
+
+ /* Set the date(s) directly. */
+ _setDate: function(inst, date, endDate) {
+ var clear = !(date);
+ var origMonth = inst.selectedMonth;
+ var origYear = inst.selectedYear;
+ date = this._determineDate(date, new Date());
+ inst.selectedDay = inst.currentDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
+ if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
+ this._notifyChange(inst);
+ this._adjustInstDate(inst);
+ if (inst.input) {
+ inst.input.val(clear ? '' : this._formatDate(inst));
+ }
+ },
+
+ /* Retrieve the date(s) directly. */
+ _getDate: function(inst) {
+ var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
+ this._daylightSavingAdjust(new Date(
+ inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return startDate;
+ },
+
+ /* Generate the HTML for the current state of the date picker. */
+ _generateHTML: function(inst) {
+ var today = new Date();
+ today = this._daylightSavingAdjust(
+ new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
+ var isRTL = this._get(inst, 'isRTL');
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
+ var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
+ var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
+ var numMonths = this._getNumberOfMonths(inst);
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
+ var stepMonths = this._get(inst, 'stepMonths');
+ var stepBigMonths = this._get(inst, 'stepBigMonths');
+ var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
+ var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
+ var drawYear = inst.drawYear;
+ if (drawMonth < 0) {
+ drawMonth += 12;
+ drawYear--;
+ }
+ if (maxDate) {
+ var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
+ maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
+ maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+ while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
+ drawMonth--;
+ if (drawMonth < 0) {
+ drawMonth = 11;
+ drawYear--;
+ }
+ }
+ }
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
+ var prevText = this._get(inst, 'prevText');
+ prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
+ var nextText = this._get(inst, 'nextText');
+ nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
+ var currentText = this._get(inst, 'currentText');
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
+ currentText = (!navigationAsDateFormat ? currentText :
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
+ var dayNames = this._get(inst, 'dayNames');
+ var dayNamesShort = this._get(inst, 'dayNamesShort');
+ var dayNamesMin = this._get(inst, 'dayNamesMin');
+ var monthNames = this._get(inst, 'monthNames');
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
+ var beforeShowDay = this._get(inst, 'beforeShowDay');
+ var showOtherMonths = this._get(inst, 'showOtherMonths');
+ var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
+ var endDate = inst.endDay ? this._daylightSavingAdjust(
+ new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
+ var defaultDate = this._getDefaultDate(inst);
+ var html = '';
+ for (var row = 0; row < numMonths[0]; row++) {
+ var group = '';
+ for (var col = 0; col < numMonths[1]; col++) {
+ var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+ var cornerClass = ' ui-corner-all';
+ var calender = '';
+ if (isMultiMonth) {
+ calender += '<div class="ui-datepicker-group ui-datepicker-group-';
+ switch (col) {
+ case 0: calender += 'first'; cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
+ case numMonths[1]-1: calender += 'last'; cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
+ default: calender += 'middle'; cornerClass = ''; break;
+ }
+ calender += '">';
+ }
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
+ this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+ selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+ '</div><table class="ui-datepicker-calendar"><thead>' +
+ '<tr>';
+ var thead = '';
+ for (var dow = 0; dow < 7; dow++) { // days of the week
+ var day = (dow + firstDay) % 7;
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
+ }
+ calender += thead + '</tr></thead><tbody>';
+ var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+ if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
+ inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+ var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+ var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
+ var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+ calender += '<tr>';
+ var tbody = '';
+ for (var dow = 0; dow < 7; dow++) { // create date picker days
+ var daySettings = (beforeShowDay ?
+ beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
+ var otherMonth = (printDate.getMonth() != drawMonth);
+ var unselectable = otherMonth || !daySettings[0] ||
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+ tbody += '<td class="' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ ' ' + this._dayOverClass : '') + // highlight selected day
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
+ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ ' ' + this._currentClass : '') + // highlight selected day
+ (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
+ (unselectable ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' +
+ inst.id + '\',' + drawMonth + ',' + drawYear + ', this);return false;"') + '>' + // actions
+ (otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ ' ui-state-active' : '') + // highlight selected day
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
+ printDate.setDate(printDate.getDate() + 1);
+ printDate = this._daylightSavingAdjust(printDate);
+ }
+ calender += tbody + '</tr>';
+ }
+ drawMonth++;
+ if (drawMonth > 11) {
+ drawMonth = 0;
+ drawYear++;
+ }
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
+ group += calender;
+ }
+ html += group;
+ }
+ html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ inst._keyEvent = false;
+ return html;
+ },
+
+ /* Generate the month and year header. */
+ _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+ selectedDate, secondary, monthNames, monthNamesShort) {
+ minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
+ var changeMonth = this._get(inst, 'changeMonth');
+ var changeYear = this._get(inst, 'changeYear');
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
+ var html = '<div class="ui-datepicker-title">';
+ var monthHtml = '';
+ // month selection
+ if (secondary || !changeMonth)
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
+ else {
+ var inMinYear = (minDate && minDate.getFullYear() == drawYear);
+ var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
+ monthHtml += '<select class="ui-datepicker-month" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
+ for (var month = 0; month < 12; month++) {
+ if ((!inMinYear || month >= minDate.getMonth()) &&
+ (!inMaxYear || month <= maxDate.getMonth()))
+ monthHtml += '<option value="' + month + '"' +
+ (month == drawMonth ? ' selected="selected"' : '') +
+ '>' + monthNamesShort[month] + '</option>';
+ }
+ monthHtml += '</select>';
+ }
+ if (!showMonthAfterYear)
+ html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
+ // year selection
+ if (secondary || !changeYear)
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
+ else {
+ // determine range of years to display
+ var years = this._get(inst, 'yearRange').split(':');
+ var year = 0;
+ var endYear = 0;
+ if (years.length != 2) {
+ year = drawYear - 10;
+ endYear = drawYear + 10;
+ } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
+ year = drawYear + parseInt(years[0], 10);
+ endYear = drawYear + parseInt(years[1], 10);
+ } else {
+ year = parseInt(years[0], 10);
+ endYear = parseInt(years[1], 10);
+ }
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+ html += '<select class="ui-datepicker-year" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
+ for (; year <= endYear; year++) {
+ html += '<option value="' + year + '"' +
+ (year == drawYear ? ' selected="selected"' : '') +
+ '>' + year + '</option>';
+ }
+ html += '</select>';
+ }
+ if (showMonthAfterYear)
+ html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
+ html += '</div>'; // Close datepicker_header
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustInstDate: function(inst, offset, period) {
+ var year = inst.drawYear + (period == 'Y' ? offset : 0);
+ var month = inst.drawMonth + (period == 'M' ? offset : 0);
+ var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
+ (period == 'D' ? offset : 0);
+ var date = this._daylightSavingAdjust(new Date(year, month, day));
+ // ensure it is within the bounds set
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ date = (minDate && date < minDate ? minDate : date);
+ date = (maxDate && date > maxDate ? maxDate : date);
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ if (period == 'M' || period == 'Y')
+ this._notifyChange(inst);
+ },
+
+ /* Notify change of month/year. */
+ _notifyChange: function(inst) {
+ var onChange = this._get(inst, 'onChangeMonthYear');
+ if (onChange)
+ onChange.apply((inst.input ? inst.input[0] : null),
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
+ },
+
+ /* Determine the number of months to show. */
+ _getNumberOfMonths: function(inst) {
+ var numMonths = this._get(inst, 'numberOfMonths');
+ return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
+ },
+
+ /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
+ _getMinMaxDate: function(inst, minMax, checkRange) {
+ var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
+ return (!checkRange || !inst.rangeStart ? date :
+ (!date || inst.rangeStart > date ? inst.rangeStart : date));
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function(year, month) {
+ return 32 - new Date(year, month, 32).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function(year, month) {
+ return new Date(year, month, 1).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function(inst, offset, curYear, curMonth) {
+ var numMonths = this._getNumberOfMonths(inst);
+ var date = this._daylightSavingAdjust(new Date(
+ curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
+ if (offset < 0)
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+ return this._isInRange(inst, date);
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function(inst, date) {
+ // during range selection, use minimum of selected date and range start
+ var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
+ new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
+ newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
+ var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
+ },
+
+ /* Provide the configuration settings for formatting/parsing. */
+ _getFormatConfig: function(inst) {
+ var shortYearCutoff = this._get(inst, 'shortYearCutoff');
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ return {shortYearCutoff: shortYearCutoff,
+ dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
+ monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function(inst, day, month, year) {
+ if (!day) {
+ inst.currentDay = inst.selectedDay;
+ inst.currentMonth = inst.selectedMonth;
+ inst.currentYear = inst.selectedYear;
+ }
+ var date = (day ? (typeof day == 'object' ? day :
+ this._daylightSavingAdjust(new Date(year, month, day))) :
+ this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
+ }
+});
+
+/* jQuery extend now ignores nulls! */
+function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+};
+
+/* Determine whether an object is an array. */
+function isArray(a) {
+ return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
+ (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
+};
+
+/* Invoke the datepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new datepicker functionality
+ @return jQuery object */
+$.fn.datepicker = function(options){
+
+ /* Initialise the date picker. */
+ if (!$.datepicker.initialized) {
+ $(document).mousedown($.datepicker._checkExternalClick).
+ find('body').append($.datepicker.dpDiv);
+ $.datepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ return this.each(function() {
+ typeof options == 'string' ?
+ $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this].concat(otherArgs)) :
+ $.datepicker._attachDatepicker(this, options);
+ });
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.7.2";
+
+// Workaround for #4055
+// Add another global to avoid noConflict issues with inline event handlers
+window.DP_jQuery = $;
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.dialog.js b/themes/default/js/ui/ui.dialog.js
new file mode 100644
index 000000000..fdd5b26df
--- /dev/null
+++ b/themes/default/js/ui/ui.dialog.js
@@ -0,0 +1,671 @@
+/*
+ * jQuery UI Dialog 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
+ */
+(function($) {
+
+var setDataSwitch = {
+ dragStart: "start.draggable",
+ drag: "drag.draggable",
+ dragStop: "stop.draggable",
+ maxHeight: "maxHeight.resizable",
+ minHeight: "minHeight.resizable",
+ maxWidth: "maxWidth.resizable",
+ minWidth: "minWidth.resizable",
+ resizeStart: "start.resizable",
+ resize: "drag.resizable",
+ resizeStop: "stop.resizable"
+ },
+
+ uiDialogClasses =
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all ';
+
+$.widget("ui.dialog", {
+
+ _init: function() {
+ this.originalTitle = this.element.attr('title');
+
+ var self = this,
+ options = this.options,
+
+ title = options.title || this.originalTitle || '&nbsp;',
+ titleId = $.ui.dialog.getTitleId(this.element),
+
+ uiDialog = (this.uiDialog = $('<div/>'))
+ .appendTo(document.body)
+ .hide()
+ .addClass(uiDialogClasses + options.dialogClass)
+ .css({
+ position: 'absolute',
+ overflow: 'hidden',
+ zIndex: options.zIndex
+ })
+ // setting tabIndex makes the div focusable
+ // setting outline to 0 prevents a border on focus in Mozilla
+ .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
+ (options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && self.close(event));
+ })
+ .attr({
+ role: 'dialog',
+ 'aria-labelledby': titleId
+ })
+ .mousedown(function(event) {
+ self.moveToTop(false, event);
+ }),
+
+ uiDialogContent = this.element
+ .show()
+ .removeAttr('title')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
+ .appendTo(uiDialog),
+
+ uiDialogTitlebar = (this.uiDialogTitlebar = $('<div></div>'))
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
+ .prependTo(uiDialog),
+
+ uiDialogTitlebarClose = $('<a href="#"/>')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
+ .attr('role', 'button')
+ .hover(
+ function() {
+ uiDialogTitlebarClose.addClass('ui-state-hover');
+ },
+ function() {
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ uiDialogTitlebarClose.addClass('ui-state-focus');
+ })
+ .blur(function() {
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
+ })
+ .mousedown(function(ev) {
+ ev.stopPropagation();
+ })
+ .click(function(event) {
+ self.close(event);
+ return false;
+ })
+ .appendTo(uiDialogTitlebar),
+
+ uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>'))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
+ .text(options.closeText)
+ .appendTo(uiDialogTitlebarClose),
+
+ uiDialogTitle = $('<span/>')
+ .addClass('ui-dialog-title')
+ .attr('id', titleId)
+ .html(title)
+ .prependTo(uiDialogTitlebar);
+
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
+
+ (options.draggable && $.fn.draggable && this._makeDraggable());
+ (options.resizable && $.fn.resizable && this._makeResizable());
+
+ this._createButtons(options.buttons);
+ this._isOpen = false;
+
+ (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
+ (options.autoOpen && this.open());
+
+ },
+
+ destroy: function() {
+ (this.overlay && this.overlay.destroy());
+ this.uiDialog.hide();
+ this.element
+ .unbind('.dialog')
+ .removeData('dialog')
+ .removeClass('ui-dialog-content ui-widget-content')
+ .hide().appendTo('body');
+ this.uiDialog.remove();
+
+ (this.originalTitle && this.element.attr('title', this.originalTitle));
+ },
+
+ close: function(event) {
+ var self = this;
+
+ if (false === self._trigger('beforeclose', event)) {
+ return;
+ }
+
+ (self.overlay && self.overlay.destroy());
+ self.uiDialog.unbind('keypress.ui-dialog');
+
+ (self.options.hide
+ ? self.uiDialog.hide(self.options.hide, function() {
+ self._trigger('close', event);
+ })
+ : self.uiDialog.hide() && self._trigger('close', event));
+
+ $.ui.dialog.overlay.resize();
+
+ self._isOpen = false;
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ if (self.options.modal) {
+ var maxZ = 0;
+ $('.ui-dialog').each(function() {
+ if (this != self.uiDialog[0]) {
+ maxZ = Math.max(maxZ, $(this).css('z-index'));
+ }
+ });
+ $.ui.dialog.maxZ = maxZ;
+ }
+ },
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ // the force parameter allows us to move modal dialogs to their correct
+ // position on open
+ moveToTop: function(force, event) {
+
+ if ((this.options.modal && !force)
+ || (!this.options.stack && !this.options.modal)) {
+ return this._trigger('focus', event);
+ }
+
+ if (this.options.zIndex > $.ui.dialog.maxZ) {
+ $.ui.dialog.maxZ = this.options.zIndex;
+ }
+ (this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ));
+
+ //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
+ // http://ui.jquery.com/bugs/ticket/3193
+ var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') };
+ this.uiDialog.css('z-index', ++$.ui.dialog.maxZ);
+ this.element.attr(saveScroll);
+ this._trigger('focus', event);
+ },
+
+ open: function() {
+ if (this._isOpen) { return; }
+
+ var options = this.options,
+ uiDialog = this.uiDialog;
+
+ this.overlay = options.modal ? new $.ui.dialog.overlay(this) : null;
+ (uiDialog.next().length && uiDialog.appendTo('body'));
+ this._size();
+ this._position(options.position);
+ uiDialog.show(options.show);
+ this.moveToTop(true);
+
+ // prevent tabbing out of modal dialogs
+ (options.modal && uiDialog.bind('keypress.ui-dialog', function(event) {
+ if (event.keyCode != $.ui.keyCode.TAB) {
+ return;
+ }
+
+ var tabbables = $(':tabbable', this),
+ first = tabbables.filter(':first')[0],
+ last = tabbables.filter(':last')[0];
+
+ if (event.target == last && !event.shiftKey) {
+ setTimeout(function() {
+ first.focus();
+ }, 1);
+ } else if (event.target == first && event.shiftKey) {
+ setTimeout(function() {
+ last.focus();
+ }, 1);
+ }
+ }));
+
+ // set focus to the first tabbable element in the content area or the first button
+ // if there are no tabbable elements, set focus on the dialog itself
+ $([])
+ .add(uiDialog.find('.ui-dialog-content :tabbable:first'))
+ .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first'))
+ .add(uiDialog)
+ .filter(':first')
+ .focus();
+
+ this._trigger('open');
+ this._isOpen = true;
+ },
+
+ _createButtons: function(buttons) {
+ var self = this,
+ hasButtons = false,
+ uiDialogButtonPane = $('<div></div>')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ );
+
+ // if we already have a button pane, remove it
+ this.uiDialog.find('.ui-dialog-buttonpane').remove();
+
+ (typeof buttons == 'object' && buttons !== null &&
+ $.each(buttons, function() { return !(hasButtons = true); }));
+ if (hasButtons) {
+ $.each(buttons, function(name, fn) {
+ $('<button type="button"></button>')
+ .addClass(
+ 'ui-state-default ' +
+ 'ui-corner-all'
+ )
+ .text(name)
+ .click(function() { fn.apply(self.element[0], arguments); })
+ .hover(
+ function() {
+ $(this).addClass('ui-state-hover');
+ },
+ function() {
+ $(this).removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ $(this).addClass('ui-state-focus');
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ })
+ .appendTo(uiDialogButtonPane);
+ });
+ uiDialogButtonPane.appendTo(this.uiDialog);
+ }
+ },
+
+ _makeDraggable: function() {
+ var self = this,
+ options = this.options,
+ heightBeforeDrag;
+
+ this.uiDialog.draggable({
+ cancel: '.ui-dialog-content',
+ handle: '.ui-dialog-titlebar',
+ containment: 'document',
+ start: function() {
+ heightBeforeDrag = options.height;
+ $(this).height($(this).height()).addClass("ui-dialog-dragging");
+ (options.dragStart && options.dragStart.apply(self.element[0], arguments));
+ },
+ drag: function() {
+ (options.drag && options.drag.apply(self.element[0], arguments));
+ },
+ stop: function() {
+ $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
+ (options.dragStop && options.dragStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ });
+ },
+
+ _makeResizable: function(handles) {
+ handles = (handles === undefined ? this.options.resizable : handles);
+ var self = this,
+ options = this.options,
+ resizeHandles = typeof handles == 'string'
+ ? handles
+ : 'n,e,s,w,se,sw,ne,nw';
+
+ this.uiDialog.resizable({
+ cancel: '.ui-dialog-content',
+ alsoResize: this.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: options.minHeight,
+ start: function() {
+ $(this).addClass("ui-dialog-resizing");
+ (options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
+ },
+ resize: function() {
+ (options.resize && options.resize.apply(self.element[0], arguments));
+ },
+ handles: resizeHandles,
+ stop: function() {
+ $(this).removeClass("ui-dialog-resizing");
+ options.height = $(this).height();
+ options.width = $(this).width();
+ (options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ })
+ .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
+ },
+
+ _position: function(pos) {
+ var wnd = $(window), doc = $(document),
+ pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
+ minTop = pTop;
+
+ if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) {
+ pos = [
+ pos == 'right' || pos == 'left' ? pos : 'center',
+ pos == 'top' || pos == 'bottom' ? pos : 'middle'
+ ];
+ }
+ if (pos.constructor != Array) {
+ pos = ['center', 'middle'];
+ }
+ if (pos[0].constructor == Number) {
+ pLeft += pos[0];
+ } else {
+ switch (pos[0]) {
+ case 'left':
+ pLeft += 0;
+ break;
+ case 'right':
+ pLeft += wnd.width() - this.uiDialog.outerWidth();
+ break;
+ default:
+ case 'center':
+ pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2;
+ }
+ }
+ if (pos[1].constructor == Number) {
+ pTop += pos[1];
+ } else {
+ switch (pos[1]) {
+ case 'top':
+ pTop += 0;
+ break;
+ case 'bottom':
+ pTop += wnd.height() - this.uiDialog.outerHeight();
+ break;
+ default:
+ case 'middle':
+ pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2;
+ }
+ }
+
+ // prevent the dialog from being too high (make sure the titlebar
+ // is accessible)
+ pTop = Math.max(pTop, minTop);
+ this.uiDialog.css({top: pTop, left: pLeft});
+ },
+
+ _setData: function(key, value){
+ (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
+ switch (key) {
+ case "buttons":
+ this._createButtons(value);
+ break;
+ case "closeText":
+ this.uiDialogTitlebarCloseText.text(value);
+ break;
+ case "dialogClass":
+ this.uiDialog
+ .removeClass(this.options.dialogClass)
+ .addClass(uiDialogClasses + value);
+ break;
+ case "draggable":
+ (value
+ ? this._makeDraggable()
+ : this.uiDialog.draggable('destroy'));
+ break;
+ case "height":
+ this.uiDialog.height(value);
+ break;
+ case "position":
+ this._position(value);
+ break;
+ case "resizable":
+ var uiDialog = this.uiDialog,
+ isResizable = this.uiDialog.is(':data(resizable)');
+
+ // currently resizable, becoming non-resizable
+ (isResizable && !value && uiDialog.resizable('destroy'));
+
+ // currently resizable, changing handles
+ (isResizable && typeof value == 'string' &&
+ uiDialog.resizable('option', 'handles', value));
+
+ // currently non-resizable, becoming resizable
+ (isResizable || this._makeResizable(value));
+ break;
+ case "title":
+ $(".ui-dialog-title", this.uiDialogTitlebar).html(value || '&nbsp;');
+ break;
+ case "width":
+ this.uiDialog.width(value);
+ break;
+ }
+
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _size: function() {
+ /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+ * divs will both have width and height set, so we need to reset them
+ */
+ var options = this.options;
+
+ // reset content sizing
+ this.element.css({
+ height: 0,
+ minHeight: 0,
+ width: 'auto'
+ });
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
+ var nonContentHeight = this.uiDialog.css({
+ height: 'auto',
+ width: options.width
+ })
+ .height();
+
+ this.element
+ .css({
+ minHeight: Math.max(options.minHeight - nonContentHeight, 0),
+ height: options.height == 'auto'
+ ? 'auto'
+ : Math.max(options.height - nonContentHeight, 0)
+ });
+ }
+});
+
+$.extend($.ui.dialog, {
+ version: "1.7.2",
+ defaults: {
+ autoOpen: true,
+ bgiframe: false,
+ buttons: {},
+ closeOnEscape: true,
+ closeText: 'close',
+ dialogClass: '',
+ draggable: true,
+ hide: null,
+ height: 'auto',
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: 'center',
+ resizable: true,
+ show: null,
+ stack: true,
+ title: '',
+ width: 300,
+ zIndex: 1000
+ },
+
+ getter: 'isOpen',
+
+ uuid: 0,
+ maxZ: 0,
+
+ getTitleId: function($el) {
+ return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid);
+ },
+
+ overlay: function(dialog) {
+ this.$el = $.ui.dialog.overlay.create(dialog);
+ }
+});
+
+$.extend($.ui.dialog.overlay, {
+ instances: [],
+ maxZ: 0,
+ events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
+ function(event) { return event + '.dialog-overlay'; }).join(' '),
+ create: function(dialog) {
+ if (this.instances.length === 0) {
+ // prevent use of anchors and inputs
+ // we use a setTimeout in case the overlay is created from an
+ // event that we're going to be cancelling (see #2804)
+ setTimeout(function() {
+ // handle $(el).dialog().dialog('close') (see #4065)
+ if ($.ui.dialog.overlay.instances.length) {
+ $(document).bind($.ui.dialog.overlay.events, function(event) {
+ var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0;
+ return (dialogZ > $.ui.dialog.overlay.maxZ);
+ });
+ }
+ }, 1);
+
+ // allow closing by pressing the escape key
+ $(document).bind('keydown.dialog-overlay', function(event) {
+ (dialog.options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close(event));
+ });
+
+ // handle window resize
+ $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
+ }
+
+ var $el = $('<div></div>').appendTo(document.body)
+ .addClass('ui-widget-overlay').css({
+ width: this.width(),
+ height: this.height()
+ });
+
+ (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
+
+ this.instances.push($el);
+ return $el;
+ },
+
+ destroy: function($el) {
+ this.instances.splice($.inArray(this.instances, $el), 1);
+
+ if (this.instances.length === 0) {
+ $([document, window]).unbind('.dialog-overlay');
+ }
+
+ $el.remove();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ var maxZ = 0;
+ $.each(this.instances, function() {
+ maxZ = Math.max(maxZ, this.css('z-index'));
+ });
+ this.maxZ = maxZ;
+ },
+
+ height: function() {
+ // handle IE 6
+ if ($.browser.msie && $.browser.version < 7) {
+ var scrollHeight = Math.max(
+ document.documentElement.scrollHeight,
+ document.body.scrollHeight
+ );
+ var offsetHeight = Math.max(
+ document.documentElement.offsetHeight,
+ document.body.offsetHeight
+ );
+
+ if (scrollHeight < offsetHeight) {
+ return $(window).height() + 'px';
+ } else {
+ return scrollHeight + 'px';
+ }
+ // handle "good" browsers
+ } else {
+ return $(document).height() + 'px';
+ }
+ },
+
+ width: function() {
+ // handle IE 6
+ if ($.browser.msie && $.browser.version < 7) {
+ var scrollWidth = Math.max(
+ document.documentElement.scrollWidth,
+ document.body.scrollWidth
+ );
+ var offsetWidth = Math.max(
+ document.documentElement.offsetWidth,
+ document.body.offsetWidth
+ );
+
+ if (scrollWidth < offsetWidth) {
+ return $(window).width() + 'px';
+ } else {
+ return scrollWidth + 'px';
+ }
+ // handle "good" browsers
+ } else {
+ return $(document).width() + 'px';
+ }
+ },
+
+ resize: function() {
+ /* If the dialog is draggable and the user drags it past the
+ * right edge of the window, the document becomes wider so we
+ * need to stretch the overlay. If the user then drags the
+ * dialog back to the left, the document will become narrower,
+ * so we need to shrink the overlay to the appropriate size.
+ * This is handled by shrinking the overlay before setting it
+ * to the full document size.
+ */
+ var $overlays = $([]);
+ $.each($.ui.dialog.overlay.instances, function() {
+ $overlays = $overlays.add(this);
+ });
+
+ $overlays.css({
+ width: 0,
+ height: 0
+ }).css({
+ width: $.ui.dialog.overlay.width(),
+ height: $.ui.dialog.overlay.height()
+ });
+ }
+});
+
+$.extend($.ui.dialog.overlay.prototype, {
+ destroy: function() {
+ $.ui.dialog.overlay.destroy(this.$el);
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.draggable.js b/themes/default/js/ui/ui.draggable.js
new file mode 100644
index 000000000..0402f0e5c
--- /dev/null
+++ b/themes/default/js/ui/ui.draggable.js
@@ -0,0 +1,766 @@
+/*
+ * jQuery UI Draggable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+ this.element[0].style.position = 'relative';
+
+ (this.options.addClasses && this.element.addClass("ui-draggable"));
+ (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ if(!this.element.data('draggable')) return;
+ this.element
+ .removeData("draggable")
+ .unbind(".draggable")
+ .removeClass("ui-draggable"
+ + " ui-draggable-dragging"
+ + " ui-draggable-disabled");
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+ return false;
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle)
+ return false;
+
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css("position");
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.element.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ //Call plugins and callbacks
+ this._trigger("start", event);
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.helper.addClass("ui-draggable-dragging");
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if (!noPropagation) {
+ var ui = this._uiHash();
+ this._trigger('drag', event, ui);
+ this.position = ui.position;
+ }
+
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ //If we are using droppables, inform the manager about the drop
+ var dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ dropped = $.ui.ddmanager.drop(this, event);
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+ var self = this;
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ self._trigger("stop", event);
+ self._clear();
+ });
+ } else {
+ this._trigger("stop", event);
+ this._clear();
+ }
+
+ return false;
+ },
+
+ _getHandle: function(event) {
+
+ var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+ $(this.options.handle, this.element)
+ .find("*")
+ .andSelf()
+ .each(function() {
+ if(this == event.target) handle = true;
+ });
+
+ return handle;
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element);
+
+ if(!helper.parents('body').length)
+ helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+ if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+ helper.css("position", "absolute");
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.element.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.element.css("marginLeft"),10) || 0),
+ top: (parseInt(this.element.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+ var ce = $(o.containment)[0]; if(!ce) return;
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ } else if(o.containment.constructor == Array) {
+ this.containment = o.containment;
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging");
+ if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
+ //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+ this.helper = null;
+ this.cancelHelperRemoval = false;
+ },
+
+ // From now on bulk stuff - mainly helpers
+
+ _trigger: function(type, event, ui) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call(this, type, [event, ui]);
+ if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+ return $.widget.prototype._trigger.call(this, type, event, ui);
+ },
+
+ plugins: {},
+
+ _uiHash: function(event) {
+ return {
+ helper: this.helper,
+ position: this.position,
+ absolutePosition: this.positionAbs, //deprecated
+ offset: this.positionAbs
+ };
+ }
+
+}));
+
+$.extend($.ui.draggable, {
+ version: "1.7.2",
+ eventPrefix: "drag",
+ defaults: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ cancel: ":input,option",
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ delay: 0,
+ distance: 1,
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false
+ }
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
+ inst.sortables = [];
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, 'sortable');
+ if (sortable && !sortable.options.disabled) {
+ inst.sortables.push({
+ instance: sortable,
+ shouldRevert: sortable.options.revert
+ });
+ sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ sortable._trigger("activate", event, uiSortable);
+ }
+ });
+
+ },
+ stop: function(event, ui) {
+
+ //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+ var inst = $(this).data("draggable"),
+ uiSortable = $.extend({}, ui, { item: inst.element });
+
+ $.each(inst.sortables, function() {
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+
+ inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+ this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+ //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+ if(this.shouldRevert) this.instance.options.revert = true;
+
+ //Trigger the stop of the sortable
+ this.instance._mouseStop(event);
+
+ this.instance.options.helper = this.instance.options._helper;
+
+ //If the helper has been the original item, restore properties in the sortable
+ if(inst.options.helper == 'original')
+ this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
+ } else {
+ this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+ this.instance._trigger("deactivate", event, uiSortable);
+ }
+
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), self = this;
+
+ var checkPos = function(o) {
+ var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+ var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+ var itemHeight = o.height, itemWidth = o.width;
+ var itemTop = o.top, itemLeft = o.left;
+
+ return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+ };
+
+ $.each(inst.sortables, function(i) {
+
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
+
+ //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+ if(!this.instance.isOver) {
+
+ this.instance.isOver = 1;
+ //Now we fake the start of dragging for the sortable instance,
+ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+ //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+ this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
+ this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+ this.instance.options.helper = function() { return ui.helper[0]; };
+
+ event.target = this.instance.currentItem[0];
+ this.instance._mouseCapture(event, true);
+ this.instance._mouseStart(event, true, true);
+
+ //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+ this.instance.offset.click.top = inst.offset.click.top;
+ this.instance.offset.click.left = inst.offset.click.left;
+ this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+ this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+ inst._trigger("toSortable", event);
+ inst.dropped = this.instance.element; //draggable revert needs that
+ //hack so receive/update callbacks work (mostly)
+ inst.currentItem = inst.element;
+ this.instance.fromOutside = inst;
+
+ }
+
+ //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+ if(this.instance.currentItem) this.instance._mouseDrag(event);
+
+ } else {
+
+ //If it doesn't intersect with the sortable, and it intersected before,
+ //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+ this.instance.cancelHelperRemoval = true;
+
+ //Prevent reverting on this forced stop
+ this.instance.options.revert = false;
+
+ // The out event needs to be triggered independently
+ this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+
+ this.instance._mouseStop(event, true);
+ this.instance.options.helper = this.instance.options._helper;
+
+ //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+ this.instance.currentItem.remove();
+ if(this.instance.placeholder) this.instance.placeholder.remove();
+
+ inst._trigger("fromSortable", event);
+ inst.dropped = false; //draggable revert needs that
+ }
+
+ };
+
+ });
+
+ }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+ start: function(event, ui) {
+ var t = $('body'), o = $(this).data('draggable').options;
+ if (t.css("cursor")) o._cursor = t.css("cursor");
+ t.css("cursor", o.cursor);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if (o._cursor) $('body').css("cursor", o._cursor);
+ }
+});
+
+$.ui.plugin.add("draggable", "iframeFix", {
+ start: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+ .css({
+ width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+ position: "absolute", opacity: "0.001", zIndex: 1000
+ })
+ .css($(this).offset())
+ .appendTo("body");
+ });
+ },
+ stop: function(event, ui) {
+ $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
+ }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data('draggable').options;
+ if(t.css("opacity")) o._opacity = t.css("opacity");
+ t.css('opacity', o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function(event, ui) {
+ var i = $(this).data("draggable");
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+ },
+ drag: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+ if(!o.axis || o.axis != 'x') {
+ if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if(!o.axis || o.axis != 'x') {
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(i, event);
+
+ }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+ start: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options;
+ i.snapElements = [];
+
+ $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+ var $t = $(this); var $o = $t.offset();
+ if(this != i.element[0]) i.snapElements.push({
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ });
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options;
+ var d = o.snapTolerance;
+
+ var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+ var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+ t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+ //Yes, I know, this is insane ;)
+ if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+ if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = false;
+ continue;
+ }
+
+ if(o.snapMode != 'inner') {
+ var ts = Math.abs(t - y2) <= d;
+ var bs = Math.abs(b - y1) <= d;
+ var ls = Math.abs(l - x2) <= d;
+ var rs = Math.abs(r - x1) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+ }
+
+ var first = (ts || bs || ls || rs);
+
+ if(o.snapMode != 'outer') {
+ var ts = Math.abs(t - y1) <= d;
+ var bs = Math.abs(b - y2) <= d;
+ var ls = Math.abs(l - x1) <= d;
+ var rs = Math.abs(r - x2) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+ }
+
+ if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+ (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+ };
+
+ }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+ start: function(event, ui) {
+
+ var o = $(this).data("draggable").options;
+
+ var group = $.makeArray($(o.stack.group)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
+ });
+
+ $(group).each(function(i) {
+ this.style.zIndex = o.stack.min + i;
+ });
+
+ this[0].style.zIndex = o.stack.min + group.length;
+
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("draggable").options;
+ if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+ t.css('zIndex', o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("draggable").options;
+ if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.droppable.js b/themes/default/js/ui/ui.droppable.js
new file mode 100644
index 000000000..8e7be33c5
--- /dev/null
+++ b/themes/default/js/ui/ui.droppable.js
@@ -0,0 +1,282 @@
+/*
+ * jQuery UI Droppable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ */
+(function($) {
+
+$.widget("ui.droppable", {
+
+ _init: function() {
+
+ var o = this.options, accept = o.accept;
+ this.isover = 0; this.isout = 1;
+
+ this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) {
+ return d.is(accept);
+ };
+
+ //Store the droppable's proportions
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+ // Add the reference and positions to the manager
+ $.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || [];
+ $.ui.ddmanager.droppables[this.options.scope].push(this);
+
+ (this.options.addClasses && this.element.addClass("ui-droppable"));
+
+ },
+
+ destroy: function() {
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
+ for ( var i = 0; i < drop.length; i++ )
+ if ( drop[i] == this )
+ drop.splice(i, 1);
+
+ this.element
+ .removeClass("ui-droppable ui-droppable-disabled")
+ .removeData("droppable")
+ .unbind(".droppable");
+ },
+
+ _setData: function(key, value) {
+
+ if(key == 'accept') {
+ this.options.accept = value && $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ } else {
+ $.widget.prototype._setData.apply(this, arguments);
+ }
+
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
+ },
+
+ _deactivate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
+ },
+
+ _over: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
+ this._trigger('over', event, this.ui(draggable));
+ }
+
+ },
+
+ _out: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('out', event, this.ui(draggable));
+ }
+
+ },
+
+ _drop: function(event,custom) {
+
+ var draggable = custom || $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
+
+ var childrenIntersection = false;
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
+ var inst = $.data(this, 'droppable');
+ if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
+ childrenIntersection = true; return false;
+ }
+ });
+ if(childrenIntersection) return false;
+
+ if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('drop', event, this.ui(draggable));
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ absolutePosition: c.positionAbs, //deprecated
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.extend($.ui.droppable, {
+ version: "1.7.2",
+ eventPrefix: 'drop',
+ defaults: {
+ accept: '*',
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: 'default',
+ tolerance: 'intersect'
+ }
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+ if (!droppable.offset) return false;
+
+ var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+ var l = droppable.offset.left, r = l + droppable.proportions.width,
+ t = droppable.offset.top, b = t + droppable.proportions.height;
+
+ switch (toleranceMode) {
+ case 'fit':
+ return (l < x1 && x2 < r
+ && t < y1 && y2 < b);
+ break;
+ case 'intersect':
+ return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
+ && x2 - (draggable.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
+ && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+ break;
+ case 'pointer':
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+ return isOver;
+ break;
+ case 'touch':
+ return (
+ (y1 >= t && y1 <= b) || // Top edge touching
+ (y2 >= t && y2 <= b) || // Bottom edge touching
+ (y1 < t && y2 > b) // Surrounded vertically
+ ) && (
+ (x1 >= l && x1 <= r) || // Left edge touching
+ (x2 >= l && x2 <= r) || // Right edge touching
+ (x1 < l && x2 > r) // Surrounded horizontally
+ );
+ break;
+ default:
+ return false;
+ break;
+ }
+
+};
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { 'default': [] },
+ prepareOffsets: function(t, event) {
+
+ var m = $.ui.ddmanager.droppables[t.options.scope];
+ var type = event ? event.type : null; // workaround for #2317
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
+
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+ if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+
+ m[i].offset = m[i].element.offset();
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
+ }
+
+ },
+ drop: function(draggable, event) {
+
+ var dropped = false;
+ $.each($.ui.ddmanager.droppables[draggable.options.scope], function() {
+
+ if(!this.options) return;
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
+ dropped = this._drop.call(this, event);
+
+ if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = 1; this.isover = 0;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ drag: function(draggable, event) {
+
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
+
+ //Run through all droppables and check their positions based on specific tolerance options
+
+ $.each($.ui.ddmanager.droppables[draggable.options.scope], function() {
+
+ if(this.options.disabled || this.greedyChild || !this.visible) return;
+ var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
+
+ var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
+ if(!c) return;
+
+ var parentInstance;
+ if (this.options.greedy) {
+ var parent = this.element.parents(':data(droppable):eq(0)');
+ if (parent.length) {
+ parentInstance = $.data(parent[0], 'droppable');
+ parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
+ }
+ }
+
+ // we just moved into a greedy child
+ if (parentInstance && c == 'isover') {
+ parentInstance['isover'] = 0;
+ parentInstance['isout'] = 1;
+ parentInstance._out.call(parentInstance, event);
+ }
+
+ this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
+
+ // we just moved out of a greedy child
+ if (parentInstance && c == 'isout') {
+ parentInstance['isout'] = 0;
+ parentInstance['isover'] = 1;
+ parentInstance._over.call(parentInstance, event);
+ }
+ });
+
+ }
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.resizable.js b/themes/default/js/ui/ui.resizable.js
new file mode 100644
index 000000000..6172d6cb8
--- /dev/null
+++ b/themes/default/js/ui/ui.resizable.js
@@ -0,0 +1,800 @@
+/*
+ * jQuery UI Resizable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Opera fix for relative positioning
+ if (/relative/.test(this.element.css('position')) && $.browser.opera)
+ this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
+ })
+ );
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
+ //Move margins to the wrapper
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+ //Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+ // fix handlers offset
+ this._proportionallyResize();
+
+ }
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
+ for(var i = 0; i < n.length; i++) {
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+ // increase zIndex of sw, se, ne, nw axis
+ //TODO : this modifies original option
+ if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ target = target || this.element;
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
+ //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+ //Checking the correct pad and border
+ padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+ //The padding type i have to apply...
+ var padPos = [ 'padding',
+ /ne|nw|n/.test(i) ? 'Top' :
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!self.resizing) {
+ if (this.className)
+ var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ //Axis, default = se
+ self.axis = axis && axis[1] ? axis[1] : 'se';
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .hover(function() {
+ $(this).removeClass("ui-resizable-autohide");
+ self._handles.show();
+ },
+ function(){
+ if (!self.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ self._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+
+ this._mouseDestroy();
+
+ var _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ wrapper.parent().append(
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
+ })
+ ).end().remove();
+ }
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var handle = false;
+ for(var i in this.handles) {
+ if($(this.handles[i])[0] == event.target) handle = true;
+ }
+
+ return this.options.disabled || !!handle;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+ }
+
+ //Opera fixing relative position
+ if ($.browser.opera && (/relative/).test(el.css('position')))
+ el.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ this._renderProxy();
+
+ var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+ if (o.containment) {
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
+ }
+
+ //Store needed variables
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalPosition = { left: curleft, top: curtop };
+ this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ //Aspect Ratio
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ //Increase performance, avoid regex
+ var el = this.helper, o = this.options, props = {},
+ self = this, smp = this.originalMousePosition, a = this.axis;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+ var trigger = this._change[a];
+ if (!trigger) return false;
+
+ // Calculate the attrs that will be change
+ var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ el.css({
+ top: this.position.top + "px", left: this.position.left + "px",
+ width: this.size.width + "px", height: this.size.height + "px"
+ });
+
+ if (!this._helper && this._proportionallyResizeElements.length)
+ this._proportionallyResize();
+
+ this._updateCache(data);
+
+ // calling the user callback at the end
+ this._trigger('resize', event, this.ui());
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, self = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ if (!o.animate)
+ this.element.css($.extend(s, { top: top, left: left }));
+
+ self.helper.height(self.size.height);
+ self.helper.width(self.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
+ }
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
+ return false;
+
+ },
+
+ _updateCache: function(data) {
+ var o = this.options;
+ this.offset = this.helper.offset();
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
+ },
+
+ _updateRatio: function(data, event) {
+
+ var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+ if (data.height) data.width = (csize.height * this.aspectRatio);
+ else if (data.width) data.height = (csize.width / this.aspectRatio);
+
+ if (a == 'sw') {
+ data.left = cpos.left + (csize.width - data.width);
+ data.top = null;
+ }
+ if (a == 'nw') {
+ data.top = cpos.top + (csize.height - data.height);
+ data.left = cpos.left + (csize.width - data.width);
+ }
+
+ return data;
+ },
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+ if (isminw) data.width = o.minWidth;
+ if (isminh) data.height = o.minHeight;
+ if (ismaxw) data.width = o.maxWidth;
+ if (ismaxh) data.height = o.maxHeight;
+
+ var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+ var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+ if (isminw && cw) data.left = dw - o.minWidth;
+ if (ismaxw && cw) data.left = dw - o.maxWidth;
+ if (isminh && ch) data.top = dh - o.minHeight;
+ if (ismaxh && ch) data.top = dh - o.maxHeight;
+
+ // fixing jump error on top/left - bug #2330
+ var isNotwh = !data.width && !data.height;
+ if (isNotwh && !data.left && data.top) data.top = null;
+ else if (isNotwh && !data.top && data.left) data.left = null;
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ var o = this.options;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+ continue;
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+ });
+
+ };
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if(this._helper) {
+
+ this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+ // fix ie6 offset TODO: This seems broken
+ var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+ pxyoffset = ( ie6 ? 2 : -1 );
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
+ position: 'absolute',
+ left: this.elementOffset.left - ie6offset +'px',
+ top: this.elementOffset.top - ie6offset +'px',
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx, dy) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+}));
+
+$.extend($.ui.resizable, {
+ version: "1.7.2",
+ eventPrefix: "resize",
+ defaults: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ cancel: ":input,option",
+ containment: false,
+ delay: 0,
+ distance: 1,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
+ }
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options;
+
+ _store = function(exp) {
+ $(exp).each(function() {
+ $(this).data("resizable-alsoresize", {
+ width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
+ left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+ var delta = {
+ height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+ top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+ },
+
+ _alsoResize = function(exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+
+ $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ //Opera fixing relative position
+ if (/relative/.test(el.css('position')) && $.browser.opera) {
+ self._revertToRelativePosition = true;
+ el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+ }
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable");
+
+ //Opera fixing relative position
+ if (self._revertToRelativePosition && $.browser.opera) {
+ self._revertToRelativePosition = false;
+ el.css({ position: 'relative' });
+ }
+
+ $(this).removeData("resizable-alsoresize-start");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ self.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(self.element.css('width'), 10),
+ height: parseInt(self.element.css('height'), 10),
+ top: parseInt(self.element.css('top'), 10),
+ left: parseInt(self.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ self._updateCache(data);
+ self._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, el = self.element;
+ var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+ if (!ce) return;
+
+ self.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc == document) {
+ self.containerOffset = { left: 0, top: 0 };
+ self.containerPosition = { left: 0, top: 0 };
+
+ self.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ self.containerOffset = element.offset();
+ self.containerPosition = element.position();
+ self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ self.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options,
+ ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+ pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (self._helper ? co.left : 0)) {
+ self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ self.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (self._helper ? co.top : 0)) {
+ self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ self.position.top = self._helper ? co.top : 0;
+ }
+
+ self.offset.left = self.parentData.left+self.position.left;
+ self.offset.top = self.parentData.top+self.position.top;
+
+ var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+ hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+ var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
+ if (woset + self.size.width >= self.parentData.width) {
+ self.size.width = self.parentData.width - woset;
+ if (pRatio) self.size.height = self.size.width / self.aspectRatio;
+ }
+
+ if (hoset + self.size.height >= self.parentData.height) {
+ self.size.height = self.parentData.height - hoset;
+ if (pRatio) self.size.width = self.size.height * self.aspectRatio;
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, cp = self.position,
+ co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+
+ var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+ if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+ self.ghost = self.originalElement.clone();
+ self.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ self.ghost.appendTo(self.helper);
+
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
+ o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+ if (/^(se|s|e)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ }
+ else if (/^(ne)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ }
+ else if (/^(sw)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.left = op.left - ox;
+ }
+ else {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ self.position.left = op.left - ox;
+ }
+ }
+
+});
+
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.selectable.js b/themes/default/js/ui/ui.selectable.js
new file mode 100644
index 000000000..08f99cf4a
--- /dev/null
+++ b/themes/default/js/ui/ui.selectable.js
@@ -0,0 +1,257 @@
+/*
+ * jQuery UI Selectable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+ var self = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ var selectees;
+ this.refresh = function() {
+ selectees = $(self.options.filter, self.element[0]);
+ selectees.each(function() {
+ var $this = $(this);
+ var pos = $this.offset();
+ $.data(this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass('ui-selected'),
+ selecting: $this.hasClass('ui-selecting'),
+ unselecting: $this.hasClass('ui-unselecting')
+ });
+ });
+ };
+ this.refresh();
+
+ this.selectees = selectees.addClass("ui-selectee");
+
+ this._mouseInit();
+
+ this.helper = $(document.createElement('div'))
+ .css({border:'1px dotted black'})
+ .addClass("ui-selectable-helper");
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-selectable ui-selectable-disabled")
+ .removeData("selectable")
+ .unbind(".selectable");
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function(event) {
+ var self = this;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "z-index": 100,
+ "position": "absolute",
+ "left": event.clientX,
+ "top": event.clientY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter('.ui-selected').each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().andSelf().each(function() {
+ var selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');
+ selectee.unselecting = false;
+ selectee.selecting = true;
+ selectee.selected = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+ var self = this;
+ this.dragged = true;
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
+ if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+ this.selectees.each(function() {
+ var selectee = $.data(this, "selectable-item");
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element == self.element[0])
+ return;
+ var hit = false;
+ if (options.tolerance == 'touch') {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance == 'fit') {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass('ui-selecting');
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if (event.metaKey && selectee.startselected) {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ selectee.$element.addClass('ui-selected');
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !selectee.startselected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var self = this;
+
+ this.dragged = false;
+
+ var options = this.options;
+
+ $('.ui-unselecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ self._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $('.ui-selecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ self._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+
+ return false;
+ }
+
+}));
+
+$.extend($.ui.selectable, {
+ version: "1.7.2",
+ defaults: {
+ appendTo: 'body',
+ autoRefresh: true,
+ cancel: ":input,option",
+ delay: 0,
+ distance: 0,
+ filter: '*',
+ tolerance: 'touch'
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.slider.js b/themes/default/js/ui/ui.slider.js
new file mode 100644
index 000000000..f466a69b2
--- /dev/null
+++ b/themes/default/js/ui/ui.slider.js
@@ -0,0 +1,558 @@
+/*
+ * jQuery UI Slider 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * ui.core.js
+ */
+
+(function($) {
+
+$.widget("ui.slider", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this._keySliding = false;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
+ this.element
+ .addClass("ui-slider"
+ + " ui-slider-" + this.orientation
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all");
+
+ this.range = $([]);
+
+ if (o.range) {
+
+ if (o.range === true) {
+ this.range = $('<div></div>');
+ if (!o.values) o.values = [this._valueMin(), this._valueMin()];
+ if (o.values.length && o.values.length != 2) {
+ o.values = [o.values[0], o.values[0]];
+ }
+ } else {
+ this.range = $('<div></div>');
+ }
+
+ this.range
+ .appendTo(this.element)
+ .addClass("ui-slider-range");
+
+ if (o.range == "min" || o.range == "max") {
+ this.range.addClass("ui-slider-range-" + o.range);
+ }
+
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ this.range.addClass("ui-widget-header");
+
+ }
+
+ if ($(".ui-slider-handle", this.element).length == 0)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+
+ if (o.values && o.values.length) {
+ while ($(".ui-slider-handle", this.element).length < o.values.length)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+ }
+
+ this.handles = $(".ui-slider-handle", this.element)
+ .addClass("ui-state-default"
+ + " ui-corner-all");
+
+ this.handle = this.handles.eq(0);
+
+ this.handles.add(this.range).filter("a")
+ .click(function(event) {
+ event.preventDefault();
+ })
+ .hover(function() {
+ if (!o.disabled) {
+ $(this).addClass('ui-state-hover');
+ }
+ }, function() {
+ $(this).removeClass('ui-state-hover');
+ })
+ .focus(function() {
+ if (!o.disabled) {
+ $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus');
+ } else {
+ $(this).blur();
+ }
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ });
+
+ this.handles.each(function(i) {
+ $(this).data("index.ui-slider-handle", i);
+ });
+
+ this.handles.keydown(function(event) {
+
+ var ret = true;
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self.options.disabled)
+ return;
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ ret = false;
+ if (!self._keySliding) {
+ self._keySliding = true;
+ $(this).addClass("ui-state-active");
+ self._start(event, index);
+ }
+ break;
+ }
+
+ var curVal, newVal, step = self._step();
+ if (self.options.values && self.options.values.length) {
+ curVal = newVal = self.values(index);
+ } else {
+ curVal = newVal = self.value();
+ }
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ newVal = self._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = self._valueMax();
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if(curVal == self._valueMax()) return;
+ newVal = curVal + step;
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if(curVal == self._valueMin()) return;
+ newVal = curVal - step;
+ break;
+ }
+
+ self._slide(event, index, newVal);
+
+ return ret;
+
+ }).keyup(function(event) {
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self._keySliding) {
+ self._stop(event, index);
+ self._change(event, index);
+ self._keySliding = false;
+ $(this).removeClass("ui-state-active");
+ }
+
+ });
+
+ this._refreshValue();
+
+ },
+
+ destroy: function() {
+
+ this.handles.remove();
+ this.range.remove();
+
+ this.element
+ .removeClass("ui-slider"
+ + " ui-slider-horizontal"
+ + " ui-slider-vertical"
+ + " ui-slider-disabled"
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all")
+ .removeData("slider")
+ .unbind(".slider");
+
+ this._mouseDestroy();
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ if (o.disabled)
+ return false;
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ var distance = this._valueMax() - this._valueMin() + 1, closestHandle;
+ var self = this, index;
+ this.handles.each(function(i) {
+ var thisDistance = Math.abs(normValue - self.values(i));
+ if (distance > thisDistance) {
+ distance = thisDistance;
+ closestHandle = $(this);
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if(o.range == true && this.values(1) == o.min) {
+ closestHandle = $(this.handles[++index]);
+ }
+
+ this._start(event, index);
+
+ self._handleIndex = index;
+
+ closestHandle
+ .addClass("ui-state-active")
+ .focus();
+
+ var offset = closestHandle.offset();
+ var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle');
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - (closestHandle.width() / 2),
+ top: event.pageY - offset.top
+ - (closestHandle.height() / 2)
+ - (parseInt(closestHandle.css('borderTopWidth'),10) || 0)
+ - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0)
+ + (parseInt(closestHandle.css('marginTop'),10) || 0)
+ };
+
+ normValue = this._normValueFromMouse(position);
+ this._slide(event, index, normValue);
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ this._slide(event, this._handleIndex, normValue);
+
+ return false;
+
+ },
+
+ _mouseStop: function(event) {
+
+ this.handles.removeClass("ui-state-active");
+ this._stop(event, this._handleIndex);
+ this._change(event, this._handleIndex);
+ this._handleIndex = null;
+ this._clickOffset = null;
+
+ return false;
+
+ },
+
+ _detectOrientation: function() {
+ this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal';
+ },
+
+ _normValueFromMouse: function(position) {
+
+ var pixelTotal, pixelMouse;
+ if ('horizontal' == this.orientation) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0);
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0);
+ }
+
+ var percentMouse = (pixelMouse / pixelTotal);
+ if (percentMouse > 1) percentMouse = 1;
+ if (percentMouse < 0) percentMouse = 0;
+ if ('vertical' == this.orientation)
+ percentMouse = 1 - percentMouse;
+
+ var valueTotal = this._valueMax() - this._valueMin(),
+ valueMouse = percentMouse * valueTotal,
+ valueMouseModStep = valueMouse % this.options.step,
+ normValue = this._valueMin() + valueMouse - valueMouseModStep;
+
+ if (valueMouseModStep > (this.options.step / 2))
+ normValue += this.options.step;
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat(normValue.toFixed(5));
+
+ },
+
+ _start: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("start", event, uiHash);
+ },
+
+ _slide: function(event, index, newVal) {
+
+ var handle = this.handles[index];
+
+ if (this.options.values && this.options.values.length) {
+
+ var otherVal = this.values(index ? 0 : 1);
+
+ if ((this.options.values.length == 2 && this.options.range === true) &&
+ ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){
+ newVal = otherVal;
+ }
+
+ if (newVal != this.values(index)) {
+ var newValues = this.values();
+ newValues[index] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal,
+ values: newValues
+ });
+ var otherVal = this.values(index ? 0 : 1);
+ if (allowed !== false) {
+ this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true);
+ }
+ }
+
+ } else {
+
+ if (newVal != this.value()) {
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal
+ });
+ if (allowed !== false) {
+ this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate ));
+ }
+
+ }
+
+ }
+
+ },
+
+ _stop: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("stop", event, uiHash);
+ },
+
+ _change: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("change", event, uiHash);
+ },
+
+ value: function(newValue) {
+
+ if (arguments.length) {
+ this._setData("value", newValue);
+ this._change(null, 0);
+ }
+
+ return this._value();
+
+ },
+
+ values: function(index, newValue, animated, noPropagation) {
+
+ if (arguments.length > 1) {
+ this.options.values[index] = newValue;
+ this._refreshValue(animated);
+ if(!noPropagation) this._change(null, index);
+ }
+
+ if (arguments.length) {
+ if (this.options.values && this.options.values.length) {
+ return this._values(index);
+ } else {
+ return this.value();
+ }
+ } else {
+ return this._values();
+ }
+
+ },
+
+ _setData: function(key, value, animated) {
+
+ $.widget.prototype._setData.apply(this, arguments);
+
+ switch (key) {
+ case 'disabled':
+ if (value) {
+ this.handles.filter(".ui-state-focus").blur();
+ this.handles.removeClass("ui-state-hover");
+ this.handles.attr("disabled", "disabled");
+ } else {
+ this.handles.removeAttr("disabled");
+ }
+ case 'orientation':
+
+ this._detectOrientation();
+
+ this.element
+ .removeClass("ui-slider-horizontal ui-slider-vertical")
+ .addClass("ui-slider-" + this.orientation);
+ this._refreshValue(animated);
+ break;
+ case 'value':
+ this._refreshValue(animated);
+ break;
+ }
+
+ },
+
+ _step: function() {
+ var step = this.options.step;
+ return step;
+ },
+
+ _value: function() {
+
+ var val = this.options.value;
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+
+ },
+
+ _values: function(index) {
+
+ if (arguments.length) {
+ var val = this.options.values[index];
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+ } else {
+ return this.options.values;
+ }
+
+ },
+
+ _valueMin: function() {
+ var valueMin = this.options.min;
+ return valueMin;
+ },
+
+ _valueMax: function() {
+ var valueMax = this.options.max;
+ return valueMax;
+ },
+
+ _refreshValue: function(animate) {
+
+ var oRange = this.options.range, o = this.options, self = this;
+
+ if (this.options.values && this.options.values.length) {
+ var vp0, vp1;
+ this.handles.each(function(i, j) {
+ var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+ if (self.options.range === true) {
+ if (self.orientation == 'horizontal') {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ } else {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ var value = this.value(),
+ valueMin = this._valueMin(),
+ valueMax = this._valueMax(),
+ valPercent = valueMax != valueMin
+ ? (value - valueMin) / (valueMax - valueMin) * 100
+ : 0;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+
+ (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+
+ }
+
+}));
+
+$.extend($.ui.slider, {
+ getter: "value values",
+ version: "1.7.2",
+ eventPrefix: "slide",
+ defaults: {
+ animate: false,
+ delay: 0,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: 'horizontal',
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.sortable.js b/themes/default/js/ui/ui.sortable.js
new file mode 100644
index 000000000..5460850b4
--- /dev/null
+++ b/themes/default/js/ui/ui.sortable.js
@@ -0,0 +1,1019 @@
+/*
+ * jQuery UI Sortable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
+ _init: function() {
+
+ var o = this.options;
+ this.containerCache = {};
+ this.element.addClass("ui-sortable");
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine if the items are floating
+ this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled")
+ .removeData("sortable")
+ .unbind(".sortable");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- )
+ this.items[i].item.removeData("sortable-item");
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type == 'static') return false;
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
+ if($.data(this, 'sortable-item') == self) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
+
+ if(!currentItem) return false;
+ if(this.options.handle && !overrideHandle) {
+ var validHandle = false;
+
+ $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+ if(!validHandle) return false;
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var o = this.options, self = this;
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] != this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ if(o.cursor) { // cursor option
+ if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+ $('body').css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+ this.overflowOffset = this.scrollParent.offset();
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions)
+ this._cacheHelperProportions();
+
+
+ //Post 'activate' events to possible containers
+ if(!noActivation) {
+ for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ var o = this.options, scrolled = false;
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+ } else {
+
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper position
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+
+ //Rearrange
+ for (var i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+ if (!intersection) continue;
+
+ if(itemElement != this.currentItem[0] //cannot intersect with itself
+ && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+ && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+ ) {
+
+ this.direction = intersection == 1 ? "down" : "up";
+
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ //Call callbacks
+ this._trigger('sort', event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) return;
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ $.ui.ddmanager.drop(this, event);
+
+ if(this.options.revert) {
+ var self = this;
+ var cur = self.placeholder.offset();
+
+ self.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ self._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ var self = this;
+
+ if(this.dragging) {
+
+ this._mouseUp();
+
+ if(this.options.helper == "original")
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ else
+ this.currentItem.show();
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, self._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, self._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+
+ return true;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var str = []; o = o || {};
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
+ });
+
+ return str.join('&');
+
+ },
+
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var ret = []; o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height;
+
+ var l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height;
+
+ var dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left;
+
+ var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if( this.options.tolerance == "pointer"
+ || this.options.forcePointerForContainers
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) // Right Half
+ && x2 - (this.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (this.helperProportions.height / 2) // Bottom Half
+ && y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (!isOverElement)
+ return false;
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
+ } else {
+ return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta != 0 && (delta > 0 ? "down" : "up");
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta != 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
+ this.refreshPositions();
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor == String
+ ? [options.connectWith]
+ : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var self = this;
+ var items = [];
+ var queries = [];
+ var connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]);
+ }
+ };
+ };
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]);
+
+ for (var i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ };
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(sortable-item)");
+
+ for (var i=0; i < this.items.length; i++) {
+
+ for (var j=0; j < list.length; j++) {
+ if(list[j] == this.items[i].item[0])
+ this.items.splice(i,1);
+ };
+
+ };
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+ var items = this.items;
+ var self = this;
+ var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+ var connectWith = this._connectWith();
+
+ if(connectWith) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+ this.containers.push(inst);
+ }
+ };
+ };
+ }
+
+ for (var i = queries.length - 1; i >= 0; i--) {
+ var targetData = queries[i][1];
+ var _queries = queries[i][0];
+
+ for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ var item = $(_queries[j]);
+
+ item.data('sortable-item', targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ };
+ };
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ for (var i = this.items.length - 1; i >= 0; i--){
+ var item = this.items[i];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
+ var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ var p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ };
+
+ if(this.options.custom && this.options.custom.refreshContainers) {
+ this.options.custom.refreshContainers.call(this);
+ } else {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ var p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ };
+ }
+
+ },
+
+ _createPlaceholder: function(that) {
+
+ var self = that || this, o = self.options;
+
+ if(!o.placeholder || o.placeholder.constructor == String) {
+ var className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var el = $(document.createElement(self.currentItem[0].nodeName))
+ .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className)
+ el.style.visibility = "hidden";
+
+ return el;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) return;
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
+ if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
+ }
+ };
+ }
+
+ //Create the placeholder
+ self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
+
+ //Append it after the actual current item
+ self.currentItem.after(self.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(self, self.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+ if(!this.containers[i].containerCache.over) {
+
+ if(this.currentContainer != this.containers[i]) {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
+ for (var j = this.items.length - 1; j >= 0; j--) {
+ if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue;
+ var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ }
+ }
+
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+ continue;
+
+ this.currentContainer = this.containers[i];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[i].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[i]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ }
+
+ this.containers[i]._trigger("over", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 1;
+ }
+ } else {
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ };
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+ if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+ $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+ if(helper[0] == this.currentItem[0])
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+ if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+ if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ },
+
+ _getParentOffset: function() {
+
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ var ce = $(o.containment)[0];
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var self = this, counter = this.counter;
+
+ window.setTimeout(function() {
+ if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ },0);
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var delayedTriggers = [], self = this;
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+ this._noFinalSort = null;
+
+ if(this.helper[0] == this.currentItem[0]) {
+ for(var i in this._storedCSS) {
+ if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ }
+ };
+ };
+
+ //Post events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+ if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset cursor
+ if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
+ this.dragging = false;
+ if(this.cancelHelperRemoval) {
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+ return false;
+ }
+
+ if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+ if(!noPropagation) {
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(inst) {
+ var self = inst || this;
+ return {
+ helper: self.helper,
+ placeholder: self.placeholder || $([]),
+ position: self.position,
+ absolutePosition: self.positionAbs, //deprecated
+ offset: self.positionAbs,
+ item: self.currentItem,
+ sender: inst ? inst.element : null
+ };
+ }
+
+}));
+
+$.extend($.ui.sortable, {
+ getter: "serialize toArray",
+ version: "1.7.2",
+ eventPrefix: "sort",
+ defaults: {
+ appendTo: "parent",
+ axis: false,
+ cancel: ":input,option",
+ connectWith: false,
+ containment: false,
+ cursor: 'auto',
+ cursorAt: false,
+ delay: 0,
+ distance: 1,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: '> *',
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.tabs.js b/themes/default/js/ui/ui.tabs.js
new file mode 100644
index 000000000..d914b3e4f
--- /dev/null
+++ b/themes/default/js/ui/ui.tabs.js
@@ -0,0 +1,685 @@
+/*
+ * jQuery UI Tabs 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.tabs", {
+
+ _init: function() {
+ if (this.options.deselectable !== undefined) {
+ this.options.collapsible = this.options.deselectable;
+ }
+ this._tabify(true);
+ },
+
+ _setData: function(key, value) {
+ if (key == 'selected') {
+ if (this.options.collapsible && value == this.options.selected) {
+ return;
+ }
+ this.select(value);
+ }
+ else {
+ this.options[key] = value;
+ if (key == 'deselectable') {
+ this.options.collapsible = value;
+ }
+ this._tabify();
+ }
+ },
+
+ _tabId: function(a) {
+ return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
+ this.options.idPrefix + $.data(a);
+ },
+
+ _sanitizeSelector: function(hash) {
+ return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
+ },
+
+ _cookie: function() {
+ var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0]));
+ return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
+ },
+
+ _ui: function(tab, panel) {
+ return {
+ tab: tab,
+ panel: panel,
+ index: this.anchors.index(tab)
+ };
+ },
+
+ _cleanup: function() {
+ // restore all former loading tabs labels
+ this.lis.filter('.ui-state-processing').removeClass('ui-state-processing')
+ .find('span:data(label.tabs)')
+ .each(function() {
+ var el = $(this);
+ el.html(el.data('label.tabs')).removeData('label.tabs');
+ });
+ },
+
+ _tabify: function(init) {
+
+ this.list = this.element.children('ul:first');
+ this.lis = $('li:has(a[href])', this.list);
+ this.anchors = this.lis.map(function() { return $('a', this)[0]; });
+ this.panels = $([]);
+
+ var self = this, o = this.options;
+
+ var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
+ this.anchors.each(function(i, a) {
+ var href = $(a).attr('href');
+
+ // For dynamically created HTML that contains a hash as href IE < 8 expands
+ // such href to the full page url with hash and then misinterprets tab as ajax.
+ // Same consideration applies for an added tab with a fragment identifier
+ // since a[href=#fragment-identifier] does unexpectedly not match.
+ // Thus normalize href attribute...
+ var hrefBase = href.split('#')[0], baseEl;
+ if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
+ (baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
+ href = a.hash;
+ a.href = href;
+ }
+
+ // inline tab
+ if (fragmentId.test(href)) {
+ self.panels = self.panels.add(self._sanitizeSelector(href));
+ }
+
+ // remote tab
+ else if (href != '#') { // prevent loading the page itself if href is just "#"
+ $.data(a, 'href.tabs', href); // required for restore on destroy
+
+ // TODO until #3808 is fixed strip fragment identifier from url
+ // (IE fails to load from such url)
+ $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
+
+ var id = self._tabId(a);
+ a.href = '#' + id;
+ var $panel = $('#' + id);
+ if (!$panel.length) {
+ $panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
+ .insertAfter(self.panels[i - 1] || self.list);
+ $panel.data('destroy.tabs', true);
+ }
+ self.panels = self.panels.add($panel);
+ }
+
+ // invalid tab href
+ else {
+ o.disabled.push(i);
+ }
+ });
+
+ // initialization from scratch
+ if (init) {
+
+ // attach necessary classes for styling
+ this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
+ this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+ this.lis.addClass('ui-state-default ui-corner-top');
+ this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
+
+ // Selected tab
+ // use "selected" option or try to retrieve:
+ // 1. from fragment identifier in url
+ // 2. from cookie
+ // 3. from selected class attribute on <li>
+ if (o.selected === undefined) {
+ if (location.hash) {
+ this.anchors.each(function(i, a) {
+ if (a.hash == location.hash) {
+ o.selected = i;
+ return false; // break
+ }
+ });
+ }
+ if (typeof o.selected != 'number' && o.cookie) {
+ o.selected = parseInt(self._cookie(), 10);
+ }
+ if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+ o.selected = o.selected || 0;
+ }
+ else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
+ o.selected = -1;
+ }
+
+ // sanity check - default to first tab...
+ o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;
+
+ // Take disabling tabs via class attribute from HTML
+ // into account and update option properly.
+ // A selected tab cannot become disabled.
+ o.disabled = $.unique(o.disabled.concat(
+ $.map(this.lis.filter('.ui-state-disabled'),
+ function(n, i) { return self.lis.index(n); } )
+ )).sort();
+
+ if ($.inArray(o.selected, o.disabled) != -1) {
+ o.disabled.splice($.inArray(o.selected, o.disabled), 1);
+ }
+
+ // highlight selected tab
+ this.panels.addClass('ui-tabs-hide');
+ this.lis.removeClass('ui-tabs-selected ui-state-active');
+ if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
+ this.panels.eq(o.selected).removeClass('ui-tabs-hide');
+ this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');
+
+ // seems to be expected behavior that the show callback is fired
+ self.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
+ });
+
+ this.load(o.selected);
+ }
+
+ // clean up to avoid memory leaks in certain versions of IE 6
+ $(window).bind('unload', function() {
+ self.lis.add(self.anchors).unbind('.tabs');
+ self.lis = self.anchors = self.panels = null;
+ });
+
+ }
+ // update selected after add/remove
+ else {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+
+ // update collapsible
+ this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');
+
+ // set or update cookie after init and add/remove respectively
+ if (o.cookie) {
+ this._cookie(o.selected, o.cookie);
+ }
+
+ // disable tabs
+ for (var i = 0, li; (li = this.lis[i]); i++) {
+ $(li)[$.inArray(i, o.disabled) != -1 &&
+ !$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
+ }
+
+ // reset cache if switching from cached to not cached
+ if (o.cache === false) {
+ this.anchors.removeData('cache.tabs');
+ }
+
+ // remove all handlers before, tabify may run on existing tabs after add or option change
+ this.lis.add(this.anchors).unbind('.tabs');
+
+ if (o.event != 'mouseover') {
+ var addState = function(state, el) {
+ if (el.is(':not(.ui-state-disabled)')) {
+ el.addClass('ui-state-' + state);
+ }
+ };
+ var removeState = function(state, el) {
+ el.removeClass('ui-state-' + state);
+ };
+ this.lis.bind('mouseover.tabs', function() {
+ addState('hover', $(this));
+ });
+ this.lis.bind('mouseout.tabs', function() {
+ removeState('hover', $(this));
+ });
+ this.anchors.bind('focus.tabs', function() {
+ addState('focus', $(this).closest('li'));
+ });
+ this.anchors.bind('blur.tabs', function() {
+ removeState('focus', $(this).closest('li'));
+ });
+ }
+
+ // set up animations
+ var hideFx, showFx;
+ if (o.fx) {
+ if ($.isArray(o.fx)) {
+ hideFx = o.fx[0];
+ showFx = o.fx[1];
+ }
+ else {
+ hideFx = showFx = o.fx;
+ }
+ }
+
+ // Reset certain styles left over from animation
+ // and prevent IE's ClearType bug...
+ function resetStyle($el, fx) {
+ $el.css({ display: '' });
+ if ($.browser.msie && fx.opacity) {
+ $el[0].style.removeAttribute('filter');
+ }
+ }
+
+ // Show a tab...
+ var showTab = showFx ?
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
+ .animate(showFx, showFx.duration || 'normal', function() {
+ resetStyle($show, showFx);
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ });
+ } :
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.removeClass('ui-tabs-hide');
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ };
+
+ // Hide a tab, $show is optional...
+ var hideTab = hideFx ?
+ function(clicked, $hide) {
+ $hide.animate(hideFx, hideFx.duration || 'normal', function() {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ resetStyle($hide, hideFx);
+ self.element.dequeue("tabs");
+ });
+ } :
+ function(clicked, $hide, $show) {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ self.element.dequeue("tabs");
+ };
+
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
+ this.anchors.bind(o.event + '.tabs', function() {
+ var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
+ $show = $(self._sanitizeSelector(this.hash));
+
+ // If tab is already selected and not collapsible or tab disabled or
+ // or is already loading or click callback returns false stop here.
+ // Check if click handler returns false last so that it is not executed
+ // for a disabled or loading tab!
+ if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
+ $li.hasClass('ui-state-disabled') ||
+ $li.hasClass('ui-state-processing') ||
+ self._trigger('select', null, self._ui(this, $show[0])) === false) {
+ this.blur();
+ return false;
+ }
+
+ o.selected = self.anchors.index(this);
+
+ self.abort();
+
+ // if tab may be closed
+ if (o.collapsible) {
+ if ($li.hasClass('ui-tabs-selected')) {
+ o.selected = -1;
+
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ }).dequeue("tabs");
+
+ this.blur();
+ return false;
+ }
+ else if (!$hide.length) {
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
+ });
+
+ self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
+
+ this.blur();
+ return false;
+ }
+ }
+
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ // show new tab
+ if ($show.length) {
+ if ($hide.length) {
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ });
+ }
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
+ });
+
+ self.load(self.anchors.index(this));
+ }
+ else {
+ throw 'jQuery UI Tabs: Mismatching fragment identifier.';
+ }
+
+ // Prevent IE from keeping other link focussed when using the back button
+ // and remove dotted border from clicked link. This is controlled via CSS
+ // in modern browsers; blur() removes focus from address bar in Firefox
+ // which can become a usability and annoying problem with tabs('rotate').
+ if ($.browser.msie) {
+ this.blur();
+ }
+
+ });
+
+ // disable click in any case
+ this.anchors.bind('click.tabs', function(){return false;});
+
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.abort();
+
+ this.element.unbind('.tabs')
+ .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible')
+ .removeData('tabs');
+
+ this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+
+ this.anchors.each(function() {
+ var href = $.data(this, 'href.tabs');
+ if (href) {
+ this.href = href;
+ }
+ var $this = $(this).unbind('.tabs');
+ $.each(['href', 'load', 'cache'], function(i, prefix) {
+ $this.removeData(prefix + '.tabs');
+ });
+ });
+
+ this.lis.unbind('.tabs').add(this.panels).each(function() {
+ if ($.data(this, 'destroy.tabs')) {
+ $(this).remove();
+ }
+ else {
+ $(this).removeClass([
+ 'ui-state-default',
+ 'ui-corner-top',
+ 'ui-tabs-selected',
+ 'ui-state-active',
+ 'ui-state-hover',
+ 'ui-state-focus',
+ 'ui-state-disabled',
+ 'ui-tabs-panel',
+ 'ui-widget-content',
+ 'ui-corner-bottom',
+ 'ui-tabs-hide'
+ ].join(' '));
+ }
+ });
+
+ if (o.cookie) {
+ this._cookie(null, o.cookie);
+ }
+ },
+
+ add: function(url, label, index) {
+ if (index === undefined) {
+ index = this.anchors.length; // append by default
+ }
+
+ var self = this, o = this.options,
+ $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)),
+ id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]);
+
+ $li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true);
+
+ // try to find an existing element before creating a new one
+ var $panel = $('#' + id);
+ if (!$panel.length) {
+ $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
+ }
+ $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
+
+ if (index >= this.lis.length) {
+ $li.appendTo(this.list);
+ $panel.appendTo(this.list[0].parentNode);
+ }
+ else {
+ $li.insertBefore(this.lis[index]);
+ $panel.insertBefore(this.panels[index]);
+ }
+
+ o.disabled = $.map(o.disabled,
+ function(n, i) { return n >= index ? ++n : n; });
+
+ this._tabify();
+
+ if (this.anchors.length == 1) { // after tabify
+ $li.addClass('ui-tabs-selected ui-state-active');
+ $panel.removeClass('ui-tabs-hide');
+ this.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[0], self.panels[0]));
+ });
+
+ this.load(0);
+ }
+
+ // callback
+ this._trigger('add', null, this._ui(this.anchors[index], this.panels[index]));
+ },
+
+ remove: function(index) {
+ var o = this.options, $li = this.lis.eq(index).remove(),
+ $panel = this.panels.eq(index).remove();
+
+ // If selected tab was removed focus tab to the right or
+ // in case the last tab was removed the tab to the left.
+ if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) {
+ this.select(index + (index + 1 < this.anchors.length ? 1 : -1));
+ }
+
+ o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
+ function(n, i) { return n >= index ? --n : n; });
+
+ this._tabify();
+
+ // callback
+ this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0]));
+ },
+
+ enable: function(index) {
+ var o = this.options;
+ if ($.inArray(index, o.disabled) == -1) {
+ return;
+ }
+
+ this.lis.eq(index).removeClass('ui-state-disabled');
+ o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
+
+ // callback
+ this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index]));
+ },
+
+ disable: function(index) {
+ var self = this, o = this.options;
+ if (index != o.selected) { // cannot disable already selected tab
+ this.lis.eq(index).addClass('ui-state-disabled');
+
+ o.disabled.push(index);
+ o.disabled.sort();
+
+ // callback
+ this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index]));
+ }
+ },
+
+ select: function(index) {
+ if (typeof index == 'string') {
+ index = this.anchors.index(this.anchors.filter('[href$=' + index + ']'));
+ }
+ else if (index === null) { // usage of null is deprecated, TODO remove in next release
+ index = -1;
+ }
+ if (index == -1 && this.options.collapsible) {
+ index = this.options.selected;
+ }
+
+ this.anchors.eq(index).trigger(this.options.event + '.tabs');
+ },
+
+ load: function(index) {
+ var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs');
+
+ this.abort();
+
+ // not remote or from cache
+ if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) {
+ this.element.dequeue("tabs");
+ return;
+ }
+
+ // load remote from here on
+ this.lis.eq(index).addClass('ui-state-processing');
+
+ if (o.spinner) {
+ var span = $('span', a);
+ span.data('label.tabs', span.html()).html(o.spinner);
+ }
+
+ this.xhr = $.ajax($.extend({}, o.ajaxOptions, {
+ url: url,
+ success: function(r, s) {
+ $(self._sanitizeSelector(a.hash)).html(r);
+
+ // take care of tab labels
+ self._cleanup();
+
+ if (o.cache) {
+ $.data(a, 'cache.tabs', true); // if loaded once do not load them again
+ }
+
+ // callbacks
+ self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ try {
+ o.ajaxOptions.success(r, s);
+ }
+ catch (e) {}
+
+ // last, so that load event is fired before show...
+ self.element.dequeue("tabs");
+ }
+ }));
+ },
+
+ abort: function() {
+ // stop possibly running animations
+ this.element.queue([]);
+ this.panels.stop(false, true);
+
+ // terminate pending requests from other tabs
+ if (this.xhr) {
+ this.xhr.abort();
+ delete this.xhr;
+ }
+
+ // take care of tab labels
+ this._cleanup();
+
+ },
+
+ url: function(index, url) {
+ this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url);
+ },
+
+ length: function() {
+ return this.anchors.length;
+ }
+
+});
+
+$.extend($.ui.tabs, {
+ version: '1.7.2',
+ getter: 'length',
+ defaults: {
+ ajaxOptions: null,
+ cache: false,
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+ collapsible: false,
+ disabled: [],
+ event: 'click',
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
+ idPrefix: 'ui-tabs-',
+ panelTemplate: '<div></div>',
+ spinner: '<em>Loading&#8230;</em>',
+ tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
+ }
+});
+
+/*
+ * Tabs Extensions
+ */
+
+/*
+ * Rotate
+ */
+$.extend($.ui.tabs.prototype, {
+ rotation: null,
+ rotate: function(ms, continuing) {
+
+ var self = this, o = this.options;
+
+ var rotate = self._rotate || (self._rotate = function(e) {
+ clearTimeout(self.rotation);
+ self.rotation = setTimeout(function() {
+ var t = o.selected;
+ self.select( ++t < self.anchors.length ? t : 0 );
+ }, ms);
+
+ if (e) {
+ e.stopPropagation();
+ }
+ });
+
+ var stop = self._unrotate || (self._unrotate = !continuing ?
+ function(e) {
+ if (e.clientX) { // in case of a true click
+ self.rotate(null);
+ }
+ } :
+ function(e) {
+ t = o.selected;
+ rotate();
+ });
+
+ // start rotation
+ if (ms) {
+ this.element.bind('tabsshow', rotate);
+ this.anchors.bind(o.event + '.tabs', stop);
+ rotate();
+ }
+ // stop rotation
+ else {
+ clearTimeout(self.rotation);
+ this.element.unbind('tabsshow', rotate);
+ this.anchors.unbind(o.event + '.tabs', stop);
+ delete this._rotate;
+ delete this._unrotate;
+ }
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/layout.css b/themes/default/layout.css
new file mode 100644
index 000000000..d12ecbacc
--- /dev/null
+++ b/themes/default/layout.css
@@ -0,0 +1,16 @@
+
+/* template css */
+@import "menubar.css";
+@import "content.css";
+@import "thumbnails.css";
+@import "picture.css";
+@import "default-layout.css";
+/* Override properties with import local file */
+@import "local-layout.css";
+/* common css */
+@import "../../template-common/default-layout.css";
+/* Override properties with import local file */
+@import "../../template-common/local-layout.css";
+
+@import "default-colors.css";
+
diff --git a/themes/default/local_head.tpl b/themes/default/local_head.tpl
new file mode 100644
index 000000000..908a880ae
--- /dev/null
+++ b/themes/default/local_head.tpl
@@ -0,0 +1,12 @@
+{* the next css is used to fix khtml (Konqueror/Safari) issue the "text/nonsense" prevents gecko based browsers to load it *}
+<link rel="stylesheet" type="text/nonsense" href="{$ROOT_URL}themes/default/fix-khtml.css">
+<!--[if lt IE 7]>
+ <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css">
+<![endif]-->
+<!--[if gt IE 6]>
+ <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie7.css">
+<![endif]-->
+<!--[if !IE]> <-->
+ <link rel="stylesheet" href="{$ROOT_URL}themes/default/not-ie.css" type="text/css">
+<!--> <![endif]-->
+<link rel="stylesheet" type="text/css" media="print" href="{$ROOT_URL}themes/default/print.css">
diff --git a/themes/default/mail/index.php b/themes/default/mail/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/mail/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/mail/text/html/images/footer-bg.jpg b/themes/default/mail/text/html/images/footer-bg.jpg
new file mode 100644
index 000000000..3d8a5eed2
--- /dev/null
+++ b/themes/default/mail/text/html/images/footer-bg.jpg
Binary files differ
diff --git a/themes/default/mail/text/html/images/footer-bg.png b/themes/default/mail/text/html/images/footer-bg.png
new file mode 100644
index 000000000..fd3c2925f
--- /dev/null
+++ b/themes/default/mail/text/html/images/footer-bg.png
Binary files differ
diff --git a/themes/default/mail/text/html/images/header-bg.png b/themes/default/mail/text/html/images/header-bg.png
new file mode 100644
index 000000000..1770a3ddc
--- /dev/null
+++ b/themes/default/mail/text/html/images/header-bg.png
Binary files differ
diff --git a/themes/default/mail/text/html/images/index.php b/themes/default/mail/text/html/images/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/mail/text/html/images/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/mail/text/html/images/mailbody-bg.png b/themes/default/mail/text/html/images/mailbody-bg.png
new file mode 100644
index 000000000..722a24f63
--- /dev/null
+++ b/themes/default/mail/text/html/images/mailbody-bg.png
Binary files differ
diff --git a/themes/default/mail/text/html/index.php b/themes/default/mail/text/html/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/mail/text/html/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/mail/text/index.php b/themes/default/mail/text/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/mail/text/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/mail/text/plain/index.php b/themes/default/mail/text/plain/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/mail/text/plain/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/menubar.css b/themes/default/menubar.css
new file mode 100644
index 000000000..27eb1ac38
--- /dev/null
+++ b/themes/default/menubar.css
@@ -0,0 +1,87 @@
+#menubar {
+ float: left;
+ margin: 0 0 10px 1em;
+ padding: 0;
+ display: inline;
+}
+
+#menubar DL, #menubar DT, #menubar DD {
+ margin: 0; padding: 0; display: block;
+}
+
+#menubar .button {
+ margin: -2px 2px 2px;
+ width: auto;
+ padding: 0;
+ text-indent: 0;
+ list-style: none;
+ text-align: center;
+ float: right;
+}
+
+/* H2 properties copied here */
+#menubar DT {
+ font-weight: bold;
+ padding: 5px 5px 5px 5px;
+ font-size: 120%;
+ text-align: center;
+}
+
+#menubar UL,
+#menubar FORM,
+#menubar P {
+ font-size: 92%;
+ margin: 10px 0 10px 5px;
+}
+#menubar UL {
+ list-style-type: square;
+ list-style-position: inside;
+ padding: 0 0 0 2px;
+}
+#menubar UL UL {
+ font-size: 100%;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+#menubar LI.selected A {
+ font-weight: bold;
+}
+
+#menubar LI.selected LI A {
+ font-weight: normal;
+}
+
+#menubar .menuInfoCatByChild {
+ font-size: 80%;
+ font-style: italic;
+}
+
+#menubar INPUT {
+ text-indent: 2px;
+}
+
+/* quickconnect form */
+FORM#quickconnect {
+ margin: 5px;
+ padding: 0;
+}
+
+FORM#quickconnect FIELDSET {
+ margin: 0;
+ padding: 0; /*IE6 requires padding 0*/
+}
+
+FORM#quickconnect FIELDSET DIV {
+ margin: 8px 5px;
+ padding: 0;
+}
+
+#menubar #menuTagCloud {
+ text-align: center;
+ margin: 5px 0;
+}
+
+#menubar #menuTagCloud SPAN {
+ white-space: nowrap;
+}
diff --git a/themes/default/not-ie.css b/themes/default/not-ie.css
new file mode 100644
index 000000000..c5bd7adef
--- /dev/null
+++ b/themes/default/not-ie.css
@@ -0,0 +1,8 @@
+
+/* All directives not supported by IE */
+/* can be overiden in any theme but not hidden to IE */
+
+.content UL.thumbnails SPAN.wrap2 {
+ -moz-border-radius: 4px; /* round corners with Geko */
+ -webkit-border-radius: 4px; /* Safari webkit project */
+}
diff --git a/themes/default/picture.css b/themes/default/picture.css
new file mode 100644
index 000000000..ef2f23213
--- /dev/null
+++ b/themes/default/picture.css
@@ -0,0 +1,102 @@
+#imageHeaderBar {
+ padding-top: 2px;
+ padding-bottom: 2px;
+ margin-top: 4px;
+ overflow: hidden;
+ width: 100%;
+}
+
+#imageHeaderBar .browsePath {
+ float: left;
+ margin-left: 10px;
+}
+
+#imageHeaderBar .imageNumber {
+ float: right;
+ margin-right: 10px;
+}
+
+#imageHeaderBar H2 {
+ text-align: center;
+ padding: 0;
+ clear: both;
+}
+
+#imageToolBar {
+ text-align: center;
+ position: relative;
+ clear: both;
+ margin-bottom: 4px;
+ padding: 0;
+ height: 28px;
+}
+
+#imageToolBar A, #imageToolBar IMG {
+ display: block;
+ border: none;
+ margin: 0; padding: 0;
+}
+#imageToolBar A { width: 48px; }
+#imageToolBar IMG { margin: 2px auto; }
+#imageToolBar .randomButtons A { float: left; }
+#imageToolBar .navButtons A { float: right; }
+
+#theImage {
+ clear: left;
+ text-align: center;
+}
+
+#theImage>IMG {
+ display: block;
+ margin: 0 auto;
+ border: none;
+}
+
+#linkPrev {
+ float: left;
+ margin-right: 10px;
+ margin-left: 5px;
+}
+
+#linkNext {
+ float: right;
+ margin-right: 5px;
+ margin-left: 10px;
+}
+
+TABLE.infoTable .label {
+ font-weight: bold;
+ text-align: right;
+ padding-right: 0.5em;
+}
+
+TABLE.infoTable TD.value UL {
+ margin: 0;
+ padding: 0 0 0 1.5em;
+ list-style-type: square;
+}
+
+.thumbnailCategories LI { list-style: none; }
+
+.rateButton, .rateButtonSelected, .rateButtonStarFull, .rateButtonStarEmpty {
+ padding:0;
+ border:0;
+}
+
+.rateButton, .rateButtonStarFull, .rateButtonStarEmpty {
+ cursor: pointer;
+}
+
+.rateButtonSelected {
+ font-weight:bold;
+ font-size:120%;
+}
+
+.rateButtonStarFull {
+ background: url('icon/rating-stars.gif') no-repeat scroll; background-position:-16px center; width:16px;
+}
+
+.rateButtonStarEmpty {
+ background: url('icon/rating-stars.gif') no-repeat scroll; background-position:0 center; width:16px;
+}
+
diff --git a/themes/default/print.css b/themes/default/print.css
new file mode 100644
index 000000000..8252f7e44
--- /dev/null
+++ b/themes/default/print.css
@@ -0,0 +1,14 @@
+#menubar, .content .navigationBar, UL.categoryActions, .content DIV.calendarViews, .calendarBar,
+#imageToolBar, .navThumb, #addComment {
+ display: none;
+}
+
+BODY {
+ margin: 0;
+ color: #000000;
+ background: #ffffff;
+}
+
+.content {
+ margin: 0;
+}
diff --git a/themes/default/template/about.tpl b/themes/default/template/about.tpl
new file mode 100644
index 000000000..370e3ccc3
--- /dev/null
+++ b/themes/default/template/about.tpl
@@ -0,0 +1,18 @@
+<div id="content" class="content">
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li>
+ <a href="{$U_HOME}" title="{'return to homepage'|@translate}">
+ <img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}">
+ </a>
+ </li>
+ </ul>
+ <h2>{'About'|@translate}</h2>
+ </div>
+ <ul>
+ {$ABOUT_MESSAGE}
+ {if isset($THEME_ABOUT) }
+ <li>{$THEME_ABOUT}</li>
+ {/if}
+ </ul>
+</div>
diff --git a/themes/default/template/comment_list.tpl b/themes/default/template/comment_list.tpl
new file mode 100644
index 000000000..f431a1cd5
--- /dev/null
+++ b/themes/default/template/comment_list.tpl
@@ -0,0 +1,58 @@
+{* $Id$ *}
+<ul class="thumbnailCategories">
+{foreach from=$comments item=comment name=comment_loop}
+<li>
+ <div class="thumbnailCategory {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}">
+ {if isset($comment.TN_SRC)}
+ <div class="illustration">
+ <a href="{$comment.U_PICTURE}">
+ <img src="{$comment.TN_SRC}" alt="{$comment.ALT}">
+ </a>
+ </div>
+ {/if}
+ <div class="description" style="height:{if isset($comment.IN_EDIT)}200{/if}px">
+ {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT) }
+ <ul class="actions" style="float:right">
+ {if isset($comment.U_DELETE)}
+ <li>
+ <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" alt="[delete]">
+ </a>
+ </li>
+ {/if}
+ {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)}
+ <li>
+ <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/edit.png" class="button" alt="[edit]">
+ </a>
+ </li>
+ {/if}
+ {if isset($comment.U_VALIDATE)}
+ <li>
+ <a href="{$comment.U_VALIDATE}" title="{'validate this comment'|@translate}">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" class="button" alt="[validate]">
+ </a>
+ </li>
+ {/if}
+ </ul>
+ {/if}
+ <span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span>
+ {if isset($comment.IN_EDIT)}
+ <a name="edit_comment"></a>
+ <form method="post" action="{$comment.U_EDIT}" class="filter" id="editComment">
+ <fieldset>
+ <legend>{'Edit a comment'|@translate}</legend>
+ <label>{'Comment'|@translate}<textarea name="content" id="contenteditid" rows="5" cols="80">{$Comment.CONTENT|@escape}</textarea></label>
+ <input type="hidden" name="key" value="{$comment.KEY}">
+ <input type="hidden" name="image_id" value="{$comment.IMAGE_ID|@default:$current.id}">
+ <input class="submit" type="submit" value="{'Submit'|@translate}">
+ </fieldset>
+ </form>
+ {else}
+ <blockquote>{$comment.CONTENT}</blockquote>
+ {/if}
+ </div>
+ </div>
+</li>
+{/foreach}
+</ul>
diff --git a/themes/default/template/comments.tpl b/themes/default/template/comments.tpl
new file mode 100644
index 000000000..68941e03d
--- /dev/null
+++ b/themes/default/template/comments.tpl
@@ -0,0 +1,76 @@
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'User comments'|@translate}</h2>
+ </div>
+
+<form class="filter" action="{$F_ACTION}" method="get">
+
+ <fieldset>
+ <legend>{'Filter'|@translate}</legend>
+
+ <label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}"></label>
+
+ <label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}"></label>
+
+ <label>
+ {'Category'|@translate}
+ <select name="cat">
+ <option value="0">------------</option>
+ {html_options options=$categories selected=$categories_selected}
+ </select>
+ </label>
+
+ <label>
+ {'Since'|@translate}
+ <select name="since">
+ {html_options options=$since_options selected=$since_options_selected}
+ </select>
+ </label>
+
+ </fieldset>
+
+ <fieldset>
+
+ <legend>{'Display'|@translate}</legend>
+
+ <label>
+ {'Sort by'|@translate}
+ <select name="sort_by">
+ {html_options options=$sort_by_options selected=$sort_by_options_selected}
+ </select>
+ </label>
+
+ <label>
+ {'Sort order'|@translate}
+ <select name="sort_order">
+ {html_options options=$sort_order_options selected=$sort_order_options_selected}
+ </select>
+ </label>
+
+ <label>
+ {'Number of items'|@translate}
+ <select name="items_number">
+ {html_options options=$item_number_options selected=$item_number_options_selected}
+ </select>
+ </label>
+
+ </fieldset>
+
+ <p><input class="submit" type="submit" value="{'Filter and display'|@translate}"></p>
+
+</form>
+
+{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+{if isset($comments)}
+<div id="comments">
+ {include file='comment_list.tpl'}
+</div>
+{/if}
+
+</div> <!-- content -->
+
diff --git a/themes/default/template/footer.tpl b/themes/default/template/footer.tpl
new file mode 100644
index 000000000..89c034965
--- /dev/null
+++ b/themes/default/template/footer.tpl
@@ -0,0 +1,35 @@
+<div id="copyright">
+ <a name="EoP"></a> <!-- End of Page -->
+ {if isset($debug.TIME) }
+ {'SQL queries in'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|@translate} {$debug.SQL_TIME}) -
+ {/if}
+
+ {* Please, do not remove this copyright. If you really want to,
+ contact us on http://piwigo.org to find a solution on how
+ to show the origin of the script...
+ *}
+
+ {'Powered by'|@translate}
+ <a href="{$PHPWG_URL}" class="Piwigo">
+ <span class="Piwigo">Piwigo</span></a>
+ {$VERSION}
+ {if isset($CONTACT_MAIL)}
+ - {'Contact'|@translate}
+ <a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
+ {/if}
+
+
+{if isset($footer_elements)}
+{foreach from=$footer_elements item=v}
+{$v}
+{/foreach}
+{/if}
+</div> <!-- the_page -->
+{if isset($debug.QUERIES_LIST)}
+<div id="debug">
+{$debug.QUERIES_LIST}
+</div>
+{/if}
+</div> <!-- copyright -->
+</body>
+</html> \ No newline at end of file
diff --git a/themes/default/template/header.tpl b/themes/default/template/header.tpl
new file mode 100644
index 000000000..07c020405
--- /dev/null
+++ b/themes/default/template/header.tpl
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
+<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
+{if isset($meta_ref) }
+{if isset($INFO_AUTHOR)}
+<meta name="author" content="{$INFO_AUTHOR|@replace:'"':' '}">
+{/if}
+{if isset($related_tags)}
+<meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
+{/if}
+{if isset($COMMENT_IMG)}
+<meta name="description" content="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
+{else}
+<meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
+{/if}
+{/if}
+
+{if (isset($REVERSE) and $REVERSE and $PAGE_TITLE == l10n('home'))}
+<title>{$GALLERY_TITLE} | {$PAGE_TITLE}</title>{else}
+<title>{$PAGE_TITLE} | {$GALLERY_TITLE}</title>{/if}
+<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
+
+<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
+<link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" >
+{if isset($first.U_IMG) }<link rel="first" title="{'First'|@translate}" href="{$first.U_IMG}" >{/if}
+{if isset($previous.U_IMG)}<link rel="prev" title="{'Previous'|@translate}" href="{$previous.U_IMG}" >{/if}
+{if isset($next.U_IMG) }<link rel="next" title="{'Next'|@translate}" href="{$next.U_IMG}" >{/if}
+{if isset($last.U_IMG) }<link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >{/if}
+{if isset($U_UP) }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if}
+
+{foreach from=$themes item=theme}
+{if isset($theme.local_head)}{include file=$theme.local_head}{/if}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/{$theme.name}/theme.css">
+{/foreach}
+
+{if isset($U_PREFETCH) }<link rel="prefetch" href="{$U_PREFETCH}">{/if}
+
+{if not empty($page_refresh) }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}
+
+<script type="text/javascript" src="{$ROOT_URL}{$themeconf.js_dir}/scripts.js"></script>
+<!--[if lt IE 7]>
+<script type="text/javascript" src="{$ROOT_URL}{$themeconf.js_dir}/pngfix.js"></script>
+<![endif]-->
+
+{if not empty($head_elements)}
+ {foreach from=$head_elements item=elt}{$elt}
+ {/foreach}
+{/if}
+
+</head>
+
+<body id="{$BODY_ID}">
+<div id="the_page">
+
+{if not empty($header_msgs)}
+<div class="header_msgs">
+ {foreach from=$header_msgs item=elt}
+ {$elt}<br>
+ {/foreach}
+</div>
+{/if}
+
+<div id="theHeader">{$PAGE_BANNER}</div>
+{if isset($theSwiftHeader)}{$theSwiftHeader}{/if}
+{if not empty($header_notes)}
+<div class="header_notes">
+ {foreach from=$header_notes item=elt}
+ <p>{$elt}</p>
+ {/foreach}
+</div>
+{/if}
diff --git a/themes/default/template/identification.tpl b/themes/default/template/identification.tpl
new file mode 100644
index 000000000..b63415e7b
--- /dev/null
+++ b/themes/default/template/identification.tpl
@@ -0,0 +1,71 @@
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
+ {if isset($U_REGISTER) }
+ <li><a href="{$U_REGISTER}" title="{'Register'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"></a></li>
+ {/if}
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Identification'|@translate}</h2>
+ </div>
+
+ {if isset($errors) }
+ <div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+<form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
+ <fieldset>
+ <legend>{'Connection settings'|@translate}</legend>
+
+ <input type="hidden" name="redirect" value="{$U_REDIRECT}">
+
+ <ul>
+ <li>
+ <span class="property">
+ <label for="username">{'Username'|@translate}</label>
+ </span>
+ <input tabindex="1" class="login" type="text" name="username" id="username" size="25" maxlength="40">
+ </li>
+
+ <li>
+ <span class="property">
+ <label for="password">{'Password'|@translate}</label>
+ </span>
+ <input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25">
+ </li>
+
+ {if $authorize_remembering }
+ <li>
+ <span class="property">
+ <label for="Auto login">{'Auto login'|@translate}</label>
+ </span>
+ <input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1">
+ </li>
+ {/if}
+ </ul>
+ </fieldset>
+
+ <p><input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}"></p>
+
+ <p>
+ {if isset($U_REGISTER) }
+ <a href="{$U_REGISTER}" title="{'Register'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"> {'Register'|@translate}</a>
+ {/if}
+ <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"> {'Forgot your password?'|@translate}</a>
+ </p>
+
+</form>
+
+<script type="text/javascript"><!--
+document.login_form.username.focus();
+//--></script>
+
+</div> <!-- content -->
diff --git a/themes/default/template/include/autosize.inc.tpl b/themes/default/template/include/autosize.inc.tpl
new file mode 100644
index 000000000..8f5c78c70
--- /dev/null
+++ b/themes/default/template/include/autosize.inc.tpl
@@ -0,0 +1,13 @@
+{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
+{known_script id="jquery.autogrow" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.autogrow-textarea.js"}
+
+{* Auto size and auto grow textarea *}
+{literal}
+<script type="text/javascript">
+ jQuery().ready(function(){
+ jQuery('textarea').css('overflow-y', 'hidden');
+ // Auto size and auto grow for all text area
+ jQuery('textarea').autogrow();
+ });
+</script>
+{/literal}
diff --git a/themes/default/template/include/datepicker.inc.tpl b/themes/default/template/include/datepicker.inc.tpl
new file mode 100644
index 000000000..92cb8cbcd
--- /dev/null
+++ b/themes/default/template/include/datepicker.inc.tpl
@@ -0,0 +1,24 @@
+
+{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
+{known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.datepicker.packed.js"}
+{known_script id="datepicker.js" src=$ROOT_URL|@cat:"themes/default/js/datepicker.js"}
+
+{assign var="datepicker_language" value="themes/default/js/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"}
+
+{if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
+{known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:$datepicker_language}
+{/if}
+
+{html_head}
+<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/themes/ui.datepicker.css">
+{/html_head}
+
+<script type="text/javascript">
+function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date)
+{ldelim}
+ return pwg_common_initialization_datepicker(
+ "{$ROOT_URL}{$themeconf.icon_dir}/datepicker.png",
+ day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date);
+}
+</script>
diff --git a/themes/default/template/include/resize.inc.tpl b/themes/default/template/include/resize.inc.tpl
new file mode 100644
index 000000000..30a637563
--- /dev/null
+++ b/themes/default/template/include/resize.inc.tpl
@@ -0,0 +1,22 @@
+{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
+{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"}
+
+{* Resize possible *}
+{literal}
+<script type="text/javascript">
+ jQuery().ready(function(){
+ // Resize possible for list
+ jQuery(".categoryList").resizable({
+ handles: "all",
+ animate: true,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ preventDefault: true,
+ preserveCursor: true,
+ autoHide: true,
+ ghost: true
+ });
+ });
+</script>
+{/literal}
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
new file mode 100644
index 000000000..6bad8e319
--- /dev/null
+++ b/themes/default/template/index.tpl
@@ -0,0 +1,116 @@
+{$MENUBAR}
+{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
+<div id="content" class="content">
+ <div class="titrePage">
+ <ul class="categoryActions">
+ {if !empty($image_orders) }
+ <li>
+ {'Sort order'|@translate}:
+ <select onchange="document.location = this.options[this.selectedIndex].value;">
+ {foreach from=$image_orders item=image_order }
+ <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}>{$image_order.DISPLAY}</option>
+ {/foreach}
+ </select>
+ </li>
+ {/if}
+
+ {if isset($favorite) }
+ <li><a href="{$favorite.U_FAVORITE}" title="{'delete all images from your favorites'|@translate}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{'delete all images from your favorites'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_CADDIE) }
+ <li><a href="{$U_CADDIE}" title="{'caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_EDIT) }
+ <li><a href="{$U_EDIT}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_SEARCH_RULES) }
+ <li><a href="{$U_SEARCH_RULES}" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
+ {/if}
+
+ {if isset($U_SLIDESHOW) }
+ <li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_MODE_FLAT) }
+ <li><a href="{$U_MODE_FLAT}" title="{'display all elements in all sub-categories'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'display all elements in all sub-categories'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_MODE_NORMAL) }
+ <li><a href="{$U_MODE_NORMAL}" title="{'return to normal view mode'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'return to normal view mode'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_MODE_POSTED) }
+ <li><a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'display a calendar by posted date'|@translate}"></a></li>
+ {/if}
+
+ {if isset($U_MODE_CREATED) }
+ <li><a href="{$U_MODE_CREATED}" title="{'display a calendar by creation date'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'display a calendar by creation date'|@translate}"></a></li>
+ {/if}
+
+ {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
+ </ul>
+
+ <h2>{$TITLE}</h2>
+
+ {if isset($chronology_views) }
+ <div class="calendarViews">{'View'|@translate}:
+ <select onchange="document.location = this.options[this.selectedIndex].value;">
+ {foreach from=$chronology_views item=view}
+ <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option>
+ {/foreach}
+ </select>
+ </div>
+ {/if}
+
+ {if isset($chronology.TITLE) }
+ <h2>{$chronology.TITLE}</h2>
+ {/if}
+
+ </div> <!-- titrePage -->
+
+{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
+
+{if !empty($category_search_results) }
+<div style="font-size:16px;margin:10px 16px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
+ <em><strong>
+ {foreach from=$category_search_results item=res name=res_loop}
+ {if !$smarty.foreach.res_loop.first} &mdash; {/if}
+ {$res}
+ {/foreach}
+ </strong></em>
+</div>
+{/if}
+
+{if !empty($tag_search_results) }
+<div style="font-size:16px;margin:10px 16px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
+ <em><strong>
+ {foreach from=$tag_search_results item=res name=res_loop}
+ {if !$smarty.foreach.res_loop.first} &mdash; {/if}
+ {$res}
+ {/foreach}
+ </strong></em>
+</div>
+{/if}
+
+{if isset($FILE_CHRONOLOGY_VIEW) }
+{include file=$FILE_CHRONOLOGY_VIEW}
+{/if}
+
+{if !empty($CATEGORIES) }{$CATEGORIES}{/if}
+{if !empty($THUMBNAILS) }{$THUMBNAILS}{/if}
+
+{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+{if !empty($CONTENT_DESCRIPTION) }
+<div class="additional_info">
+ {$CONTENT_DESCRIPTION}
+</div>
+{/if}
+
+{if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if}
+</div> <!-- content -->
+
+{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
diff --git a/themes/default/template/mail/index.php b/themes/default/template/mail/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/template/mail/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/template/mail/text/html/cat_group_info.tpl b/themes/default/template/mail/text/html/cat_group_info.tpl
new file mode 100644
index 000000000..a0c703bb0
--- /dev/null
+++ b/themes/default/template/mail/text/html/cat_group_info.tpl
@@ -0,0 +1,8 @@
+<div id="cat_group_info">
+<h2>{'Informations'|@translate}</h2>
+<p>{$IMG_URL}</p>
+<p>{'Hello,'|@translate}</p>
+<p>{'Come to discover the category:'|@translate} <a href="{$LINK}">{$CAT_NAME}</a></p>
+<p>{$CPL_CONTENT}</p>
+<p>{'See you soon.'|@translate}</p>
+</div>
diff --git a/themes/default/template/mail/text/html/footer.tpl b/themes/default/template/mail/text/html/footer.tpl
new file mode 100644
index 000000000..92e69b089
--- /dev/null
+++ b/themes/default/template/mail/text/html/footer.tpl
@@ -0,0 +1,22 @@
+</div> <!-- content -->
+<div id="copyright">
+<hr>
+ {'Sent by'|@translate}
+ <a href="{$GALLERY_URL}">{$GALLERY_TITLE}</a>
+
+ {* Please, do not remove this copyright. If you really want to,
+ contact us on http://piwigo.org to find a solution on how
+ to show the origin of the script...*}
+ - {'powered_by'|@translate}
+ <a href="http://piwigo.org" class="Piwigo">
+ <span class="Piwigo">Piwigo</span></a>
+ {$VERSION}
+
+ - {'send_mail'|@translate}
+ <a href="mailto:{$MAIL}?subject={$TITLE_MAIL}">{'Webmaster'|@translate}</a>
+
+</div> <!-- copyright -->
+</div> <!-- the_page -->
+
+</body>
+</html>
diff --git a/themes/default/template/mail/text/html/global-mail-css.tpl b/themes/default/template/mail/text/html/global-mail-css.tpl
new file mode 100644
index 000000000..5c8e87a54
--- /dev/null
+++ b/themes/default/template/mail/text/html/global-mail-css.tpl
@@ -0,0 +1,11 @@
+/* Global mail css */
+
+body {ldelim} font-family: Univers, Helvetica, Optima; font-size:12px; margin:0px; padding:0px; }
+#the_page {ldelim} margin:0px; padding:0px; text-align:left;}
+#content {ldelim} margin:0px; padding:82px 0px 0px 62px; width:732px;}
+hr {ldelim} width:632px; margin-left:0;}
+#copyright {ldelim} font-size:10px; margin:0px; padding:48px 0px 32px 62px;}
+.PWG {ldelim} font-family:verdana, sans-serif !important; font-size:0.9em; font-weight:normal; letter-spacing:0px;}
+h2 {ldelim} padding:7px 15px; width:617px; font-weight:bold;}
+img {ldelim} margin:16px; border:16px solid #aaa; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {ldelim} padding: 15px; border: 1px solid yellow; -moz-border-radius: 4px; border-radius: 4px 4px; }
diff --git a/themes/default/template/mail/text/html/header.tpl b/themes/default/template/mail/text/html/header.tpl
new file mode 100644
index 000000000..9ab46693c
--- /dev/null
+++ b/themes/default/template/mail/text/html/header.tpl
@@ -0,0 +1,18 @@
+-----={$BOUNDARY_KEY}
+Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
+Content-Transfer-Encoding: 8bit
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
+<head>
+<title>Piwigo Mail</title>
+<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
+<style><!-- /* Mini style for mails */
+{if isset($GLOBAL_MAIL_CSS)}{$GLOBAL_MAIL_CSS}{/if}
+{if isset($MAIL_CSS)}{$MAIL_CSS}{/if}
+{if isset($LOCAL_MAIL_CSS)}{$LOCAL_MAIL_CSS}{/if}
+--></style>
+</head>
+<body>
+<div id="the_page">
+<div id="content" class="content">
diff --git a/themes/default/template/mail/text/html/index.php b/themes/default/template/mail/text/html/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/template/mail/text/html/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/template/mail/text/html/notification_by_mail.tpl b/themes/default/template/mail/text/html/notification_by_mail.tpl
new file mode 100644
index 000000000..5a0115e2f
--- /dev/null
+++ b/themes/default/template/mail/text/html/notification_by_mail.tpl
@@ -0,0 +1,56 @@
+<div id="nbm_message">
+<h2>{'Notification'|@translate}</h2>
+<p>{'nbm_content_hello_1'|@translate}{$USERNAME}{'nbm_content_hello_2'|@translate}</p>
+
+{if isset($subscribe_by_admin)}
+<p>{'nbm_content_subscribe_by_admin'|@translate}</p>
+{/if}
+{if isset($subscribe_by_himself)}
+<p>{'nbm_content_subscribe_by_himself'|@translate}</p>
+{/if}
+{if isset($unsubscribe_by_admin)}
+<p>{'nbm_content_unsubscribe_by_admin'|@translate}</p>
+{/if}
+{if isset($unsubscribe_by_himself)}
+<p>{'nbm_content_unsubscribe_by_himself'|@translate}</p>
+{/if}
+{if isset($content_new_elements_single)}
+<p>{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_single'|@translate}{$content_new_elements_single.DATE_SINGLE}.</p>
+{/if}
+{if isset($content_new_elements_between)}
+<p>{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_between_1'|@translate}{$content_new_elements_between.DATE_BETWEEN_1}{'nbm_content_new_elements_between_2'|@translate}{$content_new_elements_between.DATE_BETWEEN_2}.</p>
+{/if}
+
+{if not empty($global_new_lines)}
+<ul id="nbm_new_line">
+{foreach from=$global_new_lines item=line}
+ <li>{$line}</li>
+{/foreach}
+</ul>
+{/if}
+
+{if not empty($custom_mail_content)}
+<p>{$custom_mail_content}</p>
+{/if}
+
+{if not empty($GOTO_GALLERY_TITLE)}
+<p>{'nbm_content_goto_1'|@translate}<a href="{$GOTO_GALLERY_URL}">{$GOTO_GALLERY_TITLE}</a>{'nbm_content_goto_2'|@translate}</p>
+{/if}
+<p>{'nbm_content_byebye'|@translate}</p>
+<p style="text-align:center">{$SEND_AS_NAME}</p>
+<p>
+<br><hr>
+{'nbm_content_unsubscribe_link'|@translate}{'nbm_content_click_on'|@translate}<a href="{$UNSUBSCRIBE_LINK}">{$UNSUBSCRIBE_LINK}</a><br>
+{'nbm_content_subscribe_link'|@translate}{'nbm_content_click_on'|@translate}<a href="{$SUBSCRIBE_LINK}">{$SUBSCRIBE_LINK}</a><br>
+{'nbm_content_problem_contact'|@translate}<a href="mailto:{$CONTACT_EMAIL}?subject={'nbm_content_pb_contact_object'|@translate}">{$CONTACT_EMAIL}</a><br>
+<hr><br>
+</p>
+{if not empty($recent_posts)}
+</div>
+<div id="nbm_recent_post">
+ {foreach from=$recent_posts item=recent_post }
+ <h2>{$recent_post.TITLE}</h2>
+ {$recent_post.HTML_DATA}
+ {/foreach}
+{/if}
+</div>
diff --git a/themes/default/template/mail/text/index.php b/themes/default/template/mail/text/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/template/mail/text/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/template/mail/text/plain/cat_group_info.tpl b/themes/default/template/mail/text/plain/cat_group_info.tpl
new file mode 100644
index 000000000..59604846e
--- /dev/null
+++ b/themes/default/template/mail/text/plain/cat_group_info.tpl
@@ -0,0 +1,8 @@
+{'Hello,'|@translate}
+
+{'Come to discover the category:'|@translate} {$CAT_NAME}
+{$LINK}
+
+{$CPL_CONTENT}
+
+{'See you soon.'|@translate}
diff --git a/themes/default/template/mail/text/plain/footer.tpl b/themes/default/template/mail/text/plain/footer.tpl
new file mode 100644
index 000000000..c386f0962
--- /dev/null
+++ b/themes/default/template/mail/text/plain/footer.tpl
@@ -0,0 +1,3 @@
+
+------------------------------------------------------------------------------
+{'Sent by'|@translate} {$GALLERY_URL} - {'powered_by'|@translate} Piwigo {$VERSION} - {'send_mail'|@translate} {$MAIL}
diff --git a/themes/default/template/mail/text/plain/header.tpl b/themes/default/template/mail/text/plain/header.tpl
new file mode 100644
index 000000000..6fcc863d2
--- /dev/null
+++ b/themes/default/template/mail/text/plain/header.tpl
@@ -0,0 +1,5 @@
+-----={$BOUNDARY_KEY}
+Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
+Content-Transfer-Encoding: 8bit{literal}
+
+{/literal}{*note that there must be an empty line to separate the mime headers*}
diff --git a/themes/default/template/mail/text/plain/index.php b/themes/default/template/mail/text/plain/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/default/template/mail/text/plain/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/default/template/mail/text/plain/notification_by_mail.tpl b/themes/default/template/mail/text/plain/notification_by_mail.tpl
new file mode 100644
index 000000000..b1928853f
--- /dev/null
+++ b/themes/default/template/mail/text/plain/notification_by_mail.tpl
@@ -0,0 +1,41 @@
+{'nbm_content_hello_1'|@translate}{$USERNAME}{'nbm_content_hello_2'|@translate}
+
+{if isset($subscribe_by_admin)}
+{'nbm_content_subscribe_by_admin'|@translate}
+{/if}
+{if isset($subscribe_by_himself)}
+{'nbm_content_subscribe_by_himself'|@translate}
+{/if}
+{if isset($unsubscribe_by_admin)}
+{'nbm_content_unsubscribe_by_admin'|@translate}
+{/if}
+{if isset($unsubscribe_by_himself)}
+{'nbm_content_unsubscribe_by_himself'|@translate}
+{/if}
+{if isset($content_new_elements_single)}
+{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_single'|@translate}{$content_new_elements_single.DATE_SINGLE}.
+{/if}
+{if isset($content_new_elements_between)}
+{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_between_1'|@translate}{$content_new_elements_between.DATE_BETWEEN_1}{'nbm_content_new_elements_between_2'|@translate}{$content_new_elements_between.DATE_BETWEEN_2}.
+{/if}
+{if not empty($global_new_lines)}
+{foreach from=$global_new_lines item=line}
+ o {$line}
+{/foreach}
+{/if}
+{if not empty($custom_mail_content)}
+{$custom_mail_content}
+{/if}
+{if not empty($GOTO_GALLERY_TITLE)}
+{'nbm_content_goto_1'|@translate}{$GOTO_GALLERY_TITLE} {$GOTO_GALLERY_URL} {'nbm_content_goto_2'|@translate}
+{/if}
+
+{'nbm_content_byebye'|@translate}
+ {$SEND_AS_NAME}
+
+______________________________________________________________________________
+
+{'nbm_content_unsubscribe_link'|@translate}{'nbm_content_click_on'|@translate}{$UNSUBSCRIBE_LINK}
+{'nbm_content_subscribe_link'|@translate}{'nbm_content_click_on'|@translate}{$SUBSCRIBE_LINK}
+{'nbm_content_problem_contact'|@translate}{$CONTACT_EMAIL}
+______________________________________________________________________________
diff --git a/themes/default/template/mainpage_categories.tpl b/themes/default/template/mainpage_categories.tpl
new file mode 100644
index 000000000..0a88d3534
--- /dev/null
+++ b/themes/default/template/mainpage_categories.tpl
@@ -0,0 +1,31 @@
+
+<ul class="thumbnailCategories">
+{foreach from=$category_thumbnails item=cat}
+ <li>
+ <div class="thumbnailCategory">
+ <div class="illustration">
+ <a href="{$cat.URL}">
+ <img src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '} - {'shows images at the root of this category'|@translate}">
+ </a>
+ </div>
+ <div class="description">
+ <h3>
+ <a href="{$cat.URL}">{$cat.NAME}</a>
+ {if !empty($cat.icon_ts)}
+ <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
+ {/if}
+ </h3>
+ <div class="text">
+ {if isset($cat.INFO_DATES) }
+ <p class="dates">{$cat.INFO_DATES}</p>
+ {/if}
+ <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>
+ {if not empty($cat.DESCRIPTION)}
+ <p>{$cat.DESCRIPTION}</p>
+ {/if}
+ </div>
+ </div>
+ </div>
+ </li>
+{/foreach}
+</ul>
diff --git a/themes/default/template/menubar.tpl b/themes/default/template/menubar.tpl
new file mode 100644
index 000000000..8b1e8f4b6
--- /dev/null
+++ b/themes/default/template/menubar.tpl
@@ -0,0 +1,13 @@
+{if !empty($blocks) }
+<div id="menubar">
+ {foreach from=$blocks key=id item=block}
+ <dl id="{$id}">
+ {if not empty($block->template)}
+ {include file=$block->template|@get_extent:$id }
+ {else}
+ {$block->raw_content}
+ {/if}
+ </dl>
+ {/foreach}
+</div>
+{/if} \ No newline at end of file
diff --git a/themes/default/template/menubar_categories.tpl b/themes/default/template/menubar_categories.tpl
new file mode 100644
index 000000000..02a9b6668
--- /dev/null
+++ b/themes/default/template/menubar_categories.tpl
@@ -0,0 +1,39 @@
+<dt>
+ {if isset($U_START_FILTER)}
+ <a href="{$U_START_FILTER}" title="{'display only recently posted images'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_filter.png" class="button" alt="start filter"></a>
+ {/if}
+ {if isset($U_STOP_FILTER)}
+ <a href="{$U_STOP_FILTER}" title="{'return to the display of all images'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_filter.png" class="button" alt="stop filter"></a>
+ {/if}
+ <a href="{$block->data.U_CATEGORIES}">{'Categories'|@translate}</a>
+</dt>
+<dd>
+{assign var='ref_level' value=0}
+{foreach from=$block->data.MENU_CATEGORIES item=cat}
+ {if $cat.LEVEL > $ref_level}
+ <ul>
+ {else}
+ </li>
+ {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
+ {/if}
+ <li {if $cat.SELECTED}class="selected"{/if}>
+ <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
+ {if $cat.count_images > 0}
+ <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
+ {/if}
+ {if !empty($cat.icon_ts)}
+ <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
+ {/if}
+ {assign var='ref_level' value=$cat.LEVEL}
+{/foreach}
+{'</li></ul>'|@str_repeat:$ref_level}
+
+ {if isset($block->data.U_UPLOAD)}
+ <ul>
+ <li>
+ <a href="{$block->data.U_UPLOAD}">{'Upload a picture'|@translate}</a>
+ </li>
+ </ul>
+ {/if}
+ <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $block->data.NB_PICTURE)}</p>
+</dd>
diff --git a/themes/default/template/menubar_identification.tpl b/themes/default/template/menubar_identification.tpl
new file mode 100644
index 000000000..2717e1019
--- /dev/null
+++ b/themes/default/template/menubar_identification.tpl
@@ -0,0 +1,64 @@
+<dt>{'Identification'|@translate}</dt>
+<dd>
+ {if isset($USERNAME)}
+ <p>{'Hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
+ {/if}
+
+ <ul>
+ {if isset($U_REGISTER)}
+ <li><a href="{$U_REGISTER}" title="{'Register'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_LOGIN)}
+ <li><a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_LOGOUT)}
+ <li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_PROFILE)}
+ <li><a href="{$U_PROFILE}" title="{'Customize'|@translate}">{'Customize'|@translate}</a></li>
+ {/if}
+
+ {if isset($U_ADMIN)}
+ <li><a href="{$U_ADMIN}" title="{'Administration'|@translate}">{'Administration'|@translate}</a></li>
+ {/if}
+ </ul>
+
+ {if isset($U_LOGIN)}
+ <form method="post" action="{$U_LOGIN}" id="quickconnect">
+ <fieldset>
+ <legend>{'Quick connect'|@translate}</legend>
+ <div>
+ <label for="username">{'Username'|@translate}</label><br>
+ <input type="text" name="username" id="username" value="" style="width:99%">
+ </div>
+
+ <div><label for="password">{'Password'|@translate}</label>
+ <br>
+ <input type="password" name="password" id="password" style="width:99%">
+ </div>
+
+ {if $AUTHORIZE_REMEMBERING}
+ <div><label for="remember_me">
+ {'Auto login'|@translate}
+ <input type="checkbox" name="remember_me" id="remember_me" value="1">
+ </label></div>
+ {/if}
+
+ <div>
+ <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
+ <ul class="actions">
+ <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
+ {if isset($U_REGISTER)}
+ <li><a href="{$U_REGISTER}" title="{'Register'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"></a></li>
+ {/if}
+ </ul>
+ </div>
+
+ </fieldset>
+ </form>
+ {/if}
+</dd>
+
diff --git a/themes/default/template/menubar_links.tpl b/themes/default/template/menubar_links.tpl
new file mode 100644
index 000000000..a945bd0d6
--- /dev/null
+++ b/themes/default/template/menubar_links.tpl
@@ -0,0 +1,15 @@
+<dt>{'Links'|@translate}</dt>
+<dd>
+ <ul>
+ {foreach from=$block->data item=link}
+ <li>
+ <a href="{$link.URL}" class="external"
+ {if isset($link.new_window) } onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}
+ >
+ {$link.LABEL}
+ </a>
+ </li>
+ {/foreach}
+ </ul>
+</dd>
+
diff --git a/themes/default/template/menubar_menu.tpl b/themes/default/template/menubar_menu.tpl
new file mode 100644
index 000000000..0d6541b97
--- /dev/null
+++ b/themes/default/template/menubar_menu.tpl
@@ -0,0 +1,20 @@
+<dt>{'Menu'|@translate}</dt>
+<dd>
+ {if isset($block->data.qsearch) and $block->data.qsearch==true}
+ <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
+ <p style="margin:0;padding:0"{*this <p> is for html validation only - does not affect positioning*}>
+ <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
+ </p>
+ </form>
+ <script type="text/javascript">var qsearch_prompt="{'qsearch'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
+ {/if}
+
+ <ul>
+ {foreach from=$block->data item=link}
+ {if is_array($link)}
+ <li><a href="{$link.URL}" title="{$link.TITLE}" {if isset($link.REL)}{$link.REL}{/if}>{$link.NAME}</a></li>
+ {/if}
+ {/foreach}
+ </ul>
+</dd>
+
diff --git a/themes/default/template/menubar_specials.tpl b/themes/default/template/menubar_specials.tpl
new file mode 100644
index 000000000..1f00a2dc9
--- /dev/null
+++ b/themes/default/template/menubar_specials.tpl
@@ -0,0 +1,9 @@
+<dt>{'Specials'|@translate}</dt>
+<dd>
+ <ul>
+ {foreach from=$block->data item=link}
+ <li><a href="{$link.URL}" title="{$link.TITLE}" {if isset($link.REL)}{$link.REL}{/if}>{$link.NAME}</a></li>
+ {/foreach}
+ </ul>
+</dd>
+
diff --git a/themes/default/template/menubar_tags.tpl b/themes/default/template/menubar_tags.tpl
new file mode 100644
index 000000000..220175008
--- /dev/null
+++ b/themes/default/template/menubar_tags.tpl
@@ -0,0 +1,17 @@
+<dt>{'Related tags'|@translate}</dt>
+<dd>
+ <div id="menuTagCloud">
+ {foreach from=$block->data item=tag}
+ <span>
+ {if !empty($tag.U_ADD) }
+ <a href="{$tag.U_ADD}"
+ title="{$pwg->l10n_dec('%d element are also linked to current tags', '%d elements are also linked to current tags', $tag.counter)}"
+ rel="nofollow">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+">
+ </a>
+ {/if}
+ <a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{'See images linked to this tag only'|@translate}">{$tag.name}</a>{* there should be no space between end of a and span elements to avoid IE8 bug https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=366567 *}</span>
+ {/foreach}
+ </div>
+</dd>
+
diff --git a/themes/default/template/month_calendar.tpl b/themes/default/template/month_calendar.tpl
new file mode 100644
index 000000000..45d6079e1
--- /dev/null
+++ b/themes/default/template/month_calendar.tpl
@@ -0,0 +1,86 @@
+
+{if !empty($chronology_navigation_bars) }
+{foreach from=$chronology_navigation_bars item=bar}
+<div class="calendarBar">
+ {if isset($bar.previous)}
+ <div style="float:left">&laquo; <a href="{$bar.previous.URL}">{$bar.previous.LABEL}</a></div>
+ {/if}
+ {if isset($bar.next)}
+ <div style="float:right"><a href="{$bar.next.URL}">{$bar.next.LABEL}</a> &raquo;</div>
+ {/if}
+ {if empty($bar.items)}
+ &nbsp;
+ {else}
+ {foreach from=$bar.items item=item}
+ <span class="calItem{if !isset($item.URL)}Empty{/if}" {if isset($item.NB_IMAGES)}title="{$pwg->l10n_dec('%d element', '%d elements', $item.NB_IMAGES)}"{/if}>
+ {if isset($item.URL)}
+ <a href="{$item.URL}">{$item.LABEL}</a>
+ {else}
+ {$item.LABEL}
+ {/if}
+ </span>
+ {/foreach}
+ {/if}
+</div>
+{/foreach}
+{/if}
+
+{if !empty($chronology_calendar.calendar_bars) }
+{foreach from=$chronology_calendar.calendar_bars item=bar}
+<div class="calendarCalBar">
+ <span class="calCalHead"><a href="{$bar.U_HEAD}">{$bar.HEAD_LABEL}</a> ({$bar.NB_IMAGES})</span><br>
+ {foreach from=$bar.items item=item}
+ <span class="calCal{if !isset($item.URL)}Empty{/if}">
+ {if isset($item.URL)}
+ <a href="{$item.URL}">{$item.LABEL}</a>
+ {else}
+ {$item.LABEL}
+ {/if}
+ {if isset($item.NB_IMAGES)}({$item.NB_IMAGES}){/if}
+ </span>
+ {/foreach}
+</div>
+{/foreach}
+{/if}
+
+{if isset($chronology_calendar.month_view) }
+<table class="calMonth">
+ <thead>
+ <tr>
+ {foreach from=$chronology_calendar.month_view.wday_labels item=wday}
+ <td class="calDayHead">{$wday}</td>
+ {/foreach}
+ </tr>
+ </thead>
+{html_head} {*add the style to html head for strict standard compliance*}
+<style type="text/css">
+TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg {ldelim}
+ width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;
+}
+</style>
+{/html_head}
+ {foreach from=$chronology_calendar.month_view.weeks item=week}
+ <tr>
+ {foreach from=$week item=day}
+ {if !empty($day)}
+ {if isset($day.IMAGE)}
+ <td class="calDayCellFull">
+ <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div>
+ <div class="calImg">
+ <a href="{$day.U_IMG_LINK}">
+ <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$pwg->l10n_dec('%d element','%d elements', $day.NB_ELEMENTS)}">
+ </a>
+ </div>
+ {else}
+ <td class="calDayCellEmpty">{$day.DAY}
+ {/if}
+ {else}
+ <td class="calDayCellBlank">
+ {/if}
+ </td>
+ {/foreach} {*day in week*}
+ </tr>
+ {/foreach} {*week in month*}
+</table>
+{/if}
+
diff --git a/themes/default/template/navigation_bar.tpl b/themes/default/template/navigation_bar.tpl
new file mode 100644
index 000000000..82c66bd15
--- /dev/null
+++ b/themes/default/template/navigation_bar.tpl
@@ -0,0 +1,28 @@
+<div class="navigationBar">
+ {if isset($navbar.URL_FIRST)}
+ <a href="{$navbar.URL_FIRST}" rel="first">{'First'|@translate}</a> |
+ <a href="{$navbar.URL_PREV}" rel="prev">{'Previous'|@translate}</a> |
+ {else}
+ {'First'|@translate} |
+ {'Previous'|@translate} |
+ {/if}
+
+ {assign var='prev_page' value=0}
+ {foreach from=$navbar.pages key=page item=url}
+ {if $page > $prev_page+1}...{/if}
+ {if $page == $navbar.CURRENT_PAGE}
+ <span class="pageNumberSelected">{$page}</span>
+ {else}
+ <a href="{$url}">{$page}</a>
+ {/if}
+ {assign var='prev_page' value=$page}
+ {/foreach}
+
+ {if isset($navbar.URL_NEXT)}
+ | <a href="{$navbar.URL_NEXT}" rel="next">{'Next'|@translate}</a>
+ | <a href="{$navbar.URL_LAST}" rel="last">{'Last'|@translate}</a>
+ {else}
+ | {'Next'|@translate}
+ | {'Last'|@translate}
+ {/if}
+</div>
diff --git a/themes/default/template/nbm.tpl b/themes/default/template/nbm.tpl
new file mode 100644
index 000000000..646335813
--- /dev/null
+++ b/themes/default/template/nbm.tpl
@@ -0,0 +1,30 @@
+
+<div id="content" class="content">
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Notification'|@translate}</h2>
+ </div>
+
+ {if not empty($errors)}
+ <div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+ {if not empty($infos)}
+ <div class="infos">
+ <ul>
+ {foreach from=$infos item=info}
+ <li>{$info}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+</div>
diff --git a/themes/default/template/notification.tpl b/themes/default/template/notification.tpl
new file mode 100644
index 000000000..8f6dcb680
--- /dev/null
+++ b/themes/default/template/notification.tpl
@@ -0,0 +1,24 @@
+{html_head}
+<link rel="alternate" type="application/rss+xml" title="{'Image only RSS feed'|@translate}" href="{$U_FEED_IMAGE_ONLY}">
+<link rel="alternate" type="application/rss+xml" title="{'Complete RSS feed (images, comments)'|@translate}" href="{$U_FEED}">
+{/html_head}
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Notification'|@translate}</h2>
+ </div>
+
+ <p>{'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'|@translate}</p>
+
+ <dl>
+ <dt>
+ <a href="{$U_FEED_IMAGE_ONLY}">{'Image only RSS feed'|@translate}</a><br><br>
+ </dt>
+ <dt>
+ <a href="{$U_FEED}">{'Complete RSS feed (images, comments)'|@translate}</a>
+ </dt>
+ </dl>
+</div>
diff --git a/themes/default/template/password.tpl b/themes/default/template/password.tpl
new file mode 100644
index 000000000..1e0471bd5
--- /dev/null
+++ b/themes/default/template/password.tpl
@@ -0,0 +1,53 @@
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Password forgotten'|@translate}</h2>
+ </div>
+
+ {if count($errors)}
+ <div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+ {if count($infos)}
+ <div class="infos">
+ <ul>
+ {foreach from=$infos item=info}
+ <li>{$info}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+<form action="{$F_ACTION}" method="post" class="properties">
+ <fieldset>
+ <legend>{'Retrieve password'|@translate}</legend>
+
+ <ul>
+ <li>
+ <span class="property">
+ <label for="mail_address">{'Email address'|@translate}</label>
+ </span>
+ <input class="login" type="text" name="mail_address" id="mail_address" size="40" maxlength="40" >
+ </li>
+ <li>
+ <span class="property">
+ <label for="no_mail_address">{'No email address'|@translate}</label>
+ </span>
+ <input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
+ </li>
+ </ul>
+ </fieldset>
+
+ <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
+</form>
+
+</div> <!-- content -->
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
new file mode 100644
index 000000000..885d31112
--- /dev/null
+++ b/themes/default/template/picture.tpl
@@ -0,0 +1,280 @@
+
+{* Example of resizeable *}
+{*
+{include file='include/autosize.inc.tpl'}
+*}
+
+{if isset($errors)}
+<div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+</div>
+{/if}
+
+{if isset($infos)}
+<div class="infos">
+ <ul>
+ {foreach from=$infos item=info}
+ <li>{$info}</li>
+ {/foreach}
+ </ul>
+</div>
+{/if}
+
+{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
+
+<div id="imageHeaderBar">
+ <div class="browsePath">
+ <a href="{$U_HOME}" rel="Home">{'Home'|@translate}</a>
+ {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
+ {$LEVEL_SEPARATOR}{$current.TITLE}
+ </div>
+ <div class="imageNumber">{$PHOTO}</div>
+ {if $SHOW_PICTURE_NAME_ON_TITLE }
+ <h2>{$current.TITLE}</h2>
+ {/if}
+</div>
+
+<div id="imageToolBar">
+ <div class="randomButtons">
+ {if isset($U_SLIDESHOW_START) }
+ <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"></a>
+ {/if}
+ {if isset($U_SLIDESHOW_STOP) }
+ <a href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'stop the slideshow'|@translate}"></a>
+ {/if}
+ <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata"></a>
+ {if isset($current.U_DOWNLOAD) }
+ <a href="{$current.U_DOWNLOAD}" title="{'download'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
+ {/if}
+ {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
+ {if isset($favorite) }
+ <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a>
+ {/if}
+ {if !empty($U_SET_AS_REPRESENTATIVE) }
+ <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
+ {/if}
+ {if isset($U_ADMIN) }
+ <a href="{$U_ADMIN}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
+ {/if}
+ {if isset($U_CADDIE) }{*caddie management BEGIN*}
+<script type="text/javascript">
+{literal}function addToCadie(aElement, rootUrl, id)
+{
+if (aElement.disabled) return;
+aElement.disabled=true;
+var y = new PwgWS(rootUrl);
+
+y.callService(
+ "pwg.caddie.add", {image_id: id} ,
+ {
+ onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
+ onSuccess: function(result) { aElement.disabled = false; }
+ }
+ );
+}{/literal}
+</script>
+ <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
+ {/if}{*caddie management END*}
+ </div>
+ {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
+</div> <!-- imageToolBar -->
+
+<div id="theImage">
+{$ELEMENT_CONTENT}
+
+{if isset($COMMENT_IMG)}
+<p>{$COMMENT_IMG}</p>
+{/if}
+
+{if isset($U_SLIDESHOW_STOP) }
+<p>
+ [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
+</p>
+{/if}
+
+</div>
+
+{if isset($previous) }
+<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
+ <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
+</a>
+{/if}
+{if isset($next) }
+<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
+ <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
+</a>
+{/if}
+
+<table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}">
+ <tr id="Author">
+ <td class="label">{'Author'|@translate}</td>
+ <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
+ </tr>
+ <tr id="datecreate">
+ <td class="label">{'Created on'|@translate}</td>
+ <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
+ </tr>
+ <tr id="datepost">
+ <td class="label">{'Posted on'|@translate}</td>
+ <td class="value">{$INFO_POSTED_DATE}</td>
+ </tr>
+ <tr id="Dimensions">
+ <td class="label">{'Dimensions'|@translate}</td>
+ <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
+ </tr>
+ <tr id="File">
+ <td class="label">{'File'|@translate}</td>
+ <td class="value">{$INFO_FILE}</td>
+ </tr>
+ <tr id="Filesize">
+ <td class="label">{'Filesize'|@translate}</td>
+ <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
+ </tr>
+ <tr id="Tags">
+ <td class="label">{'Tags'|@translate}</td>
+ <td class="value">
+ {if isset($related_tags)}
+ {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
+ <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
+ {/if}
+ </td>
+ </tr>
+ <tr id="Categories">
+ <td class="label">{'Categories'|@translate}</td>
+ <td class="value">
+ {if isset($related_categories)}
+ <ul>
+ {foreach from=$related_categories item=cat}
+ <li>{$cat}</li>
+ {/foreach}
+ </ul>
+ {/if}
+ </td>
+ </tr>
+ <tr id="Visits">
+ <td class="label">{'Visits'|@translate}</td>
+ <td class="value">{$INFO_VISITS}</td>
+ </tr>
+
+{if isset($rate_summary) }
+ <tr id="Average">
+ <td class="label">{'Average rate'|@translate}</td>
+ <td class="value" id="ratingSummary">
+ {if $rate_summary.count}
+ {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
+ {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
+ {else}
+ {'no rate'|@translate}
+ {/if}
+ </td>
+ </tr>
+{/if}
+
+{if isset($rating)}
+ <tr id="rating">
+ <td class="label">
+ <span id="updateRate">{if isset($rating.USER_RATE)}{'Rate this picture'|@translate}{else}{'Rate this picture'|@translate}{/if}</span>
+ </td>
+ <td class="value">
+ <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
+ <div>&nbsp;
+ {foreach from=$rating.marks item=mark name=rate_loop}
+ {if !$smarty.foreach.rate_loop.first} | {/if}
+ {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
+ <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
+ {else}
+ <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
+ {/if}
+ {/foreach}
+ <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
+ <script type="text/javascript">
+ makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
+ updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
+ ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
+ </script>
+ </div>
+ </form>
+ </td>
+ </tr>
+{/if}
+
+{if isset($available_permission_levels) }
+ <tr id="Privacy">
+ <td class="label">{'Privacy level'|@translate}:</td>
+ <td class="value">
+<script type="text/javascript">
+{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
+{
+selectElement.disabled = true;
+var y = new PwgWS(rootUrl);
+y.callService(
+ "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
+ {
+ method: "POST",
+ onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
+ onSuccess: function(result) { selectElement.disabled = false; }
+ }
+ );
+}{/literal}
+</script>
+ <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
+ {foreach from=$available_permission_levels item=level}
+ <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
+ {/foreach}
+ </select>
+ </td></tr>
+{/if}
+
+</table>
+
+{if isset($metadata)}
+<table id="Metadata" class="infoTable2" summary="{'Some more (technical) info about this picture'|@translate}">
+{foreach from=$metadata item=meta}
+ <tr id="{$meta.TITLE}">
+ <th colspan="2">{$meta.TITLE}</th>
+ </tr>
+ {foreach from=$meta.lines item=value key=label}
+ <tr id="{$label}" >
+ <td class="label">{$label}</td>
+ <td class="value">{$value}</td>
+ </tr>
+ {/foreach}
+{/foreach}
+</table>
+{/if}
+
+
+<hr class="separation">
+
+{if isset($COMMENT_COUNT)}
+<div id="comments">
+ {if $COMMENT_COUNT > 0}
+ <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
+ {/if}
+ {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+ {if isset($comments)}
+ {include file='comment_list.tpl'}
+ {/if}
+
+ {if isset($comment_add)}
+ <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
+ <fieldset>
+ <legend>{'Add a comment'|@translate}</legend>
+ {if $comment_add.SHOW_AUTHOR}
+ <label>{'Author'|@translate}<input type="text" name="author"></label>
+ {/if}
+ <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$Comment_add.CONTENT}</textarea></label>
+ <input type="hidden" name="key" value="{$comment_add.KEY}">
+ <input class="submit" type="submit" value="{'Submit'|@translate}">
+ </fieldset>
+ </form>
+ {/if}
+</div>
+{/if} {*comments*}
+
+{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
diff --git a/themes/default/template/picture_content.tpl b/themes/default/template/picture_content.tpl
new file mode 100644
index 000000000..384a9ce1a
--- /dev/null
+++ b/themes/default/template/picture_content.tpl
@@ -0,0 +1,11 @@
+{if isset($high) }
+<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
+{/if}
+ <img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
+ {if isset($COMMENT_IMG)}
+ title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
+ {/if}>
+{if isset($high) }
+</a>
+ <p>{'Click on the picture to see it in high definition'|@translate}</p>
+{/if}
diff --git a/themes/default/template/picture_nav_buttons.tpl b/themes/default/template/picture_nav_buttons.tpl
new file mode 100644
index 000000000..06b236a88
--- /dev/null
+++ b/themes/default/template/picture_nav_buttons.tpl
@@ -0,0 +1,102 @@
+ <div class="navButtons">
+
+{if isset($last)}
+ <a class="navButton" href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" rel="last"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'Last'|@translate}"></a>
+{else}
+ <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($next)}
+ <a class="navButton" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'Next'|@translate}"></a>
+{else}
+ <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($slideshow.U_START_PLAY)}
+ <a class="navButton" href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'Play of slideshow'|@translate}"></a>
+{/if}
+
+{if isset($slideshow.U_STOP_PLAY)}
+ <a class="navButton" href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'Pause of slideshow'|@translate}"></a>
+{/if}
+
+{if isset($U_UP) and !isset($slideshow)}
+ <a class="navButton" href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up"><img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'Thumbnails'|@translate}"></a>
+{/if}
+
+{if isset($previous)}
+ <a class="navButton" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'Previous'|@translate}"></a>
+{else}
+ <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
+{/if}
+
+{if isset($first)}
+ <a class="navButton" href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" rel="first"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'First'|@translate}"></a>
+{else}
+ <a class="navButton"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
+{/if}
+
+
+{if isset($slideshow.U_START_REPEAT)}
+ <a class="navButton" href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'Repeat the slideshow'|@translate}"></a>
+{/if}
+
+{if isset($slideshow.U_STOP_REPEAT)}
+ <a class="navButton" href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'Not repeat the slideshow'|@translate}"></a>
+{/if}
+
+{if isset($slideshow)}
+ {if isset($slideshow.U_DEC_PERIOD)}
+ <a class="navButton" href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period.png" class="button" alt="{'Accelerate diaporama speed'|@translate}"></a>
+ {else}
+ <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
+ {/if}
+
+ {if isset($slideshow.U_INC_PERIOD)}
+ <a class="navButton" href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period.png" class="button" alt="{'Reduce diaporama speed'|@translate}"></a>
+ {else}
+ <a class="navButton"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
+ {/if}
+{/if}
+
+ </div>
+
+<script type="text/javascript">// <![CDATA[
+{literal}
+function keyboardNavigation(e)
+{
+ if(!e) e=window.event;
+ if (e.altKey) return true;
+ var target = e.target || e.srcElement;
+ if (target && target.type) return true; //an input editable element
+ var keyCode=e.keyCode || e.which;
+ var docElem = document.documentElement;
+ switch(keyCode) {
+{/literal}
+{if isset($next)}
+ case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
+{/if}
+{if isset($previous)}
+ case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($first)}
+ /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($last)}
+ /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($U_UP) and !isset($slideshow)}
+ /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+
+{if isset($slideshow.U_START_PLAY)}
+ /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+{if isset($slideshow.U_STOP_PLAY)}
+ /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
+{/if}
+ }
+ return true;
+}
+document.onkeydown=keyboardNavigation;
+// ]]></script>
diff --git a/themes/default/template/profile.tpl b/themes/default/template/profile.tpl
new file mode 100644
index 000000000..b94c3967c
--- /dev/null
+++ b/themes/default/template/profile.tpl
@@ -0,0 +1,21 @@
+<div id="content" class="content">
+
+{if isset($errors)}
+<div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+</div>
+{/if}
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Profile'|@translate}</h2>
+ </div>
+
+{$PROFILE_CONTENT}
+</div> <!-- content -->
diff --git a/themes/default/template/profile_content.tpl b/themes/default/template/profile_content.tpl
new file mode 100644
index 000000000..876a2a8a8
--- /dev/null
+++ b/themes/default/template/profile_content.tpl
@@ -0,0 +1,109 @@
+<form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties">
+
+ <fieldset>
+ <legend>{'Registration'|@translate}</legend>
+ <input type="hidden" name="redirect" value="{$REDIRECT}">
+ <ul>
+ <li>
+ <span class="property">{'Username'|@translate}</span>
+ {$USERNAME}
+ </li>
+{if not $SPECIAL_USER} {* can modify password + email*}
+ <li>
+ <span class="property">
+ <label for="mail_address">{'Email address'|@translate}</label>
+ </span>
+ <input type="text" name="mail_address" id="mail_address" value="{$EMAIL}">
+ </li>
+{if not $IN_ADMIN} {* admins do not need old password*}
+ <li>
+ <span class="property">
+ <label for="password">{'Password'|@translate}</label>
+ </span>
+ <input type="password" name="password" id="password" value="">
+ </li>
+{/if}
+ <li>
+ <span class="property">
+ <label for="use_new_pwd">{'New password'|@translate}</label>
+ </span>
+ <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
+ </li>
+ <li>
+ <span class="property">
+ <label for="passwordConf">{'Confirm Password'|@translate}</label>
+ </span>
+ <input type="password" name="passwordConf" id="passwordConf" value="">
+ </li>
+ </ul>
+{/if}
+ </fieldset>
+
+ <fieldset>
+ <legend>{'Preferences'|@translate}</legend>
+
+ <ul>
+ <li>
+ <span class="property">
+ <label for="nb_image_line">{'Number of images per row'|@translate}</label>
+ </span>
+ <input type="text" size="3" maxlength="2" name="nb_image_line" id="nb_image_line" value="{$NB_IMAGE_LINE}">
+ </li>
+ <li>
+ <span class="property">
+ <label for="nb_line_page">{'Number of rows per page'|@translate}</label>
+ </span>
+ <input type="text" size="3" maxlength="2" name="nb_line_page" id="nb_line_page" value="{$NB_ROW_PAGE}" >
+ </li>
+ <li>
+ <span class="property">
+ <label for="template">{'Interface theme'|@translate}</label>
+ </span>
+ {html_options name=theme options=$template_options selected=$template_selection}
+ </li>
+ <li>
+ <span class="property">
+ <label for="Language">{'Language'|@translate}</label>
+ </span>
+ {html_options name=language options=$language_options selected=$language_selection}
+ </li>
+ <li>
+ <span class="property">
+ <label for="Recent period">{'Recent period'|@translate}</label>
+ </span>
+ <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{$RECENT_PERIOD}">
+ </li>
+ <li>
+ <span class="property">{'Expand all categories'|@translate}</span>
+ {html_radios name='expand' options=$radio_options selected=$EXPAND}
+ </li>
+ <li>
+ <span class="property">{'Show number of comments'|@translate}</span>
+ {html_radios name='show_nb_comments' options=$radio_options selected=$NB_COMMENTS}
+ </li>
+ <li>
+ <span class="property">{'Show number of hits'|@translate}</span>
+ {html_radios name='show_nb_hits' options=$radio_options selected=$NB_HITS}
+ </li>
+ <li>
+ <span class="property">
+ <label for="Maximum width of the pictures">{'Maximum width of the pictures'|@translate}</label>
+ </span>
+ <input type="text" size="4" maxlength="4" name="maxwidth" id="maxwidth" value="{$MAXWIDTH}">
+ </li>
+ <li>
+ <span class="property">
+ <label for="Maximum height of the pictures">{'Maximum height of the pictures'|@translate}</label>
+ </span>
+ <input type="text" size="4" maxlength="4" name="maxheight" id="maxheight" value="{$MAXHEIGHT}">
+ </li>
+ </ul>
+ </fieldset>
+
+ <p class="bottomButtons">
+ <input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
+ <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
+ <input class="submit" type="submit" name="reset_to_default" value="{'Reset to default values'|@translate}">
+ </p>
+
+</form>
diff --git a/themes/default/template/redirect.tpl b/themes/default/template/redirect.tpl
new file mode 100644
index 000000000..aa90953ec
--- /dev/null
+++ b/themes/default/template/redirect.tpl
@@ -0,0 +1,13 @@
+{html_head}
+<style type="text/css">#the_page {ldelim}text-align:center;} </style>
+{/html_head}
+
+<div>
+ {$REDIRECT_MSG}
+</div>
+
+<p style="margin: 2em">
+ <a href="{$page_refresh.U_REFRESH}">
+ {'Click here if your browser does not automatically forward you'|@translate}
+ </a>
+</p>
diff --git a/themes/default/template/register.tpl b/themes/default/template/register.tpl
new file mode 100644
index 000000000..7e5a31d70
--- /dev/null
+++ b/themes/default/template/register.tpl
@@ -0,0 +1,68 @@
+<div id="registerPage">
+
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Registration'|@translate}</h2>
+ </div>
+
+{if isset($errors)}
+ <div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+ </div>
+{/if}
+
+<form method="post" action="{$F_ACTION}" class="properties" name="register_form">
+ <fieldset>
+ <legend>{'Enter your personnal informations'|@translate}</legend>
+
+ <ul>
+ <li>
+ <span class="property">
+ <label for="login">* {'Username'|@translate}</label>
+ </span>
+ <input type="text" name="login" id="login" value="{$F_LOGIN}" >
+ </li>
+ <li>
+ <span class="property">
+ <label for="password">* {'Password'|@translate}</label>
+ </span>
+ <input type="password" name="password" id="password" >
+ </li>
+ <li>
+ <span class="property">
+ <label for="password_conf">* {'Confirm Password'|@translate}</label>
+ </span>
+ <input type="password" name="password_conf" id="password_conf" >
+ </li>
+ <li>
+ <span class="property">
+ <label for="mail_address">{'Mail address'|@translate}</label>
+ </span>
+ <input type="text" name="mail_address" id="mail_address" value="{$F_EMAIL}" >
+ ({'useful when password forgotten'|@translate})
+ </li>
+ </ul>
+
+ </fieldset>
+
+ <p class="bottomButtons">
+ <input class="submit" type="submit" name="submit" value="{'Register'|@translate}">
+ <input class="submit" type="reset" value="{'Reset'|@translate}">
+ </p>
+
+</form>
+
+<script type="text/javascript"><!--
+document.register_form.login.focus();
+//--></script>
+
+</div> <!-- content -->
+</div> <!-- registerPage -->
diff --git a/themes/default/template/search.tpl b/themes/default/template/search.tpl
new file mode 100644
index 000000000..57f799e75
--- /dev/null
+++ b/themes/default/template/search.tpl
@@ -0,0 +1,146 @@
+
+{* Example of resizeable *}
+{*
+{include file='include/resize.inc.tpl'}
+*}
+
+{* Example of datepicker *}
+{*
+{include file='include/datepicker.inc.tpl'}
+
+{literal}
+<script type="text/javascript">
+ pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date");
+ pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null);
+ jQuery().ready(function(){ $(".date_today").hide(); });
+</script>
+{/literal}
+*}
+
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}" rel="Home"><img src="{$ROOT_URL}{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Search'|@translate}</h2>
+ </div>
+
+{if isset($errors) }
+<div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+</div>
+{/if}
+
+<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
+<fieldset>
+ <legend>{'Filter'|@translate}</legend>
+ <label>{'Search for words'|@translate}
+ <input type="text" style="width: 300px" name="search_allwords" size="30">
+ </label>
+ <ul>
+ <li><label>
+ <input type="radio" name="mode" value="AND" checked="checked">{'Search for all terms '|@translate}
+ </label></li>
+ <li><label>
+ <input type="radio" name="mode" value="OR">{'Search for any terms'|@translate}
+ </label></li>
+ </ul>
+ <label>{'Search for Author'|@translate}
+ <input type="text" style="width: 300px" name="search_author" size="30">
+ </label>
+</fieldset>
+
+{if isset($TAG_SELECTION)}
+<fieldset>
+ <legend>{'Search tags'|@translate}</legend>
+ {$TAG_SELECTION}
+ <label><span><input type="radio" name="tag_mode" value="AND" checked="checked"> {'All tags'|@translate}</span></label>
+ <label><span><input type="radio" name="tag_mode" value="OR"> {'Any tag'|@translate}</span></label>
+</fieldset>
+{/if}
+
+<fieldset>
+ <legend>{'Search by Date'|@translate}</legend>
+ <ul>
+ <li><label>{'Kind of date'|@translate}</label></li>
+ <li><label>
+ <input type="radio" name="date_type" value="date_creation" checked="checked">{'Creation date'|@translate}
+ </label></li>
+ <li><label>
+ <input type="radio" name="date_type" value="date_available">{'Post date'|@translate}
+ </label></li>
+ </ul>
+ <ul>
+ <li><label>{'Date'|@translate}</label></li>
+ <li>
+ <select id="start_day" name="start_day">
+ <option value="0">--</option>
+ {section name=day start=1 loop=32}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
+ </select>
+ <select id="start_month" name="start_month">
+ {html_options options=$month_list selected=$START_MONTH_SELECTED}
+ </select>
+ <input id="start_year" name="start_year" type="text" size="4" maxlength="4" >
+ <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
+ </li>
+ <li>
+ <a class="date_today" href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
+ </li>
+ </ul>
+ <ul>
+ <li><label>{'End-Date'|@translate}</label></li>
+ <li>
+ <select id="end_day" name="end_day">
+ <option value="0">--</option>
+ {section name=day start=1 loop=32}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
+ </select>
+ <select id="end_month" name="end_month">
+ {html_options options=$month_list selected=$END_MONTH_SELECTED}
+ </select>
+ <input id="end_year" name="end_year" type="text" size="4" maxlength="4" >
+ <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
+ </li>
+ <li>
+ <a class="date_today" href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
+ </li>
+ </ul>
+</fieldset>
+
+<fieldset>
+ <legend>{'Search Options'|@translate}</legend>
+ <label>{'Search in Categories'|@translate}
+ <select class="categoryList" name="cat[]" multiple="multiple" >
+ {html_options options=$category_options selected=$category_options_selected}
+ </select>
+ </label>
+ <ul>
+ <li><label>{'Search in subcategories'|@translate}</label></li>
+ <li><label>
+ <input type="radio" name="subcats-included" value="1" checked="checked">{'Yes'|@translate}
+ </label></li>
+ <li><label>
+ <input type="radio" name="subcats-included" value="0">{'No'|@translate}
+ </label></li>
+ </ul>
+</fieldset>
+<p>
+ <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
+ <input class="submit" type="reset" value="{'Reset'|@translate}">
+</p>
+</form>
+
+<script type="text/javascript"><!--
+document.search.search_allwords.focus();
+//--></script>
+
+</div> <!-- content -->
diff --git a/themes/default/template/search_rules.tpl b/themes/default/template/search_rules.tpl
new file mode 100644
index 000000000..28b2e423f
--- /dev/null
+++ b/themes/default/template/search_rules.tpl
@@ -0,0 +1,57 @@
+<div id="content" class="content">
+<h2>{'Search rules'|@translate}</h2>
+
+{if isset($INTRODUCTION) }
+<p>{$INTRODUCTION}</p>
+{/if}
+
+<ul>
+
+ {if isset($search_words) }
+ {foreach from=$search_words item=v}
+ <li>{$v}</li>
+ {/foreach}
+ {/if}
+
+ {if isset($SEARCH_TAGS_MODE) }
+ <li>
+ <p>{if 'AND'==$SEARCH_TAGS_MODE}{'At least one tag must match'|@translate}{else}{'At least one tag must match'|@translate}{/if}</p>
+ <ul>
+ {foreach from=$search_tags item=v}
+ <li>{$v}</li>
+ {/foreach}
+ </ul>
+ </li>
+ {/if}
+
+ {if isset($DATE_CREATION) }
+ <li>{$DATE_CREATION}</li>
+ {/if}
+
+ {if isset($DATE_AVAILABLE) }
+ <li>{$DATE_AVAILABLE}</li>
+ {/if}
+
+ {if isset($search_categories) }
+ <li>
+ <p>{'Categories'|@translate}</p>
+
+ <ul>
+ {foreach from=$search_categories item=v}
+ <li>{$v}</li>
+ {/foreach}
+ </ul>
+ </li>
+ {/if}
+
+</ul>
+
+</div> <!-- content -->
+
+<ul class="categoryActions">
+ <li>
+ <a href="#" onclick="window.close();" title="{'Close this window'|@translate}">
+ <img src="{$ROOT_URL}{$themeconf.icon_dir}/exit.png" class="button" alt="exit">
+ </a>
+ </li>
+</ul>
diff --git a/themes/default/template/slideshow.tpl b/themes/default/template/slideshow.tpl
new file mode 100644
index 000000000..a310935a2
--- /dev/null
+++ b/themes/default/template/slideshow.tpl
@@ -0,0 +1,22 @@
+<div id="imageHeaderBar">
+ <div class="browsePath">
+ {if isset($U_SLIDESHOW_STOP) }
+ [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
+ {/if}
+ </div>
+ <div class="imageNumber">{$PHOTO}</div>
+ {if $SHOW_PICTURE_NAME_ON_TITLE }
+ <h2 class="showtitle">{$current.TITLE}</h2>
+ {/if}
+</div>
+
+<div id="imageToolBar">
+ {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
+</div>
+
+<div id="theImage">
+ {$ELEMENT_CONTENT}
+ {if isset($COMMENT_IMG)}
+ <p class="showlegend">{$COMMENT_IMG}</p>
+ {/if}
+</div>
diff --git a/themes/default/template/tags.tpl b/themes/default/template/tags.tpl
new file mode 100644
index 000000000..95891df0e
--- /dev/null
+++ b/themes/default/template/tags.tpl
@@ -0,0 +1,54 @@
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ {if $display_mode == 'letters'}
+ <li><a href="{$U_CLOUD}" title="{'cloud'|@translate}" rel="nofollow"><img src="{$themeconf.icon_dir}/tag_cloud.png" class="button" alt="{'cloud'|@translate}"></a></li>
+ {/if}
+
+ {if $display_mode == 'cloud'}
+ <li><a href="{$U_LETTERS}" title="{'letters'|@translate}" rel="nofollow"><img src="{$themeconf.icon_dir}/tag_letters.png" class="button" alt="{'letters'|@translate}"></a></li>
+ {/if}
+
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Tags'|@translate}</h2>
+ </div>
+
+{if isset($tags)}
+ {if $display_mode == 'cloud'}
+ <div id="fullTagCloud">
+ {foreach from=$tags item=tag}
+ <span><a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{$tag.counter}">{$tag.name}</a></span>
+ {/foreach}
+ </div>
+ {/if}
+
+ {if $display_mode == 'letters'}
+ <table>
+ <tr>
+ <td valign="top">
+ {foreach from=$letters item=letter}
+ <fieldset class="tagLetter">
+ <legend class="tagLetterLegend">{$letter.TITLE}</legend>
+ <table class="tagLetterContent">
+ {foreach from=$letter.tags item=tag}
+ <tr class="tagLine">
+ <td><a href="{$tag.URL}">{$tag.name}</a></td>
+ <td class="nbEntries">{$pwg->l10n_dec('%d element', '%d elements', $tag.counter)}</td>
+ </tr>
+ {/foreach}
+ </table>
+ </fieldset>
+ {if isset($letter.CHANGE_COLUMN) }
+ </td>
+ <td valign="top">
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+ </table>
+ {/if}
+{/if}
+
+</div> <!-- content -->
diff --git a/themes/default/template/thumbnails.tpl b/themes/default/template/thumbnails.tpl
new file mode 100644
index 000000000..1061f77cd
--- /dev/null
+++ b/themes/default/template/thumbnails.tpl
@@ -0,0 +1,37 @@
+
+{if !empty($thumbnails)}
+<ul class="thumbnails">
+{foreach from=$thumbnails item=thumbnail}
+ <li>
+ <span class="wrap1">
+ <span class="wrap2">
+ <a href="{$thumbnail.URL}">
+ <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
+ </a>
+ </span>
+ <span class="thumbLegend">
+ {if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}
+ {if !empty($thumbnail.icon_ts)}
+ <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" class="icon" alt="(!)">
+ {/if}
+ {if isset($thumbnail.NB_COMMENTS)}
+ <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
+ <br>
+ {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
+ </span>
+ {/if}
+
+ {if isset($thumbnail.NB_HITS)}
+ <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
+ <br>
+ {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
+ </span>
+ {/if}
+ </span>
+ </span>
+ </li>
+{/foreach}
+</ul>
+{/if}
+
+
diff --git a/themes/default/template/upload.tpl b/themes/default/template/upload.tpl
new file mode 100644
index 000000000..00f17be89
--- /dev/null
+++ b/themes/default/template/upload.tpl
@@ -0,0 +1,114 @@
+
+{* Example of resizeable *}
+{*
+{include file='include/autosize.inc.tpl'}
+*}
+
+<div id="content" class="content">
+
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{$U_HOME}" title="{'Home'|@translate}"><img src="{$themeconf.icon_dir}/Home.png" class="button" alt="{'Home'|@translate}"></a></li>
+ </ul>
+ <h2>{'Upload a picture'|@translate}</h2>
+ </div>
+
+ {if !empty($errors)}
+ <div class="errors">
+ <ul>
+ {foreach from=$errors item=error}
+ <li>{$error}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+
+ {if not $UPLOAD_SUCCESSFUL }
+ <form enctype="multipart/form-data" method="post" action="{$F_ACTION}">
+ <table style="width:80%;margin-left:auto;margin-right:auto;">
+ <tr>
+ <td colspan="2" class="menu">
+ <div style="text-align:center;">{$ADVISE_TITLE}</div>
+ {if not empty($advises)}
+ <ul>
+ {foreach from=$advises item=advise}
+ <li>{$advise}</li>
+ {/foreach}
+ </ul>
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input class="file" name="picture" type="file" value="">
+ </td>
+ </tr>
+ {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS}
+ <!-- category -->
+ <tr>
+ <td>{'Category'|@translate}</td>
+ <td>
+ {html_options name="category" options=$categories selected=$categories_selected}
+ </td>
+ </tr>
+ <!-- username -->
+ <tr>
+ <td>{'Username'|@translate} <span style="color:red;">*</span></td>
+ <td>
+ <input name="username" type="text" value="{$NAME}">
+ </td>
+ </tr>
+ <!-- mail address -->
+ <tr>
+ <td>{'E-mail address'|@translate} <span style="color:red;">*</span></td>
+ <td>
+ <input name="mail_address" type="text" value="{$EMAIL}">
+ </td>
+ </tr>
+ <!-- name of the picture -->
+ <tr>
+ <td>{'Name of the picture'|@translate}</td>
+ <td>
+ <input name="name" type="text" value="{$NAME_IMG}">
+ </td>
+ </tr>
+ <!-- author -->
+ <tr>
+ <td>{'Author'|@translate}</td>
+ <td>
+ <input name="author" type="text" value="{$AUTHOR_IMG}">
+ </td>
+ </tr>
+ <!-- date of creation -->
+ <tr>
+ <td>{'Creation date'|@translate} (DD/MM/YYYY)</td>
+ <td>
+ <input name="date_creation" type="text" value="{$DATE_IMG}">
+ </td>
+ </tr>
+ <!-- comment -->
+ <tr>
+ <td>{'Comment'|@translate}</td>
+ <td>
+ <textarea name="comment" id="comment" rows="3" cols="40" style="overflow:auto">{$COMMENT_IMG}</textarea>
+ </td>
+ </tr>
+ {/if}
+ <tr>
+ <td colspan="2" align="center">
+ <input class="submit" name="submit" type="submit" value="{'Submit'|@translate}">
+ </td>
+ </tr>
+ </table>
+ </form>
+ {else}
+ {'Picture uploaded with success, an administrator will validate it as soon as possible'|@translate}<br>
+ <div style="text-align:center;">
+ <a href="{$U_RETURN}">[ {'Home'|@translate} ]</a>
+ </div>
+ {/if}
+
+ {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS}
+ <div style="text-align:left; margin-left:20px;"><span style="color:red;">*</span> : {'obligatory'|@translate}</div>
+ {/if}
+</div> <!-- content -->
diff --git a/themes/default/theme.css b/themes/default/theme.css
new file mode 100644
index 000000000..2411eb469
--- /dev/null
+++ b/themes/default/theme.css
@@ -0,0 +1,12 @@
+
+/* template css */
+@import "menubar.css";
+@import "content.css";
+@import "thumbnails.css";
+@import "picture.css";
+@import "default-layout.css";
+/* Override properties with import local file */
+@import "local-layout.css";
+
+@import "default-colors.css";
+
diff --git a/themes/default/themeconf.inc.php b/themes/default/themeconf.inc.php
new file mode 100644
index 000000000..0386fc4c6
--- /dev/null
+++ b/themes/default/themeconf.inc.php
@@ -0,0 +1,7 @@
+<?php
+$themeconf = array(
+ 'theme' => 'default',
+ 'icon_dir' => 'themes/default/icon',
+ 'mime_icon_dir' => 'themes/default/icon/mimetypes/',
+);
+?>
diff --git a/themes/default/thumbnails.css b/themes/default/thumbnails.css
new file mode 100644
index 000000000..5ed9544c9
--- /dev/null
+++ b/themes/default/thumbnails.css
@@ -0,0 +1,36 @@
+
+/* Thumbnails customization */
+.content UL.thumbnails SPAN.thumbLegend {
+ font-size: 90%;
+ overflow: hidden;/* oversized legend is clipped */
+}
+
+/* Thumbnail "elastic" layout */
+.content UL.thumbnails {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ text-align: center; /* to center the whole collection in .content */
+}
+.content UL.thumbnails LI { display: inline }
+
+.content UL.thumbnails SPAN.wrap1 {
+ margin: 0 5px 5px 5px;
+ display: table-cell; display: inline-table;
+ display: inline-block;/* Why 3 display option ??? */
+ vertical-align: top; /* OK with Opera and IE6 not Geko */
+ text-align: center; /* to center the thumbnail and legend in Geko/Opera */
+}
+.content UL.thumbnails SPAN.wrap2 {
+ margin: 0; /* important reset the margins */
+ display: table-cell;/* block prevents vertical-align here */
+ vertical-align: middle;/* Ok with Opera and Geko not IE6 */
+}
+.content UL.thumbnails SPAN.wrap2 A,
+.content UL.thumbnails LABEL {
+ display: block;
+ border-bottom: none;
+}
+.content UL.thumbnails IMG {
+ margin-bottom: -4px; /* why ??? something wrong with Geko and Opera ignored by IE6*/
+}
diff --git a/themes/index.php b/themes/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/p0w0/images/button-bg.png b/themes/p0w0/images/button-bg.png
new file mode 100644
index 000000000..1ea3b3bd0
--- /dev/null
+++ b/themes/p0w0/images/button-bg.png
Binary files differ
diff --git a/themes/p0w0/images/index.php b/themes/p0w0/images/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/p0w0/images/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/p0w0/index.php b/themes/p0w0/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/p0w0/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/p0w0/mail-css.tpl b/themes/p0w0/mail-css.tpl
new file mode 100644
index 000000000..be4e4c22e
--- /dev/null
+++ b/themes/p0w0/mail-css.tpl
@@ -0,0 +1,11 @@
+/* Theme p0w0 mail css */
+
+body {ldelim} background-color:#cde; color:#369;}
+#the_page {ldelim} background: #cde url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+color: #69c;}
+h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/button-bg.png);}
+img {ldelim} margin:16px;padding:15px;border:1px solid #69c;background-color:#eef;-moz-border-radius:4px; border-radius:4px 4px; }
+img:hover {ldelim} border: 1px solid #c60; -moz-border-radius:4px; border-radius:4px 4px; }
+a {ldelim} color: #f92; background: transparent; }
diff --git a/themes/p0w0/theme.css b/themes/p0w0/theme.css
new file mode 100644
index 000000000..06f922082
--- /dev/null
+++ b/themes/p0w0/theme.css
@@ -0,0 +1,247 @@
+
+/**
+ * Color scheme (Remember #6699cc = #69c)
+ * #000000 #336699 #4477aa #6699cc (Black -> Blues)
+ * #cc6600 #ff9933 (Oranges)
+ * #cccccc
+ * #ccddee #dfe8ff #eeeeff #ffffff (Light colors -> White)
+ * */
+/**
+ * Logic
+ * - Texts
+ * - Backgrounds
+ * - Borders, Margins, Padding
+ * - Visibility / Display
+ */
+
+/******************************************************************************/
+/* Texts Only */
+BODY, H1, H3, DT, H2 { color: #369; }
+H2, #menubar DT, TD H3 {
+ color: #fff;
+}
+#menubar DT, #menubar DT A {
+ color: #fff;
+ font-weight: bold;
+}
+.content .titrePage .categoryActions li { color: #cde;}
+#menubar DT A:hover {
+ color: #f92;
+ font-weight: bold;
+}
+h1 { font-weight: bold; letter-spacing: 0.2em; }
+#mbIdentification dd p,
+#menubar .selected A { color: #c60; font-weight: bold; }
+#copyright { color: #c60; }
+.content .pageNumberSelected,
+A, INPUT.rateButton, legend { color: #369; }
+A:hover { color: #f92; }
+INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
+ color:#69c;
+}
+.infoTable,
+input#qsearchInput { color: #369; }
+.content .infos { color: #036; }
+.content .errors { color: #900; }
+.content .titrePage H2 A { color: #dfe8ff; }
+input.rateButtonSelected,
+.content .titrePage H2 A:hover { color: #f92; }
+.content H2 {
+ letter-spacing: 0.01em;
+ text-indent: 1em;
+ font-weight: normal;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description h3,
+.content h3 { text-align: center; }
+.browsePath, .imageNumber,
+#imageHeaderBar H2,
+.browsePath A {
+ color: #eef;
+ font-weight: bold;
+}
+.browsePath A:hover { color: #fff; }
+.content H2:before, .browsePath:before, .imageNumber:before,
+#imageHeaderBar H2:before,
+.content H2:after, .browsePath:after, .imageNumber:after,
+#imageHeaderBar H2:after {
+ content: " ";
+ color: #fff;
+ font-family: sans-serif;
+ font-weight: normal;
+ letter-spacing: 0em;
+}
+#thePicturePage #comments H3 {
+ color: #69c;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description p {
+ color: #c60;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description p + p {
+ color: #369;
+}
+.content div.thumbnailCategory .description h3 a {
+ color: #fff;
+}
+.content div.thumbnailCategory .description h3 a:hover {
+ color: #f92;
+}
+
+
+/******************************************************************************/
+/* Backgrounds Only */
+BODY { background: #cde; }
+.header_notes,
+#thePicturePage #the_page,
+#thePicturePage #theImage,
+.content { background-color: #dfe8ff; }
+#the_page { background-color: #dfe8ff; }
+#menubar, H3, #imageHeaderBar { background-color: #eef; }
+H2, #menubar DT, TD H3,
+#imageToolBar,
+#imageHeaderBar, #imageHeaderBar H2,
+.content H2 { background-color: #369; }
+.content .infos { background-color: #47a; ;}
+.content .errors { background-color: #fc5; ;}
+#thePicturePage #comments H3 { background-color: #eef; ;}
+.content ul.thumbnailCategories li div.thumbnailCategory .description h3 {
+ background-color: #69c;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory,
+.content UL.thumbnails SPAN.wrap2 { background-color: #eef; }
+.content ul.thumbnailCategories li div.thumbnailCategory:hover,
+#theImage IMG, .navThumb IMG,
+.content UL.thumbnails SPAN.wrap2:hover { background-color: #fff; }
+.content UL.thumbnails SPAN.wrap2:active img {
+ outline: 3px ridge #f92;
+}
+input#qsearchInput { background-color: #cde; }
+/******************************************************************************/
+/* Borders, Margins, Padding Only */
+BODY { margin: 0px; padding: 0px; }
+#menubar {
+ margin : 0px 0px 0px 8px;
+ border: 0px;
+ text-decoration: none;
+ border: 1px solid #369;
+}
+A { border: 0px; text-decoration: none; }
+A:hover { text-decoration: none; border: 0px; }
+.content {
+ border: 1px solid #369;
+ padding: 0px;
+}
+#menubar DT, .content H2 {
+ background-image: url(images/button-bg.png);
+ border: 0px;
+ margin-bottom: 3px;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description h3 {
+ background-image: url(images/button-bg.png);
+ border-width: 1px;
+ border-style: outset;
+ border-color: #369;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description h3:active
+{
+ background: #69c;
+ border: 1px inset #369;
+}
+.content .errors { border-color: #f92; }
+#imageHeaderBar H2 { border: 0px; }
+#thePicturePage #imageToolBar { padding: 0px 25px 5px 25px; }
+#thePicturePage #theImage {
+ margin: 0px;
+ padding: 3px 0px 15px 0px;
+}
+#thePicturePage #comments H3 {
+ border-top: 2px solid #69c;
+ border-bottom: 1px solid #369;
+}
+H2, #imageToolBar {
+ border-bottom: 1px solid #fff;
+}
+.navThumb IMG { border: 1px solid #c60; padding: 1px; opacity: 0.8; }
+.navThumb:hover IMG { border: 1px solid #f92; padding: 1px; opacity: 1; }
+#theImage IMG {
+ border: 3px solid #369;
+ margin: 2px auto;
+ padding: 1px;
+ box-shadow: 0.2em 0.2em #ccc;
+}
+.content UL.thumbnail IMG {
+ border: 1px solid #666;
+}
+.illustration A {
+ border: 0px;
+}
+FIELDSET, INPUT, SELECT, TEXTAREA,
+.content DIV.thumbnailCategory {
+ border: 1px solid #69c;
+ background-color: #dfe8ff;
+ margin: 3px;
+}
+.content DIV.thumbnailCategory:hover {
+ border: 1px solid #f92;
+}
+.content UL.thumbnails SPAN.wrap2 {
+ border: 1px solid #69c; /* thumbnails border color and style */
+ border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
+}
+.content UL.thumbnails SPAN.wrap2:hover {
+ border-color: #f92; /* thumbnails border color when mouse cursor is over it */
+}
+A.navThumb, A.navThumb:hover,
+#imageToolBar A, #imageToolBar A:hover {
+ border-bottom: none;
+}
+#the_page {
+ border: 0px;
+ padding: 5px 0px 30px 0px;
+ margin: 0px;
+}
+
+/******************************************************************************/
+/* Display, Visibility, buttons and others */
+label { cursor:pointer }
+.zero { display: none }
+
+input[type="text"], input[type="password"], input.button,
+input.submit, input.reset, input.file,
+select, textarea {
+ color: #369;
+ border: 1px solid #369;
+ background-color: #eeeeff;
+}
+input.submit[type="reset"]:focus,
+input.submit:focus {
+ background-color: #369;
+}
+input.submit[type="reset"],
+input.submit {
+ background-image: url(images/button-bg.png);
+ height:22px;
+ font-weight: bold;
+ color: #fff;
+ border-width: 1px;
+ border-style: outset;
+ border-color: #369;
+ padding-left: 2em;
+ padding-right: 2em;
+}
+input.submit[type="reset"]:active,
+input.submit:active {
+ background: #69c;
+ height:22px;
+ border: 1px inset #369;
+}
+#addComment fieldset input.submit[type="submit"] {
+ height: 38px;
+ padding-left: 4em;
+ padding-right: 4em;
+}
+#menubar .menuInfoCat, #menubar .menuInfoCatByChild {
+ font-size: 80%;
+ font-style: normal;
+}
+* { outline: none; }
+
diff --git a/themes/p0w0/themeconf.inc.php b/themes/p0w0/themeconf.inc.php
new file mode 100644
index 000000000..63d6fda12
--- /dev/null
+++ b/themes/p0w0/themeconf.inc.php
@@ -0,0 +1,6 @@
+<?php
+$themeconf = array(
+ 'theme' => 'p0w0',
+ 'parent' => 'default',
+);
+?>
diff --git a/themes/wipi/images/index.php b/themes/wipi/images/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/wipi/images/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/wipi/images/tableh1_bg.png b/themes/wipi/images/tableh1_bg.png
new file mode 100644
index 000000000..8163e23bf
--- /dev/null
+++ b/themes/wipi/images/tableh1_bg.png
Binary files differ
diff --git a/themes/wipi/images/tableh2_bg.png b/themes/wipi/images/tableh2_bg.png
new file mode 100644
index 000000000..be06ee428
--- /dev/null
+++ b/themes/wipi/images/tableh2_bg.png
Binary files differ
diff --git a/themes/wipi/index.php b/themes/wipi/index.php
new file mode 100644
index 000000000..871b52b6a
--- /dev/null
+++ b/themes/wipi/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/wipi/mail-css.tpl b/themes/wipi/mail-css.tpl
new file mode 100644
index 000000000..a8da286b3
--- /dev/null
+++ b/themes/wipi/mail-css.tpl
@@ -0,0 +1,18 @@
+/* Theme wipi mail css */
+
+body {ldelim} background-color:#111; color:#69c;}
+#the_page {ldelim} background: #111 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+color: #69c;}
+h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);}
+img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
+img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; }
+a {ldelim} color: #69c; background: transparent; }
+a:hover {ldelim} color: #f92; }
+a.PWG {ldelim} border: 0px; }
+a.PWG .P {ldelim} color : #f92; }
+a.PWG .W {ldelim} color : #aaa; }
+a.PWG .G {ldelim} color : #69c; }
+a.PWG:hover .P {ldelim} color : #69c; }
+a.PWG:hover .G {ldelim} color : #f92; }
diff --git a/themes/wipi/theme.css b/themes/wipi/theme.css
new file mode 100644
index 000000000..670d3a57d
--- /dev/null
+++ b/themes/wipi/theme.css
@@ -0,0 +1,273 @@
+
+/* text color */
+BODY, H1, H3, DT,
+INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
+ color:#e0e0e0;
+}
+#menubar {
+ margin : 0px;
+ background-color: transparent;
+ border: 0px;
+}
+H2 {
+ color: #eee;
+}
+#menubar DT, #menubar DT A {
+ color: #eee;
+ font-weight: lighter;
+}
+#menubar DT A:hover {
+ color: #69c;
+ font-weight: lighter;
+}
+#menubar .selected A {
+ color: #eee;
+}
+#menubar .selected A:hover {
+ color: #f92;
+}
+#menubar DT:before {
+ content: "__\\_ ";
+ color: #f92;
+}
+#menubar DT:after {
+ content: " _/__";
+ color: #69c;
+}
+#menubar .button {
+ margin: 0 2px 0px 8px;
+ width: auto;
+ padding: 0;
+ text-indent: 0;
+ list-style: none;
+ text-align: center;
+ float: left;
+}
+.content .pageNumberSelected {
+ color: #f92;
+}
+.content .infos {
+ background-color: #69c;
+ color: #036;
+}
+.content .errors {
+ background-color: #fc5;
+ border-color: #f92;
+ color: #900;
+}
+/* backgrounds */
+BODY {
+ background: #111;
+ margin: 0px;
+ padding: 0px;
+}
+H3, #imageToolBar A:hover {
+ background-color: #222;
+}
+
+#imageHeaderBar {
+ background-color: #111;
+}
+#imageToolBar, .header_notes {
+ background-color: #333;
+}
+A {
+ border-color: #69c;
+}
+A:hover {
+ border-color: #f92;
+}
+.content {
+ background-color: #181818;
+ border: 1px solid #eee;
+ padding: 5px;
+}
+
+H2, #menubar DT, TD H3 {
+ background-image: url(images/tableh1_bg.png);
+ background-repeat: repeat-x;
+}
+.content H2 {
+ background: none;
+ border: 0px;
+ letter-spacing: -0.05em;
+ text-indent: 1em;
+ text-transform: uppercase;
+ font-weight: lighter;
+ margin-bottom: 20px;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description h3,
+.content h3 { text-align: center; }
+.content ul.thumbnailCategories li div.thumbnailCategory .description p {
+ color: #f92; text-indent: 0em;
+}
+.content ul.thumbnailCategories li div.thumbnailCategory .description p + p {
+ color: #fff;
+}
+.browsePath A {
+ color: #eee;
+}
+.content H2:before, .browsePath:before, .imageNumber:before,
+#imageHeaderBar H2:before {
+ content: "____\\_ ";
+ color: #69c;
+ font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
+ letter-spacing: 0em;
+}
+.content H2:after, .browsePath:after, .imageNumber:after,
+#imageHeaderBar H2:after {
+ content: " _/____";
+ color: #f92;
+ font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
+ letter-spacing: 0em;
+}
+#imageHeaderBar H2 {
+ background-image: none;
+ background-color: transparent;
+ border: none;
+}
+#thePicturePage #the_page {
+ background-color: #111;
+}
+#thePicturePage #imageHeaderBar {
+ background-image: url(images/tableh2_bg.png);
+ background-repeat: repeat-x;
+}
+#thePicturePage #imageToolBar {
+ background-color: #111;
+ border-bottom: 2px solid #69c;
+}
+#thePicturePage #theImage {
+ background-color: #111;
+ margin: 0px;
+ padding: 3px 0px 15px 0px;
+}
+
+#thePicturePage #comments H3 {
+ background-image: none;
+ background-color: #222;
+ border-top: 2px solid #69c;
+ border-bottom: 2px solid #69c;
+ color: #69c;
+ font-weight: lighter;
+}
+
+/* borders */
+#imageHeaderBar {
+ border-top: 1px solid #000;
+ padding: 8px 0px 3px 0px;
+}
+H2, #imageToolBar {
+ border-bottom: 1px solid #000;
+}
+
+#theImage IMG {
+ border: 3px solid #fff;
+}
+
+.content UL.thumbnail IMG {
+ border: 1px solid #a0a0a0;
+}
+.illustration A {
+ border: 0px;
+}
+FIELDSET, INPUT, SELECT, TEXTAREA,
+.content DIV.thumbnailCategory {
+ border: 1px solid gray;
+}
+.content DIV.thumbnailCategory {
+ border: 1px solid #69c;
+ margin: 8px 4px;
+}
+
+.content UL.thumbnails SPAN.wrap2 {
+ border: 1px solid #aaaaaa; /* thumbnails border color and style */
+ border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
+}
+
+.content UL.thumbnails SPAN.wrap2:hover,
+.content UL.thumbnailCategories DIV.thumbnailCategory:hover {
+ background-color: #333;
+ border-color: #69c; /* thumbnails border color when mouse cursor is over it */
+}
+
+/* links */
+A, INPUT.rateButton, legend {
+ color: #69c;
+}
+
+A:hover {
+ color: #f92;
+}
+
+#imageToolBar A, #imageToolBar A:hover {
+ border-bottom: none;
+}
+A.navThumb, A.navThumb:hover {
+ border-bottom: none;
+}
+#the_page {
+ border: 1px dotted #f92;
+ padding-top: 5px;
+ padding-bottom:30px;
+ margin: 2px;
+}
+#copyright {
+ color: #69c;
+}
+
+label {
+ cursor:pointer
+}
+input#qsearchInput {
+ color: #58c;
+ background-color: #222;
+ border: 1px solid #333;
+ padding: 1px 3px;
+}
+.zero { display: none }
+.nb-hits { color: #69c; }
+.nb-comments { color: #f92; }
+
+FORM#quickconnect,
+FORM#quickconnect FIELDSET,
+FORM#quickconnect DIV,
+FORM#quickconnect UL.actions,
+FORM#quickconnect LABEL {
+ color: #69c;
+}
+FORM#quickconnect DIV INPUT,
+FORM#quickconnect INPUT[type=text],
+FORM#quickconnect INPUT[type=password] {
+ color: #58c;
+ background-color: #222;
+ border: 1px solid #333;
+}
+
+.PWG {
+ font-family: verdana, arial, helvetica, sans-serif !important;
+ font-size: 0.9em;
+ font-weight: normal;
+ letter-spacing: 0px;
+}
+a.PWG { border: 0px; }
+a.PWG .P { color : #f92; }
+a.PWG .W { color : #aaa; }
+a.PWG .G { color : #69c; }
+a.PWG:hover .P { color : #69c; }
+a.PWG:hover .G { color : #f92; }
+#menubar DT {
+ border-top: 1px solid #eef;
+ border-right: 1px solid #69c;
+ border-bottom: 1px solid #69c;
+ border-bottom-right-radius: 12px;
+ -moz-border-radius-bottomright: 12px;
+ box-shadow: 5px 5px #69c;
+}
+.statBar { background-color: #e60; }
+#imageToolBar .randomButtons a:hover,
+#imageToolBar .navButtons a:hover { background-color: #111; }
+#menubar .menuInfoCat,
+#menubar .menuInfoCatByChild,
+h2.showtitle, #theImage p.showlegend { display: none }
+* { outline-width: 0px; }
diff --git a/themes/wipi/themeconf.inc.php b/themes/wipi/themeconf.inc.php
new file mode 100644
index 000000000..384e22769
--- /dev/null
+++ b/themes/wipi/themeconf.inc.php
@@ -0,0 +1,11 @@
+<?php
+$themeconf = array(
+ 'theme' => 'wipi',
+ 'parent' => 'default',
+);
+if ( !isset($lang['Theme: wipi']) )
+{
+ $lang['Theme: wipi'] = 'The site is displayed with wipi theme based ' .
+ ' on yoga template, a standard template/theme of PhpWebgallery.';
+}
+?>