--- a/jpoker/jquery/themes/flora/flora.accordion.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.accordion.css Tue Jul 01 18:13:35 2008 +0200 @@ -1,12 +1,39 @@ -ul.ui-accordion { margin: 0; padding: 0; list-style-type: none; } -ul.ui-accordion li { margin: 0; margin-bottom: 2px; padding: 0; background-image: url(i/accordion-left.png); background-repeat: no-repeat; } -ul.ui-accordion li a.ui-accordion-header { display: block; padding-left: 5px; margin-right: 3px; height: 28px; background-image: url(i/accordion-middle.png); color: #000; text-decoration: none; line-height: 28px; } -ul.ui-accordion li .ui-accordion-right { display: block; background-image: url(i/accordion-right.png); position: absolute; top: 0px; right: 0px; height: 28px; width: 3px; } +.ui-accordion { margin: 0; padding: 0; list-style-type: none; } +.ui-accordion li { margin: 0; margin-bottom: 2px; padding: 0; } +.ui-accordion li .ui-accordion-header { + display: block; + padding-left: 5px; + margin-right: 3px; + height: 28px; + background-image: url(i/accordion-middle.png); + color: #000; + text-decoration: none; + line-height: 28px; + position: relative; + left: 3px; +} +.ui-accordion li .ui-accordion-right { + display: block; + background-image: url(i/accordion-right.png); + position: absolute; + top: 0px; + right: -3px; + height: 28px; + width: 3px; +} +.ui-accordion li .ui-accordion-left { + display: block; + background-image: url(i/accordion-left.png); + background-repeat: no-repeat; + position: absolute; + height: 28px; + width: 3px; +} -ul.ui-accordion li:hover { background-image: url(i/accordion-left-over.png); } -ul.ui-accordion li:hover a.ui-accordion-header { background-image: url(i/accordion-middle-over.png); } -ul.ui-accordion li:hover .ui-accordion-right { background-image: url(i/accordion-right-over.png); } +.ui-accordion li:hover .ui-accordion-left { background-image: url(i/accordion-left-over.png); } +.ui-accordion li:hover .ui-accordion-header { background-image: url(i/accordion-middle-over.png); } +.ui-accordion li:hover .ui-accordion-right { background-image: url(i/accordion-right-over.png); } -ul.ui-accordion li.active { background-image: url(i/accordion-left-act.png); } -ul.ui-accordion li.active a.ui-accordion-header { background-image: url(i/accordion-middle-act.png); } -ul.ui-accordion li.active .ui-accordion-right { background-image: url(i/accordion-right-act.png); } +.ui-accordion li.selected .ui-accordion-left { background-image: url(i/accordion-left-act.png); } +.ui-accordion li.selected .ui-accordion-header { background-image: url(i/accordion-middle-act.png); } +.ui-accordion li.selected .ui-accordion-right { background-image: url(i/accordion-right-act.png); }
--- a/jpoker/jquery/themes/flora/flora.all.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.all.css Tue Jul 01 18:13:35 2008 +0200 @@ -1,9 +1,7 @@ @import "flora.css"; -@import "flora.shadow.css"; +@import "flora.accordion.css"; +@import "flora.datepicker.css"; +@import "flora.dialog.css"; @import "flora.resizable.css"; @import "flora.slider.css"; -@import "flora.accordion.css"; @import "flora.tabs.css"; -@import "flora.dialog.css"; -@import "flora.tablesorter.css"; -@import "flora.datepicker.css";
--- a/jpoker/jquery/themes/flora/flora.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.css Tue Jul 01 18:13:35 2008 +0200 @@ -1,2 +1,2 @@ .ui-wrapper { border: 1px solid #50A029; } -.ui-wrapper input, .ui-wrapper textarea { border: 0; } \ No newline at end of file +.ui-wrapper input, .ui-wrapper textarea { border: 0; }
--- a/jpoker/jquery/themes/flora/flora.datepicker.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.datepicker.css Tue Jul 01 18:13:35 2008 +0200 @@ -1,179 +1,216 @@ -/* Main Flora Style Sheet for jQuery UI Datepicker */ -#datepicker_div, .datepicker_inline { - font-family: Arial,Helvetica,sans-serif; - font-size: 14px; - padding: 0; - margin: 0; - background: #DDD; - width: 185px; -} -#datepicker_div { - display: none; - border: 1px solid #FF9900; - z-index: 10; -} -.datepicker_inline { - float: left; - display: block; - border: 0; -} -.datepicker_dialog { - padding: 5px !important; - border: 4px ridge #DDD !important; -} -button.datepicker_trigger { - width: 25px; -} -img.datepicker_trigger { - margin: 2px; - vertical-align: middle; -} -.datepicker_prompt { - float: left; - padding: 2px; - background: #DDD; - color: #000; -} -*html .datepicker_prompt { - width: 185px; -} -.datepicker_control, .datepicker_links, .datepicker_header, .datepicker { - clear: both; - float: left; - width: 100%; - color: #FFF; -} -.datepicker_control { - background: #FF9900; - padding: 2px 0px; -} -.datepicker_links { - background: #E0F4D7; - padding: 2px 0px; -} -.datepicker_control, .datepicker_links { - font-weight: bold; - font-size: 80%; - letter-spacing: 1px; -} -.datepicker_links label { - padding: 2px 5px; - color: #888; -} -.datepicker_clear, .datepicker_prev { - float: left; - width: 34%; -} -.datepicker_current { - float: left; - width: 30%; - text-align: center; -} -.datepicker_close, .datepicker_next { - float: right; - width: 34%; - text-align: right; -} -.datepicker_header { - padding: 1px 0 3px; - background: #83C948; - text-align: center; - font-weight: bold; - height: 1.3em; -} -.datepicker_header select { - background: #83C948; - color: #000; - border: 0px; - font-weight: bold; -} -.datepicker { - background: #CCC; - text-align: center; - font-size: 100%; -} -.datepicker a { - display: block; - width: 100%; -} -.datepicker .datepicker_titleRow { - background: #B1DB87; - color: #000; -} -.datepicker .datepicker_daysRow { - background: #FFF; - color: #666; -} -.datepicker_weekCol { - background: #B1DB87; - color: #000; -} -.datepicker .datepicker_daysCell { - color: #000; - border: 1px solid #DDD; -} -#datepicker .datepicker_daysCell a { - display: block; -} -.datepicker .datepicker_weekEndCell { - background: #E0F4D7; -} -.datepicker .datepicker_daysCellOver { - background: #FFF; - border: 1px solid #777; -} -.datepicker .datepicker_unselectable { - color: #888; -} -.datepicker_today { - background: #B1DB87 !important; -} -.datepicker_currentDay { - background: #83C948 !important; -} -#datepicker_div a, .datepicker_inline a { - cursor: pointer; - margin: 0; - padding: 0; - background: none; - color: #000; -} -.datepicker_inline .datepicker_links a { - padding: 0 5px !important; -} -.datepicker_control a, .datepicker_links a { - padding: 2px 5px !important; - color: #000 !important; -} -.datepicker_titleRow a { - color: #000 !important; -} -.datepicker_control a:hover { - background: #FDD !important; - color: #333 !important; -} -.datepicker_links a:hover, .datepicker_titleRow a:hover { - background: #FFF !important; - color: #333 !important; -} -.datepicker_multi .datepicker { - border: 1px solid #83C948; -} -.datepicker_oneMonth { - float: left; - width: 185px; -} -.datepicker_newRow { - clear: left; -} -.datepicker_cover { - display: none; - display/**/: block; - position: absolute; - z-index: -1; - filter: mask(); - top: -4px; - left: -4px; - width: 193px; - height: 200px; -} +/* Main Flora Style Sheet for jQuery UI ui-datepicker */ +#ui-datepicker-div, .ui-datepicker-inline { + font-family: Arial,Helvetica,sans-serif; + font-size: 14px; + padding: 0; + margin: 0; + background: #E0F4D7; + width: 185px; +} +#ui-datepicker-div { + display: none; + border: 1px solid #FF9900; + z-index: 10; +} +.ui-datepicker-inline { + float: left; + display: block; + border: 0; +} +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-dialog { + padding: 5px !important; + border: 4px ridge #83C948 !important; +} +button.ui-datepicker-trigger { + width: 25px; +} +img.ui-datepicker-trigger { + margin: 2px; + vertical-align: middle; +} +.ui-datepicker-prompt { + float: left; + padding: 2px; + background: #E0F4D7; + color: #000; +} +*html .ui-datepicker-prompt { + width: 185px; +} +.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker { + clear: both; + float: left; + width: 100%; + color: #FFF; +} +.ui-datepicker-control { + background: #FF9900; + padding: 2px 0px; +} +.ui-datepicker-links { + background: #E0F4D7; + padding: 2px 0px; +} +.ui-datepicker-control, .ui-datepicker-links { + font-weight: bold; + font-size: 80%; + letter-spacing: 1px; +} +.ui-datepicker-links label { + padding: 2px 5px; + color: #888; +} +.ui-datepicker-clear, .ui-datepicker-prev { + float: left; + width: 34%; +} +.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev { + float: right; + text-align: right; +} +.ui-datepicker-current { + float: left; + width: 30%; + text-align: center; +} +.ui-datepicker-close, .ui-datepicker-next { + float: right; + width: 34%; + text-align: right; +} +.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next { + float: left; + text-align: left; +} +.ui-datepicker-header { + padding: 1px 0 3px; + background: #83C948; + text-align: center; + font-weight: bold; + height: 1.3em; +} +.ui-datepicker-header select { + background: #83C948; + color: #000; + border: 0px; + font-weight: bold; +} +.ui-datepicker { + background: #CCC; + text-align: center; + font-size: 100%; +} +.ui-datepicker a { + display: block; + width: 100%; +} +.ui-datepicker-title-row { + background: #B1DB87; + color: #000; +} +.ui-datepicker-title-row .ui-datepicker-week-end-cell { + background: #B1DB87; +} +.ui-datepicker-days-row { + background: #FFF; + color: #666; +} +.ui-datepicker-week-col { + background: #B1DB87; + color: #000; +} +.ui-datepicker-days-cell { + color: #000; + border: 1px solid #DDD; +} +.ui-datepicker-days-cell a { + display: block; +} +.ui-datepicker-week-end-cell { + background: #E0F4D7; +} +.ui-datepicker-unselectable { + color: #888; +} +.ui-datepicker-week-over, .ui-datepicker-week-over .ui-datepicker-week-end-cell { + background: #B1DB87 !important; +} +.ui-datepicker-days-cell-over, .ui-datepicker-days-cell-over.ui-datepicker-week-end-cell { + background: #FFF !important; + border: 1px solid #777; +} +* html .ui-datepicker-title-row .ui-datepicker-week-end-cell { + background: #B1DB87 !important; +} +* html .ui-datepicker-week-end-cell { + background: #E0F4D7 !important; + border: 1px solid #DDD !important; +} +* html .ui-datepicker-days-cell-over { + background: #FFF !important; + border: 1px solid #777 !important; +} +* html .ui-datepicker-current-day { + background: #83C948 !important; +} +.ui-datepicker-today { + background: #B1DB87 !important; +} +.ui-datepicker-current-day { + background: #83C948 !important; +} +.ui-datepicker-status { + background: #E0F4D7; + width: 100%; + font-size: 80%; + text-align: center; +} +#ui-datepicker-div a, .ui-datepicker-inline a { + cursor: pointer; + margin: 0; + padding: 0; + background: none; + color: #000; +} +.ui-datepicker-inline .ui-datepicker-links a { + padding: 0 5px !important; +} +.ui-datepicker-control a, .ui-datepicker-links a { + padding: 2px 5px !important; + color: #000 !important; +} +.ui-datepicker-title-row a { + color: #000 !important; +} +.ui-datepicker-control a:hover { + background: #FDD !important; + color: #333 !important; +} +.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover { + background: #FFF !important; + color: #333 !important; +} +.ui-datepicker-multi .ui-datepicker { + border: 1px solid #83C948; +} +.ui-datepicker-one-month { + float: left; + width: 185px; +} +.ui-datepicker-new-row { + clear: left; +} +.ui-datepicker-cover { + display: none; + display/**/: block; + position: absolute; + z-index: -1; + filter: mask(); + top: -4px; + left: -4px; + width: 193px; + height: 200px; +}
--- a/jpoker/jquery/themes/flora/flora.resizable.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.resizable.css Tue Jul 01 18:13:35 2008 +0200 @@ -17,4 +17,4 @@ .ui-resizable-se { cursor: se-resize; width: 9px; height: 9px; right: 0px; bottom: 0px; background: transparent url(i/resizable-se.gif); } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: 0px; bottom: 0px; background: transparent url(i/resizable-sw.gif); } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(i/resizable-nw.gif); } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(i/resizable-ne.gif); } \ No newline at end of file +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(i/resizable-ne.gif); }
--- a/jpoker/jquery/themes/flora/flora.slider.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.slider.css Tue Jul 01 18:13:35 2008 +0200 @@ -5,7 +5,7 @@ .ui-slider-handle-active { border: 1px dotted black; } .ui-slider-disabled .ui-slider-handle { opacity: 0.5; filter: alpha(opacity=50); } .ui-slider-range { position: absolute; background: #50A029; opacity: 0.3; filter: alpha(opacity=30); width: 100%; height: 100%; } - + /* Default slider backgrounds */ .ui-slider, .ui-slider-1 { background-image: url(i/slider-bg-1.png); } -.ui-slider-2 { background-image: url(i/slider-bg-2.png); } \ No newline at end of file +.ui-slider-2 { background-image: url(i/slider-bg-2.png); }
--- a/jpoker/jquery/themes/flora/flora.tabs.css Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/jquery/themes/flora/flora.tabs.css Tue Jul 01 18:13:35 2008 +0200 @@ -1,105 +1,104 @@ -@import "flora.css"; - -/* Caution! Ensure accessibility in print and other media types... */ -@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ - .ui-tabs-hide { - display: none; - } -} - -/* Hide useless elements in print layouts... */ -@media print { - .ui-tabs-nav { - display: none; - } -} - -/* Skin */ -.ui-tabs-nav, .ui-tabs-panel { - font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; - font-size: 12px; -} -.ui-tabs-nav { - list-style: none; - margin: 0; - padding: 0 0 0 3px; -} -.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ - display: block; - clear: both; - content: " "; -} -.ui-tabs-nav li { - float: left; - margin: 0 0 0 2px; - font-weight: bold; -} -.ui-tabs-nav a, .ui-tabs-nav a span { - float: left; /* fixes dir=ltr problem and other quirks IE */ - padding: 0 12px; - background: url(i/tabs.png) no-repeat; -} -.ui-tabs-nav a { - margin: 5px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ - padding-left: 0; - background-position: 100% 0; - text-decoration: none; - white-space: nowrap; /* @ IE 6 */ - outline: 0; /* @ Firefox, prevent dotted border after click */ -} -.ui-tabs-nav a:link, .ui-tabs-nav a:visited { - color: #fff; -} -.ui-tabs-nav .ui-tabs-selected a { - position: relative; - top: 1px; - z-index: 2; - margin-top: 0; - background-position: 100% -23px; -} -.ui-tabs-nav a span { - padding-top: 1px; - padding-right: 0; - height: 20px; - background-position: 0 0; - line-height: 20px; -} -.ui-tabs-nav .ui-tabs-selected a span { - padding-top: 0; - height: 27px; - background-position: 0 -23px; - line-height: 27px; -} -.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, -.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ - cursor: text; -} -.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, -.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */ - cursor: pointer; -} -.ui-tabs-disabled { - opacity: .4; - filter: alpha(opacity=40); -} -.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { - color: #000; -} -.ui-tabs-panel { - border: 1px solid #519e2d; - padding: 10px; - background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ -} -/*.ui-tabs-loading em { - padding: 0 0 0 20px; - background: url(loading.gif) no-repeat 0 50%; -}*/ - -/* Additional IE specific bug fixes... */ -* html .ui-tabs-nav { /* auto clear @ IE 6 & IE 7 Quirks Mode */ - display: inline-block; -} -*:first-child+html .ui-tabs-nav { /* auto clear @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ - display: inline-block; -} - +@import "flora.css"; + +/* Caution! Ensure accessibility in print and other media types... */ +@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ + .ui-tabs-hide { + display: none; + } +} + +/* Hide useless elements in print layouts... */ +@media print { + .ui-tabs-nav { + display: none; + } +} + +/* Skin */ +.ui-tabs-nav, .ui-tabs-panel { + font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif; + font-size: 12px; +} +.ui-tabs-nav { + list-style: none; + margin: 0; + padding: 0 0 0 3px; +} +.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ + display: block; + clear: both; + content: " "; +} +.ui-tabs-nav li { + float: left; + margin: 0 0 0 2px; + font-weight: bold; +} +.ui-tabs-nav a, .ui-tabs-nav a span { + float: left; /* fixes dir=ltr problem and other quirks IE */ + padding: 0 12px; + background: url(i/tabs.png) no-repeat; +} +.ui-tabs-nav a { + margin: 5px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ + padding-left: 0; + background-position: 100% 0; + text-decoration: none; + white-space: nowrap; /* @ IE 6 */ + outline: 0; /* @ Firefox, prevent dotted border after click */ +} +.ui-tabs-nav a:link, .ui-tabs-nav a:visited { + color: #fff; +} +.ui-tabs-nav .ui-tabs-selected a { + position: relative; + top: 1px; + z-index: 2; + margin-top: 0; + background-position: 100% -23px; +} +.ui-tabs-nav a span { + padding-top: 1px; + padding-right: 0; + height: 20px; + background-position: 0 0; + line-height: 20px; +} +.ui-tabs-nav .ui-tabs-selected a span { + padding-top: 0; + height: 27px; + background-position: 0 -23px; + line-height: 27px; +} +.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, +.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ + cursor: text; +} +.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, +.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */ + cursor: pointer; +} +.ui-tabs-disabled { + opacity: .4; + filter: alpha(opacity=40); +} +.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { + color: #000; +} +.ui-tabs-panel { + border: 1px solid #519e2d; + padding: 10px; + background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ +} +/*.ui-tabs-loading em { + padding: 0 0 0 20px; + background: url(loading.gif) no-repeat 0 50%; +}*/ + +/* Additional IE specific bug fixes... */ +* html .ui-tabs-nav { /* auto clear @ IE 6 & IE 7 Quirks Mode */ + display: inline-block; +} +*:first-child+html .ui-tabs-nav { /* auto clear @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ + display: inline-block; +}
--- a/jpoker/js/jquery.jpoker.js Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/js/jquery.jpoker.js Tue Jul 01 18:13:35 2008 +0200 @@ -2253,7 +2253,7 @@ max: limits[2], stepping: 1, change: function(event, ui) { - $('.jpoker_rebuy_current', ui.element).html(ui.value); + $('.jpoker_rebuy_current').html(ui.value); } }); return rebuy; @@ -2418,7 +2418,7 @@ card_image = 'small-' + jpoker.cards.card2string[card & 0x3F]; } $(prefix + i + id).css({ - 'background-image': 'url("images/cards/' + card_image + '.png")', + 'background-image': 'url("css/images/jpoker_table/cards/' + card_image + '.png")', 'display': 'block' }); } else {
--- a/jpoker/js/skin-jpoker.js Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/js/skin-jpoker.js Tue Jul 01 18:13:35 2008 +0200 @@ -77,6 +77,7 @@ $('#table').empty(); $('#place').empty(); + $('#text').hide(); $('#jpokerCopyright').dialog('destroy'); $('#jpokerDialog').dialog('destroy').remove(); @@ -499,3 +500,7 @@ $(place).jpoker('table', 'url', game_id, 'ONE'); }; +function jpoker_60_text(place) { + setUp(); + $('#text').show(); +}
--- a/jpoker/js/test-jpoker.js Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/js/test-jpoker.js Tue Jul 01 18:13:35 2008 +0200 @@ -1802,16 +1802,16 @@ server.notifyUpdate(table_packet); var seat; for(seat = 1; seat <= 3; seat++) { - var c = ".jpoker_ptable_player_seat" + seat + "_name"; + var c = "#player_seat" + seat + id; equals($(c).size(), 1, "seat length " + seat); - equals($(c).hasClass('jpokerPosition'), false, "seat " + seat); + equals($(c).hasClass('jpoker_position'), false, "seat " + seat); } table.handler(server, game_id, { type: 'PacketPokerPosition', serial: 10, game_id: game_id }); - equals($(".jpoker_ptable_player_seat1_name").hasClass('jpoker_position'), true, "seat 1 in position"); - equals($(".jpoker_ptable_player_seat1_name").hasClass('jpoker_sit_out'), false, "seat 1 sit"); + equals($("#player_seat1" + id).hasClass('jpoker_position'), true, "seat 1 in position"); + equals($("#player_seat1" + id).hasClass('jpoker_sit_out'), false, "seat 1 sit"); - equals($(".jpoker_ptable_player_seat2_name").hasClass('jpoker_position'), false, "seat 2 not in position"); - equals($(".jpoker_ptable_player_seat2_name").hasClass('jpoker_sit_out'), false, "seat 2 sit"); + equals($("#player_seat2" + id).hasClass('jpoker_position'), false, "seat 2 not in position"); + equals($("#player_seat2" + id).hasClass('jpoker_sit_out'), false, "seat 2 sit"); start_and_cleanup(); }); @@ -1879,7 +1879,7 @@ table.handler(server, game_id, { type: 'PacketPokerPlayerArrive', name: player_name, seat: player_seat, serial: player_serial, game_id: game_id }); var player = server.tables[game_id].serial2player[player_serial]; table.handler(server, game_id, { type: 'PacketPokerSit', serial: player_serial, game_id: game_id }); - equals($("#player_seat" + player_seat + "_name" + id).hasClass('jpoker_sit_out'), false, 'no class sitout'); + equals($("#player_seat" + player_seat + id).hasClass('jpoker_sit_out'), false, 'no class sitout'); equals($("#fold" + id).is(':hidden'), true, 'fold interactor not visible'); table.handler(server, game_id, { type: 'PacketPokerSelfInPosition', serial: player_serial, game_id: game_id }); equals($("#fold" + id).is(':visible'), true, 'fold interactor visible'); @@ -1888,7 +1888,7 @@ // table is destroyed and rebuilt from cached state server.handler(server, 0, { type: 'PacketSerial', serial: player_serial}); equals(server.tables[game_id].id, table_packet.id); - equals($("#player_seat" + player_seat + "_name" + id).hasClass('jpoker_sit_out'), false, 'no class sitout'); + equals($("#player_seat" + player_seat + id).hasClass('jpoker_sit_out'), false, 'no class sitout'); equals($("#fold" + id).is(':visible'), false, 'fold interactor visible'); jpoker.plugins.playerSelf.hide(id); @@ -2048,7 +2048,7 @@ equals(sent, true, "packet sent"); table.handler(server, game_id, { type: 'PacketPokerSit', serial: player_serial, game_id: game_id }); - equals(sit.hasClass('jpoker_sit_out'), false, 'no class sitout'); + equals($("#player_seat2" + id).hasClass('jpoker_sit_out'), false, 'no class sitout'); equals(sit.html(), player_name); // @@ -2064,7 +2064,7 @@ sit.click(); table.handler(server, game_id, { type: 'PacketPokerSitOut', serial: player_serial, game_id: game_id }); - equals(sit.hasClass('jpoker_sit_out'), true, 'class sitout'); + equals($("#player_seat2" + id).hasClass('jpoker_sit_out'), true, 'class sitout'); equals(sit.html(), 'click to sit'); // @@ -2213,7 +2213,7 @@ }); test("jpoker.plugins.player: rebuy", function(){ - expect(16); + expect(19); var id = 'jpoker' + jpoker.serial; var player_serial = 1; @@ -2262,8 +2262,15 @@ // value change var slider = $('.ui-slider-1', rebuy); + $('.ui-slider-handle').css('width', 1); // there is no graphics, size is undefined + slider.slider("moveTo", "+=" + min); + equals($(".jpoker_rebuy_current", rebuy).html(), min, 'value changed'); + slider.slider("moveTo", "+=10"); + equals($(".jpoker_rebuy_current", rebuy).html(), min + 10, 'value changed'); $('.ui-slider-handle', slider).parent().triggerKeydown("37"); - equals($(".jpoker_rebuy_current", rebuy).html(), min, 'value changed'); + equals($(".jpoker_rebuy_current", rebuy).html(), min + 9, 'value changed'); + $('.ui-slider-handle', slider).parent().triggerKeydown("37"); + equals($(".jpoker_rebuy_current", rebuy).html(), min + 8, 'value changed'); // click sent = false;
--- a/jpoker/skin.html Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/skin.html Tue Jul 01 18:13:35 2008 +0200 @@ -21,12 +21,12 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jpoker skin showcase</title> - <script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.4b.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.core.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.draggable.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.resizable.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.dialog.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.slider.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.6.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.core.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.draggable.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.resizable.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.dialog.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.slider.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.ajaxQueue.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.cookie.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.gettext.js"></script> @@ -64,7 +64,38 @@ <li><a href='#' onClick='jpoker_50_sitOut("#place")'>jpoker_50_sitOut</a></li> <li><a href='#' onClick='jpoker_51_sit("#place")'>jpoker_51_sit</a></li> <li><a href='#' onClick='jpoker_52_inPosition("#place")'>jpoker_52_inPosition</a></li> +<li><a href='#' onClick='jpoker_60_text("#place")'>jpoker_60_text</a></li> </ul> + + <div id='text' style="display: none"> +<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut fermentum. Sed ultrices molestie lorem. Etiam pharetra. Duis ultricies. Ut risus ante, facilisis sed, luctus eu, imperdiet ac, enim. Quisque tellus nulla, nonummy vel, mattis id, imperdiet in, velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque mi turpis, semper id, commodo porttitor, pharetra at, urna. Nam velit enim, ultrices ut, condimentum molestie, porttitor vel, lorem. Proin rutrum blandit erat. Pellentesque placerat neque vel nulla. Sed enim justo, molestie vitae, euismod id, accumsan vitae, enim. Aenean et augue at massa ornare elementum. Donec scelerisque, pede vel vehicula varius, turpis lectus elementum nisi, eu ultricies nibh sapien ac sem.</p> + +<p>Proin euismod rutrum lectus. Integer vulputate posuere dui. Donec posuere posuere ligula. Suspendisse placerat. Sed elementum purus at neque. Vestibulum elementum mi et dui. Nullam adipiscing tempus lorem. Integer felis. Pellentesque eu lorem quis ipsum pellentesque bibendum. Ut eget nisl. Nulla nibh. Nunc eget orci ac magna porttitor luctus. Morbi eleifend vestibulum nisl. Nunc et risus. Sed laoreet. Quisque nec est. </p> + +<code>hello how are you</code> + +<blockquote> +Proin euismod rutrum lectus. Integer vulputate posuere dui. Donec posuere posuere ligula. Suspendisse placerat. Sed elementum purus at neque. Vestibulum elementum mi et dui. Nullam adipiscing tempus lorem. Integer felis. Pellentesque eu lorem quis ipsum pellentesque bibendum. Ut eget nisl. Nulla nibh. Nunc eget orci ac magna porttitor luctus. Morbi eleifend vestibulum nisl. Nunc et risus. Sed laoreet. Quisque nec est. +</blockquote> + +<h1>heading 1</h1> +<h2>heading 2</h2> +<h3>heading 3</h3> +<h4>heading 4</h4> + +<table><th><td>efrefr</td><td>eferfrfvrvrver</td><td>rgergre</td></tr> +<tr><td>rerr</td><td>rwfrgr</td><td>rgregre</td></tr> +<tr><td>regergre</td><td>umumuy</td><td>thtt</td></tr> + +<hr> + +<a href="http://www.google.com">Google</a> + +<ul> +<li>lists</li> +<li>primary pale</li> +</ul> + </div> </div> </body>
--- a/jpoker/test-jpoker.html Tue Jul 01 11:55:55 2008 +0200 +++ b/jpoker/test-jpoker.html Tue Jul 01 18:13:35 2008 +0200 @@ -23,12 +23,12 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jPoker Test Suite</title> <link rel="stylesheet" href="js/testrunner.css"/> - <script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.4b.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.core.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.draggable.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.resizable.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.dialog.js"></script> - <script language="JavaScript" type="text/javascript" src="jquery/ui.slider.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.6.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.core.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.draggable.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.resizable.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.dialog.js"></script> + <script language="JavaScript" type="text/javascript" src="jquery/ui/ui.slider.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.ajaxQueue.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.cookie.js"></script> <script language="JavaScript" type="text/javascript" src="js/jquery.gettext.js"></script>
Binary file jpoker/jquery.ui-1.5.1.zip has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jpoker/jquery/jquery-1.2.6.js Tue Jul 01 18:13:35 2008 +0200 @@ -0,0 +1,3549 @@ +(function(){ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ + +// Map over jQuery in case of overwrite +var _jQuery = window.jQuery, +// Map over the $ in case of overwrite + _$ = window.$; + +var jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); +}; + +// A simple way to check for HTML strings or ID strings +// (both of which we optimize for) +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, + +// Is it a simple selector + isSimple = /^.[^:#\[\.]*$/, + +// Will speed up references to undefined, and allows munging its name. + undefined; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + } + // Handle HTML strings + if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var 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] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ){ + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + return jQuery( elem ); + } + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray(jQuery.makeArray(selector)); + }, + + // The current version of jQuery being used + jquery: "1.2.6", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 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 == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // 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; + Array.prototype.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 ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !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 clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector == 'string' ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // 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.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if( value.constructor == Number ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + data: function( key, value ){ + 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 ); + }); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) + scripts = scripts.add( elem ); + else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +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 ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == 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" && typeof target != "function" ) + 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 ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy == "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + now(), uuid = 0, windowData = {}, + // exclude the following css properties to add px + exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning this function. + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( 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.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( 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(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + 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 jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length == undefined ) { + 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 ( length == undefined ) { + 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; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // 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 ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + // defaultView is cached + var ret = defaultView.getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = style.outline; + style.outline = "0 solid black"; + style.outline = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle && !color( elem ) ) + ret = computedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = [], a = elem, i = 0; + + // Locate all of the parent display: none elements + for ( ; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( ; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + 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 ( !/^\d+(px)?$/i.test( ret ) && /^\d/.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 = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + 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; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem += ''; + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + "></" + tag + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap = + // option or optgroup + !tags.indexOf("<opt") && + [ 1, "<select multiple='multiple'>", "</select>" ] || + + !tags.indexOf("<leg") && + [ 1, "<fieldset>", "</fieldset>" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "<table>", "</table>" ] || + + !tags.indexOf("<tr") && + [ 2, "<table><tbody>", "</tbody></table>" ] || + + // <thead> matched above + (!tags.indexOf("<td") || !tags.indexOf("<th")) && + [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || + + !tags.indexOf("<col") && + [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || + + // IE can't serialize <link> and <script> tags normally + jQuery.browser.msie && + [ 1, "div<div>", "</div>" ] || + + [ 0, "", "" ]; + + // Go to html and back, then peel off extra wrappers + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( wrap[0]-- ) + div = div.lastChild; + + // Remove IE's autoinserted <tbody> from table fragments + if ( jQuery.browser.msie ) { + + // String was a <table>, *may* have spurious <tbody> + var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare <thead> or <tfoot> + wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? + 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 ( /^\s/.test( elem ) ) + div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); + + } + + elem = jQuery.makeArray( div.childNodes ); + } + + if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) ) + return; + + if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options ) + ret.push( elem ); + + else + ret = jQuery.merge( ret, elem ); + + }); + + return ret;