├── mobile-sprite.png ├── apple-touch-icon-precomposed.png ├── apple-touch-icon-ipad-precomposed.png ├── apple-touch-icon-retina-precomposed.png ├── apple-touch-icon-ipad-retina-precomposed.png ├── js ├── g2tt-config.js ├── jquery.cookie.js ├── jquery.hotkeys.js ├── g2tt.js └── jquery-1.9.1.min.js ├── README.md ├── index.htm └── style.css /mobile-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g2ttrss/g2ttrss-mobile/HEAD/mobile-sprite.png -------------------------------------------------------------------------------- /apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g2ttrss/g2ttrss-mobile/HEAD/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /apple-touch-icon-ipad-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g2ttrss/g2ttrss-mobile/HEAD/apple-touch-icon-ipad-precomposed.png -------------------------------------------------------------------------------- /apple-touch-icon-retina-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g2ttrss/g2ttrss-mobile/HEAD/apple-touch-icon-retina-precomposed.png -------------------------------------------------------------------------------- /apple-touch-icon-ipad-retina-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g2ttrss/g2ttrss-mobile/HEAD/apple-touch-icon-ipad-retina-precomposed.png -------------------------------------------------------------------------------- /js/g2tt-config.js: -------------------------------------------------------------------------------- 1 | // Config 2 | global_ttrssUrl = "../"; 3 | 4 | // Preferences 5 | pref_Feed = '-4'; // Default: all items 6 | pref_ViewMode = 'unread'; // Default: unread articles only 7 | // Not used -- pref_TextType = 'content'; // Default: full articles 8 | pref_OrderBy = 'date_reverse'; // Default: oldest first 9 | pref_FeedSort = '0'; // Default: Do not sort feeds 10 | pref_StartInCat = '0'; // Default: Start showing feeds 11 | //added so user can change feed limit easily. 12 | pref_Feed_limit = 25; // Default: Load 25 Items... 13 | -------------------------------------------------------------------------------- /js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.3.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function (factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as anonymous module. 11 | define(['jquery'], factory); 12 | } else { 13 | // Browser globals. 14 | factory(jQuery); 15 | } 16 | }(function ($) { 17 | 18 | var pluses = /\+/g; 19 | 20 | function raw(s) { 21 | return s; 22 | } 23 | 24 | function decoded(s) { 25 | return decodeURIComponent(s.replace(pluses, ' ')); 26 | } 27 | 28 | function converted(s) { 29 | if (s.indexOf('"') === 0) { 30 | // This is a quoted cookie as according to RFC2068, unescape 31 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 32 | } 33 | try { 34 | return config.json ? JSON.parse(s) : s; 35 | } catch(er) {} 36 | } 37 | 38 | var config = $.cookie = function (key, value, options) { 39 | 40 | // write 41 | if (value !== undefined) { 42 | options = $.extend({}, config.defaults, options); 43 | 44 | if (typeof options.expires === 'number') { 45 | var days = options.expires, t = options.expires = new Date(); 46 | t.setDate(t.getDate() + days); 47 | } 48 | 49 | value = config.json ? JSON.stringify(value) : String(value); 50 | 51 | return (document.cookie = [ 52 | config.raw ? key : encodeURIComponent(key), 53 | '=', 54 | config.raw ? value : encodeURIComponent(value), 55 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 56 | options.path ? '; path=' + options.path : '', 57 | options.domain ? '; domain=' + options.domain : '', 58 | options.secure ? '; secure' : '' 59 | ].join('')); 60 | } 61 | 62 | // read 63 | var decode = config.raw ? raw : decoded; 64 | var cookies = document.cookie.split('; '); 65 | var result = key ? undefined : {}; 66 | for (var i = 0, l = cookies.length; i < l; i++) { 67 | var parts = cookies[i].split('='); 68 | var name = decode(parts.shift()); 69 | var cookie = decode(parts.join('=')); 70 | 71 | if (key && key === name) { 72 | result = converted(cookie); 73 | break; 74 | } 75 | 76 | if (!key) { 77 | result[name] = converted(cookie); 78 | } 79 | } 80 | 81 | return result; 82 | }; 83 | 84 | config.defaults = {}; 85 | 86 | $.removeCookie = function (key, options) { 87 | if ($.cookie(key) !== undefined) { 88 | // Must not alter options, thus extending a fresh object... 89 | $.cookie(key, '', $.extend({}, options, { expires: -1 })); 90 | return true; 91 | } 92 | return false; 93 | }; 94 | 95 | })); 96 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | g2ttrss-mobile 2 | ============== 3 | 4 | A Google inspired mobile interface for TT-RSS. 5 | 6 | 7 | What is it? 8 | ----------- 9 | 10 | This mobile-oriented webapp is a client for [Tiny Tiny RSS](http://tt-rss.org)(TT-RSS). 11 | The webapp uses TT-RSS's [JSON API](http://tt-rss.org/redmine/projects/tt-rss/wiki/JsonApiReference). 12 | 13 | I was a big user of Google Reader's mobile webapp and when Google announced the 14 | end of Reader, I switched to TT-RSS. I was not satisfied with any of the other 15 | mobile interfaces out there for TT-RSS and decided I build my own based on the 16 | CSS styles from Google. 17 | 18 | g2ttrss-mobile use: 19 | * [jQuery](http://jquery.com/) 20 | 21 | 22 | How to use it? 23 | -------------- 24 | 25 | You should install the files in a directory on the same host as your TT-RSS install. 26 | As the webapp uses AJAX calls to access the API, it should be hosted on the **same domain name**. 27 | G2TTRSS assumes that your TT-RSS install is located at `/tt-rss`, if this is not the case 28 | edit `js/g2tt-config.js` and change `global_ttrssUrl` (line 2) to point to the correct location. 29 | If the webapp is installed in a subdirectory of TT-RSS, it could be wiped on an update to TT-RSS 30 | so after each update of TT-RSS, you may need to reinstall G2TTRSS. 31 | 32 | Use of this webapp requires TT-RSS's external APIs. They are enabled through TT-RSS's preferences: 33 | * in *Tiny Tiny RSS* go into `Actions` -> `Preferences` 34 | * `Configuration` -> `Enable external API` 35 | 36 | 37 | Current features 38 | ---------------- 39 | 40 | * mark all displayed as read 41 | * categories and subcategories 42 | * display all/new/starred/published 43 | * view oldest/newest first 44 | * display just a single feed 45 | * link to the original article 46 | * unread count display in category view 47 | * special feeds 48 | * star/unstar article support 49 | * mark as read/unread article 50 | * iPhone webapp support (startup image & icon) 51 | * login/logout support 52 | * load more articles (15 at a time) 53 | * search for keywords in feeds 54 | * Google Reader style hotkeys (`j`, `k`, `n`, `p`, `o`, `m`) 55 | 56 | Future features are tracked as issues. 57 | 58 | Hotkeys 59 | ------- 60 | 61 | * `j` - Jump and expand next item. 62 | * `k` - Jump and expand previous item. 63 | * `n` - Jump to next item. 64 | * `p` - Jump to previous item. 65 | * `o` - Expand/collapse current item. 66 | * `m` - Mark current item as read/unread. 67 | 68 | Configuration Options 69 | --------------------- 70 | 71 | Configuration options can be found in the js/g2tt-config.js file. These are options to change your personal preference for how the interface works. 72 | 73 | Options: 74 | 75 | * **global_ttrssUrl** (Default: _("/tt-rss/")_) 76 | 77 | The path to your TT-RSS installation relative to your domain. 78 | 79 | * **pref_Feed** (String, default: _('-4')_, all items) 80 | 81 | The default feed to display. Available values: 82 | * >0 - A specific feed 83 | * 0 - Uncategorized 84 | * -1 - Special (e.g. Starred, Published, Archived, etc.) 85 | * -2 - Labels 86 | * -3 - All feeds, excluding virtual feeds (e.g. Labels and such) 87 | * -4 - All feeds, including virtual feeds 88 | 89 | * **pref_ViewMode** (Default: _('unread')_, unread articles only) 90 | 91 | Show unread or all articles? Available values: 92 | * unread - show unread articles only 93 | * all - show all articles 94 | 95 | * **pref_OrderBy** (Default: _('date_reverse')_, oldest first) 96 | 97 | Sort order of the articles/items. Available values: 98 | * date_reverse - oldest first 99 | * feed_dates - newest first, goes by feed date 100 | * (nothing) - TT-RSS's default (whatever that is) 101 | 102 | * **pref_FeedSort** (Default: _('0')_, do not sort feeds) 103 | 104 | Sort the feeds (categories) in alphabetical order or not. Availables values: 105 | * 0 - do not sort feeds, display in the order TT-RSS returns them 106 | * 1 - sort the feeds in alphabetical order (A-Z) 107 | 108 | * **pref_StartInCat** (Default: _('0')_, start showing articles) 109 | 110 | Start showing the feeds (categories) or articles (items) 111 | * 0 - start showing articles 112 | * 1 - start showing feeds 113 | -------------------------------------------------------------------------------- /js/jquery.hotkeys.js: -------------------------------------------------------------------------------- 1 | /*jslint browser: true*/ 2 | /*jslint jquery: true*/ 3 | 4 | /* 5 | * jQuery Hotkeys Plugin 6 | * Copyright 2010, John Resig 7 | * Dual licensed under the MIT or GPL Version 2 licenses. 8 | * 9 | * Based upon the plugin by Tzury Bar Yochay: 10 | * https://github.com/tzuryby/jquery.hotkeys 11 | * 12 | * Original idea by: 13 | * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ 14 | */ 15 | 16 | /* 17 | * One small change is: now keys are passed by object { keys: '...' } 18 | * Might be useful, when you want to pass some other data to your handler 19 | */ 20 | 21 | (function(jQuery) { 22 | 23 | jQuery.hotkeys = { 24 | version: "0.8", 25 | 26 | specialKeys: { 27 | 8: "backspace", 28 | 9: "tab", 29 | 10: "return", 30 | 13: "return", 31 | 16: "shift", 32 | 17: "ctrl", 33 | 18: "alt", 34 | 19: "pause", 35 | 20: "capslock", 36 | 27: "esc", 37 | 32: "space", 38 | 33: "pageup", 39 | 34: "pagedown", 40 | 35: "end", 41 | 36: "home", 42 | 37: "left", 43 | 38: "up", 44 | 39: "right", 45 | 40: "down", 46 | 45: "insert", 47 | 46: "del", 48 | 59: ";", 49 | 61: "=", 50 | 96: "0", 51 | 97: "1", 52 | 98: "2", 53 | 99: "3", 54 | 100: "4", 55 | 101: "5", 56 | 102: "6", 57 | 103: "7", 58 | 104: "8", 59 | 105: "9", 60 | 106: "*", 61 | 107: "+", 62 | 109: "-", 63 | 110: ".", 64 | 111: "/", 65 | 112: "f1", 66 | 113: "f2", 67 | 114: "f3", 68 | 115: "f4", 69 | 116: "f5", 70 | 117: "f6", 71 | 118: "f7", 72 | 119: "f8", 73 | 120: "f9", 74 | 121: "f10", 75 | 122: "f11", 76 | 123: "f12", 77 | 144: "numlock", 78 | 145: "scroll", 79 | 173: "-", 80 | 186: ";", 81 | 187: "=", 82 | 188: ",", 83 | 189: "-", 84 | 190: ".", 85 | 191: "/", 86 | 192: "`", 87 | 219: "[", 88 | 220: "\\", 89 | 221: "]", 90 | 222: "'" 91 | }, 92 | 93 | shiftNums: { 94 | "`": "~", 95 | "1": "!", 96 | "2": "@", 97 | "3": "#", 98 | "4": "$", 99 | "5": "%", 100 | "6": "^", 101 | "7": "&", 102 | "8": "*", 103 | "9": "(", 104 | "0": ")", 105 | "-": "_", 106 | "=": "+", 107 | ";": ": ", 108 | "'": "\"", 109 | ",": "<", 110 | ".": ">", 111 | "/": "?", 112 | "\\": "|" 113 | }, 114 | 115 | // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url 116 | textAcceptingInputTypes: [ 117 | "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", 118 | "datetime-local", "search", "color", "tel"], 119 | 120 | // default input types not to bind to unless bound directly 121 | textInputTypes: /textarea|input|select/i, 122 | 123 | options: { 124 | filterInputAcceptingElements: true, 125 | filterTextInputs: true, 126 | filterContentEditable: true 127 | } 128 | }; 129 | 130 | function keyHandler(handleObj) { 131 | if (typeof handleObj.data === "string") { 132 | handleObj.data = { 133 | keys: handleObj.data 134 | }; 135 | } 136 | 137 | // Only care when a possible input has been specified 138 | if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { 139 | return; 140 | } 141 | 142 | var origHandler = handleObj.handler, 143 | keys = handleObj.data.keys.toLowerCase().split(" "); 144 | 145 | handleObj.handler = function(event) { 146 | // Don't fire in text-accepting inputs that we didn't directly bind to 147 | if (this !== event.target && 148 | (jQuery.hotkeys.options.filterInputAcceptingElements && 149 | jQuery.hotkeys.textInputTypes.test(event.target.nodeName) || 150 | (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) || 151 | (jQuery.hotkeys.options.filterTextInputs && 152 | jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { 153 | return; 154 | } 155 | 156 | var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], 157 | character = String.fromCharCode(event.which).toLowerCase(), 158 | modif = "", 159 | possible = {}; 160 | 161 | jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { 162 | 163 | if (event[specialKey + 'Key'] && special !== specialKey) { 164 | modif += specialKey + '+'; 165 | } 166 | }); 167 | 168 | // metaKey is triggered off ctrlKey erronously 169 | if (event.metaKey && !event.ctrlKey && special !== "meta") { 170 | modif += "meta+"; 171 | } 172 | 173 | if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { 174 | modif = modif.replace("alt+ctrl+shift+", "hyper+"); 175 | } 176 | 177 | if (special) { 178 | possible[modif + special] = true; 179 | } 180 | else { 181 | possible[modif + character] = true; 182 | possible[modif + jQuery.hotkeys.shiftNums[character]] = true; 183 | 184 | // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" 185 | if (modif === "shift+") { 186 | possible[jQuery.hotkeys.shiftNums[character]] = true; 187 | } 188 | } 189 | 190 | for (var i = 0, l = keys.length; i < l; i++) { 191 | if (possible[keys[i]]) { 192 | return origHandler.apply(this, arguments); 193 | } 194 | } 195 | }; 196 | } 197 | 198 | jQuery.each(["keydown", "keyup", "keypress"], function() { 199 | jQuery.event.special[this] = { 200 | add: keyHandler 201 | }; 202 | }); 203 | 204 | })(jQuery || this.jQuery || window.jQuery); 205 | -------------------------------------------------------------------------------- /index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | TT-RSS Mobile 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 57 | 77 |
78 | 183 |
184 |
185 |
186 | 187 |
188 |
189 |
190 |
191 |
 Loading...
192 |
193 |
194 |
195 | 199 | 205 |
206 | 214 |
215 |
216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | #addNewSubscription { 2 | 3 | } 4 | #dialog { 5 | display:none; 6 | } 7 | .m-button { 8 | height: 15px; 9 | border: solid 1px #99b1ed; 10 | background-color: #e4eafa; 11 | padding: 7px; 12 | white-space: nowrap; 13 | font-size: 13px; 14 | font-weight: bold; 15 | color: #2e4987; 16 | border-radius: 4px; 17 | text-shadow: #fff 0 1px 0; 18 | box-shadow: 0 1px 0 #e1e9fc; 19 | float: left; 20 | position: relative; 21 | } 22 | .m-button-pressed { 23 | border-color: #4d6fb9; 24 | background-color: #6592df; 25 | background-position: top right; 26 | color: #fff; 27 | text-shadow: #2e4987 0 1px 0; 28 | } 29 | .nav-bar { 30 | position: relative; 31 | border-top: 1px solid #a0b6e6; 32 | padding: 4px; 33 | background: -webkit-gradient(linear,left top,left bottom,from(#d9e2fa),to(#b5c8f9)); 34 | background: -webkit-linear-gradient(top,#d9e2fa,#b5c8f9); 35 | background: -moz-linear-gradient(top,#d9e2fa,#b5c8f9); 36 | background: -ms-linear-gradient(top,#d9e2fa,#b5c8f9); 37 | background: -o-linear-gradient(top,#d9e2fa,#b5c8f9); 38 | background-color: #dbe3fa; 39 | border-bottom: solid 1px #9eadd2; 40 | z-index: 3; 41 | } 42 | #nav-bar-shadow { 43 | position: absolute; 44 | left: 0; 45 | bottom: -4px; 46 | height: 3px; 47 | width: 100%; 48 | background: -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0.2)),to(rgba(0,0,0,0))); 49 | background: -webkit-linear-gradient(top,rgba(0,0,0,0.2),rgba(0,0,0,0)); 50 | background: -moz-linear-gradient(top,rgba(0,0,0,0.2),rgba(0,0,0,0)); 51 | background: -ms-linear-gradient(top,rgba(0,0,0,0.2),rgba(0,0,0,0)); 52 | background: -o-linear-gradient(top,rgba(0,0,0,0.2),rgba(0,0,0,0)); 53 | } 54 | .nav-bar-container .g2tt-menu { 55 | margin-top: 5px; 56 | z-index: 2; 57 | } 58 | .nav-bar-container { 59 | position: relative; 60 | z-index: 10; 61 | } 62 | .gp4 .nav-bar, 63 | #entries-footer.nav-bar { border-top: none } 64 | .nav-table { 65 | width: 100%; 66 | height: 30px; 67 | } 68 | .nav-table-left, 69 | .nav-table-right { 70 | vertical-align: middle; 71 | width: 70px; 72 | } 73 | .nav-table-left a { text-decoration: none } 74 | .nav-table-right { text-align: right } 75 | #header-refresh, 76 | #header-menu { float: right; width: 15px; 77 | } 78 | #header-refresh .m-button-contents, 79 | #header-menu .m-button-contents { 80 | width: 16px; 81 | height: 16px; 82 | background: none; 83 | left: 6px; 84 | display: block; 85 | } 86 | 87 | #header-menu { margin-left: 6px } 88 | 89 | #header-menu .m-button-contents { 90 | position: absolute; 91 | top: 3px; 92 | } 93 | #header-refresh .m-button-contents { 94 | position: absolute; 95 | top: 8px; 96 | } 97 | #add-new-subscription { 98 | position: relative; 99 | width:15px; 100 | } 101 | #add-new-subscription .m-button-contents { 102 | position: absolute; 103 | right: 9px; 104 | top: 8px; 105 | } 106 | #header-menu.m-button-pressed .m-button-contents { 107 | } 108 | 109 | .nav-table-middle { 110 | font-size: 17px; 111 | font-weight: bold; 112 | text-align: center; 113 | color: #182647; 114 | vertical-align: middle; 115 | overflow: hidden; 116 | text-shadow: #fff 0 1px 1px; 117 | } 118 | a.logo { 119 | margin-top: 3px; 120 | width: 139px; 121 | height: 28px; 122 | display: block; 123 | } 124 | .nav-left { float: left } 125 | .nav-right { float: right } 126 | #viewer-bottom-links { 127 | border-bottom: 1px solid #a0b6e6; 128 | padding: 8px 5px; 129 | font-size: 12px; 130 | color: #000; 131 | overflow: auto; 132 | } 133 | #viewer-bottom-links #load-more-items { 134 | color: #24b; 135 | text-decoration: underline; 136 | white-space: nowrap; 137 | } 138 | .loading #viewer-bottom-links #load-more-items, 139 | .disabled-actions #viewer-bottom-links #load-more-items, 140 | .empty-stream #viewer-bottom-links #load-more-items { 141 | color: #999; 142 | text-decoration: none; 143 | } 144 | .tags-edit-save { margin-right: 5px } 145 | .tags-edit-area .m-button { float: right } 146 | .ac-renderer { 147 | border: 1px solid #666; 148 | background: #eee; 149 | color: #000; 150 | z-index: 20000; 151 | position: absolute; 152 | } 153 | .ac-renderer .ac-row { padding: 1px 3px } 154 | .ac-renderer .active { background: #bbb } 155 | .g2tt-contacts-ui-autocomplete-new-section { 156 | border-top: 1px solid #666; 157 | padding-top: 2px; 158 | } 159 | .highlighted0 { background-color: #ff9 } 160 | .highlighted1 { background-color: #fcc } 161 | .highlighted2 { background-color: #ccf } 162 | .highlighted3 { background-color: #cfc } 163 | .highlighted4 { background-color: #9cf } 164 | .highlighted5 { background-color: #cc9 } 165 | .highlighted6 { background-color: #f9c } 166 | .search-result .highlighted0, 167 | .search-result .highlighted1, 168 | .search-result .highlighted2, 169 | .search-result .highlighted3, 170 | .search-result .highlighted4, 171 | .search-result .highlighted5, 172 | .search-result .highlighted6 { background-color: inherit } 173 | body { 174 | background-color: #fff; 175 | width: 100%; 176 | margin: 0; 177 | padding: 0; 178 | font-family: sans-serif; 179 | font-size: 13px; 180 | -webkit-text-size-adjust: none; 181 | } 182 | body.portrait { min-height: 480px } 183 | body.landscape { min-height: 320px } 184 | .logo { margin-left: 3px } 185 | .logo img { border: 0 } 186 | .text { 187 | padding: 8px 5px; 188 | vertical-align: middle; 189 | } 190 | .larger { 191 | font-size: 15px; 192 | line-height: 24px; 193 | } 194 | .padded { padding: 8px 5px 6px } 195 | .line-top { border-top: 1px solid #c2cff1 } 196 | .whisper { color: #666 } 197 | .hidden { display: none } 198 | .invisible { visibility: hidden } 199 | #message-area { 200 | background: #fff5c2; 201 | border-bottom: 1px solid #ccc; 202 | margin-left: 0!important; 203 | width: auto!important; 204 | padding: 5px; 205 | z-index: 1; 206 | text-align: center; 207 | font-size: 14px; 208 | font-weight: bold; 209 | color: #534b38; 210 | display: none; 211 | } 212 | #message-area.jfk-butterBar-shown { display: block } 213 | #loading-area-container { 214 | background-position: left; 215 | z-index: 10001; 216 | padding: 5px; 217 | margin-left: 10px; 218 | margin-top: 5px; 219 | display: none; 220 | } 221 | .loading #loading-area-container:not(.hidden) { display: block } 222 | #loading-area-container p { 223 | font-weight: bold; 224 | padding: 0 3px 0 20px; 225 | margin: 0; 226 | color:#24b; 227 | font-size:16px; 228 | } 229 | #entries { 230 | width: 100%; 231 | position: relative; 232 | z-index: 1; 233 | overflow: hidden; 234 | } 235 | #entries-footer { 236 | position: relative; 237 | overflow: hidden; 238 | } 239 | #show-more-row { 240 | min-height: 40px; 241 | overflow: auto; 242 | padding: 10px 0 10px 32px; 243 | } 244 | .empty-stream #show-more-row, 245 | .loading .entries-total { display: none } 246 | .loading #show-more-row, 247 | #loading-area-container { 248 | } 249 | 250 | .load-more-message { 251 | font-size: 15px; 252 | font-weight: bold; 253 | color: #24b; 254 | } 255 | .loading .load-more-message { color: #ebeff9 } 256 | .entries-total { 257 | color: #666; 258 | font-size: 12px; 259 | } 260 | #entries-footer-buttons { 261 | float: left; 262 | margin-top: 5px; 263 | margin-bottom: 5px; 264 | } 265 | .footer { 266 | text-align: center; 267 | padding: 10px 5px 5px; 268 | } 269 | .footer-help { margin: 10px 0 } 270 | .interruption { 271 | border-bottom: 1px solid #c2cff1; 272 | text-align: center; 273 | padding: 5px; 274 | } 275 | a, 276 | a:visited, 277 | .link { color: #24b } 278 | .link { 279 | text-decoration: underline; 280 | cursor: pointer; 281 | } 282 | .unsubscribed-stream #viewer-bottom-links, 283 | .unsubscribed-stream #viewer-top-links { display: none } 284 | .welcome #viewer-top-links, 285 | .welcome #stream-title, 286 | .welcome #scroll-filler, 287 | .welcome #viewer-bottom-links, 288 | .welcome .nav-bar, 289 | .welcome #entries-footer { display: none } 290 | .welcome #welcome { margin: .5em } 291 | .welcome #welcome-feeds-button { 292 | text-decoration: none; 293 | margin-bottom: 1em; 294 | } 295 | .welcome h3 { clear: both } 296 | .buttons { overflow: hidden } 297 | .ac-renderer .ac-row { 298 | line-height: 18px; 299 | font-size: 13px; 300 | padding: 5px; 301 | } 302 | .entry-row { border-bottom: 1px solid #c2cff1 } 303 | .entry-top-bar, 304 | .entry-sub-header { display: none } 305 | .expanded .entry-top-bar { 306 | display: block; 307 | height: 30px; 308 | line-height: 30px; 309 | background-color: #ebeff9; 310 | } 311 | .entry-top-bar .entry-next, 312 | .entry-top-bar .entry-collapse { 313 | height: 20px; 314 | line-height: 20px; 315 | padding: 5px; 316 | } 317 | .entry-top-bar .entry-next { float: right } 318 | .entry-top-bar .entry-collapse { float: left } 319 | .expanded .entry-top-bar .link { 320 | color: #68d; 321 | text-decoration: none; 322 | } 323 | .expanded .entry-sub-header { 324 | display: block; 325 | min-height: 16px; 326 | padding: 5px 5px 0; 327 | font-size: 12px; 328 | } 329 | .created .sub-header { display: none } 330 | .entry-container, 331 | #show-more-row { border: 2px solid #fff } 332 | .entry-container { position: relative } 333 | .read .entry-container { 334 | border-color: #ebeff9; 335 | background-color: #ebeff9; 336 | transition-property: background-color,border-color; 337 | transition-duration: .3s; 338 | transition-timing-function: ease-in; 339 | -webkit-transition-property: background-color,border-color; 340 | -webkit-transition-duration: .3s; 341 | -webkit-transition-timing-function: ease-in; 342 | } 343 | .expanded .entry-container { 344 | background-color: #fff; 345 | transition-property: none; 346 | transition-duration: 0; 347 | -webkit-transition-property: none; 348 | -webkit-transition-duration: 0; 349 | } 350 | .expanded .entry-container .entry-header-body { background-color: #fff } 351 | .expanded .entry-container .entry-header-body .text { padding-bottom: 0 } 352 | .current-entry .entry-container { border-color: #3162c4 } 353 | .entry-container .entry-header-body { padding-left: 25px } 354 | .entry-container .entry-header { position: relative } 355 | .entry-footer { 356 | min-height: 16px; 357 | font-size: 13px; 358 | background-color: #f3f5fc; 359 | overflow: auto; 360 | margin: -8px -5px; 361 | margin-top: 10px; 362 | } 363 | .entry-actions span { white-space: nowrap } 364 | .entry-container .entry-icons .star { 365 | margin-top: 8px; 366 | position: absolute; 367 | top: 0; 368 | bottom: 0; 369 | width: 20px; 370 | } 371 | .entry-container .entry-icons { 372 | display: block; 373 | left: .2em; 374 | margin: 0; 375 | overflow: visible; 376 | padding: 0; 377 | position: absolute; 378 | top: 1px; 379 | bottom: 0; 380 | width: 20px; 381 | } 382 | 383 | 384 | .expanded .entry-top-bar .entry-next-icon, 385 | .expanded .entry-top-bar .entry-collapse-icon, 386 | .entry-actions .email, 387 | .entry-actions .star, 388 | .entry-actions .dislike, 389 | .entry-actions .entry-tagging-action-title, 390 | .entry-actions .secondary-actions-toggle, 391 | .entry-actions .plusone-holder { 392 | background-color: transparent; 393 | padding: 0 8px 0 16px; 394 | position: relative; 395 | float: left; 396 | vertical-align: baseline; 397 | line-height: 15px; 398 | white-space: nowrap; 399 | } 400 | 401 | .entry-actions .read-state { 402 | padding: 0 8px 0 17px; 403 | position: relative; 404 | vertical-align: top; 405 | line-height: 15px; 406 | white-space: nowrap; 407 | } 408 | 409 | .expanded .entry-top-bar .entry-next-icon, 410 | .expanded .entry-top-bar .entry-collapse-icon{ 411 | padding: 0 4px; 412 | width: 10px; 413 | } 414 | 415 | .expanded .entry-top-bar .entry-next-fa-icon, 416 | .expanded .entry-top-bar .entry-collapse-fa-icon { 417 | width: 10px; 418 | padding: 0 4px; 419 | position: relative; 420 | line-height: inherit; 421 | vertical-align: baseline; 422 | } 423 | 424 | .entry-actions-secondary .dislike, 425 | .entry-actions-secondary .email, 426 | .entry-actions-secondary .entry-tagging-action-title { float: none } 427 | .entry-actions .entry-tagging-action-title { padding-right: 0 } 428 | .entry-actions .tag { padding-right: 8px } 429 | .entry-actions .link { text-decoration: none } 430 | 431 | .entry-actions .plusone-holder { background: none } 432 | .entry-actions-primary, 433 | .entry-actions-secondary { 434 | padding: 5px; 435 | overflow: hidden; 436 | } 437 | .secondary-actions-visible .entry-actions-primary { border-bottom: 1px solid #c2cff1 } 438 | .secondary-actions-visible .entry-actions-secondary { 439 | border-top: 1px solid #fff; 440 | text-overflow: ellipsis; 441 | } 442 | .secondary-actions-hidden .entry-actions-secondary { display: none } 443 | .tags-edit-active .entry-actions-secondary { padding-bottom: 0 } 444 | .entry-actions .secondary-actions-toggle { 445 | padding-left: 0; 446 | background: none; 447 | float: right; 448 | } 449 | .secondary-actions-toggle .link, 450 | .secondary-actions-toggle .secondary-actions-toggle-dropdown { 451 | color: #68d; 452 | float: left; 453 | } 454 | .secondary-actions-toggle-dropdown { 455 | height: 0; 456 | width: 0; 457 | margin-left: 3px; 458 | margin-top: 7px; 459 | border-right: 4px solid #f3f5fc; 460 | border-left: 4px solid #f3f5fc; 461 | } 462 | .secondary-actions-hidden .secondary-actions-toggle-dropdown { 463 | border-top: 4px solid #68d; 464 | border-bottom: 0; 465 | } 466 | .secondary-actions-visible .secondary-actions-toggle-dropdown { 467 | border-top: 0; 468 | border-bottom: 4px solid #68d; 469 | } 470 | .entry-actions .user-tags-list { 471 | display: inline; 472 | padding-left: 0; 473 | margin: 0 0 0 .2em; 474 | } 475 | .tags-edit-active .user-tags-list { display: none } 476 | .entry-actions .user-tags-list li { 477 | list-style: none; 478 | display: inline; 479 | padding: 0; 480 | margin: 0; 481 | } 482 | .entry-actions .user-tags-list li a { 483 | text-decoration: none; 484 | display: inline; 485 | color: #24b; 486 | } 487 | .entry { 488 | color: #000; 489 | padding: 8px 5px; 490 | vertical-align: middle; 491 | overflow: auto; 492 | display: none; 493 | } 494 | .expanded .entry { 495 | display: block; 496 | } 497 | .img-toggle-container { 498 | display: block; 499 | padding: 15px 0 10px; 500 | } 501 | .img-toggle { 502 | background: 0 4px no-repeat; 503 | margin: 0 0 5px; 504 | padding-left: 12px; 505 | padding-right: 20px; 506 | text-decoration: underline; 507 | color: #24b; 508 | text-align: left; 509 | display: inline; 510 | } 511 | 512 | .alt-text-display { 513 | border: 1px solid black; 514 | width: auto; 515 | text-align: center; 516 | padding: 3px 2px; 517 | border-radius: 3px; 518 | margin-right: 26px; 519 | background: #ff8; 520 | } 521 | .entry-via { 522 | color: #666; 523 | overflow: auto; 524 | line-height: 24px; 525 | margin-bottom: 10px; 526 | } 527 | .entry-annotation { 528 | padding: 3px 5px; 529 | margin-top: 3px; 530 | max-width: 80%; 531 | background-color: #e8f0fd; 532 | border: 1px solid #e8f0fd; 533 | border-radius: 3px; 534 | } 535 | .entry-annotation-content { 536 | color: #000; 537 | font-style: italic; 538 | clear: both; 539 | } 540 | .entry-annotation-author-container { 541 | padding: .1em 0 .3em; 542 | white-space: nowrap; 543 | } 544 | .entry-annotation-author-container, 545 | .entry-annotation-author-name { 546 | font-weight: normal; 547 | line-height: 24px; 548 | } 549 | .expanded .item-snippet { display: none } 550 | .action-area, 551 | .tags-edit-active .entry-tagging-action-title { 552 | background-color: #dbe3fa; 553 | padding-bottom: 2px; 554 | margin-bottom: 0; 555 | } 556 | .action-area-container { 557 | margin-top: 0; 558 | padding-top: 0; 559 | overflow: auto; 560 | } 561 | .action-area { 562 | padding: 5px; 563 | margin-top: 0; 564 | } 565 | .action-area .tags-edit-area { padding: 5px 18px 5px 5px } 566 | .tags-edit-area input { 567 | font-size: 13px; 568 | width: 100%; 569 | margin-bottom: 10px; 570 | } 571 | .email-action-link { text-decoration: none } 572 | #subscriptions-list { margin-bottom: 1.5em } 573 | .row { 574 | overflow: auto; 575 | width: 100%; 576 | display: table; 577 | } 578 | .show-unread .no-unread-sub-row { display: none } 579 | .sub-row { border-bottom: 1px solid #c2cff1 } 580 | .item-title, 581 | .item-title-collapsed { 582 | color: #000; 583 | font-size: 15px; 584 | font-weight: bold; 585 | text-decoration: none; 586 | } 587 | .item-title-link { color: #24b } 588 | .read .item-title, 589 | .read .item-title-collapsed { font-weight: normal } 590 | .expanded .item-title { display: inline } 591 | .expanded .item-title-collapsed, 592 | .item-title { display: none } 593 | .item-snippet { 594 | overflow: hidden; 595 | text-overflow: ellipsis; 596 | white-space: nowrap; 597 | } 598 | .sub-row .icon-cell { 599 | display: table-cell; 600 | width: 16px; 601 | vertical-align: middle; 602 | padding: 0 2px 0 5px; 603 | } 604 | .sub-row .icon { 605 | width: 16px; 606 | height: 16px; 607 | float: right; 608 | } 609 | 610 | .nested-sub .icon-cell { width: 32px } 611 | .sub-read .icon { display: none } 612 | .add-sub { padding: 12px 0 12px 16px } 613 | .sub-item { 614 | padding-left: 0; 615 | color: #000; 616 | font-size: 15px; 617 | overflow: hidden; 618 | } 619 | .sub-link { text-decoration: none } 620 | .unread-sub { font-weight: bold } 621 | .item-count-value { 622 | font-weight: bold; 623 | margin-right: 5px; 624 | } 625 | .item-count { 626 | text-align: right; 627 | display: table-cell; 628 | vertical-align: middle; 629 | } 630 | .no-item-count .item-count { display: none } 631 | .item-source { 632 | color: #666; 633 | font-weight: bold; 634 | } 635 | .single-source .item-source-title { display: none } 636 | .g2tt-menu { 637 | background-color: #fff; 638 | border: solid 1px rgba(27,47,94,0.4); 639 | box-shadow: 0 2px 4px rgba(0,0,0,0.3); 640 | position: absolute; 641 | overflow: hidden; 642 | outline: 0; 643 | border-radius: 0 0 10px 10px; 644 | } 645 | .g2tt-menuitem { 646 | font-size: 13px; 647 | color: #333; 648 | padding: 5px 8px 5px 24px; 649 | line-height: 21px; 650 | white-space: nowrap; 651 | position: relative; 652 | } 653 | .g2tt-menuitem-checkbox { 654 | height: 16px; 655 | width: 14px; 656 | left: 6px; 657 | position: absolute; 658 | } 659 | 660 | 661 | .g2tt-menuitem-checkbox i{ 662 | display: none; 663 | height: 15px; 664 | width: 15px; 665 | left: -1px; 666 | top: 3px; 667 | color: #2A5DB0; 668 | position:absolute; 669 | } 670 | 671 | .g2tt-option-selected .g2tt-menuitem-checkbox i { 672 | display:block; 673 | } 674 | .g2tt-menuseparator { border-top: 1px solid #ccc } 675 | #settings { padding: 5px } 676 | .option-name, 677 | .settings-section-header { 678 | font-size: 120%; 679 | font-weight: bold; 680 | } 681 | .settings-section-header { margin-bottom: 5px } 682 | .settings-section { 683 | padding-bottom: 5px; 684 | margin-bottom: 10px; 685 | border-bottom: 1px solid #ddd; 686 | } 687 | .settings-section select { 688 | margin-left: 10px; 689 | font-size: 1em; 690 | } 691 | .nav-bar .search-box { width: 100% } 692 | .search-box #search-input, 693 | .search-box #search-submit, 694 | .search-box #search-cancel { 695 | float: left; 696 | } 697 | .search-box #search-input { 698 | padding: 3px; 699 | margin: 1px 5px 0 2px; 700 | height: 30px; 701 | border: 1px solid #98A5B1; 702 | border-radius: 3px; 703 | font-size: 14pt; 704 | } 705 | .search-box #search-submit { 706 | display: block; 707 | margin-right: 20px; 708 | background-position: -5px -296px; 709 | } 710 | .search, 711 | .search-results { padding: 8px 5px } 712 | .search #quickadd { width: 60% } 713 | .search #quickadd-submit { 714 | border: 1px solid #525252; 715 | font-weight: bold; 716 | text-shadow: #666 0 -1px 1px; 717 | color: white; 718 | } 719 | .bundle-title, 720 | .search-result-title { 721 | color: #000; 722 | font-size: 15px; 723 | font-weight: bold; 724 | padding-bottom: 10px; 725 | } 726 | .already-subscribed { 727 | padding-left: 18px; 728 | padding-top: 5px; 729 | } 730 | .bundle-subscriptions { 731 | color: #000; 732 | float: right; 733 | } 734 | .search-result-snippet { color: #666 } 735 | .search-result-title a { 736 | text-decoration: none; 737 | color: #000; 738 | } 739 | .bundle-contents { 740 | padding: 15px; 741 | color: #000; 742 | } 743 | .hidden-bundle-contents { display: none } 744 | .bundle-contents ul { 745 | margin: 0; 746 | padding: 0 0 0 .75em; 747 | } 748 | .bundle-contents ul li { 749 | padding: 0; 750 | margin: 0; 751 | list-style-type: none; 752 | } 753 | .bundle-contents-header { font-weight: bold } 754 | .notification-header { 755 | min-height: 16px; 756 | padding: 6px 5px 0; 757 | font-size: 12px; 758 | border-top: 1px solid #a0b6e6; 759 | } 760 | .successful-notification { background-color: #fad163 } 761 | .failed-notification { background-color: #fc4d4d } 762 | .subscribe-button { 763 | background: #f4f4f4; 764 | color: #00c; 765 | border: 1px solid #9a9a9a; 766 | border-radius: 4px; 767 | padding: 5px 0; 768 | float: left; 769 | } 770 | .subscribe-button-a { text-decoration: none } 771 | .subscribe-button span { 772 | padding-left: 25px; 773 | padding-right: 5px; 774 | font-weight: bold; 775 | font-size: 15px; 776 | background-repeat: no-repeat; 777 | } 778 | #preview-interruption { 779 | min-height: 16px; 780 | padding: 6px 5px 0; 781 | font-size: 12px; 782 | background-color: #fad163; 783 | border-bottom: 1px solid #a0b6e6; 784 | overflow: auto; 785 | } 786 | #preview-interruption .subscribe-button { 787 | margin-top: 5px; 788 | margin-bottom: 5px; 789 | } 790 | .sub-search-result-row { 791 | max-height: 60px; 792 | min-height: 60px; 793 | overflow: hidden; 794 | width: 100%; 795 | border-top: 1px solid #c2cff1; 796 | padding: 5px 3px; 797 | display: table; 798 | } 799 | 800 | 801 | .entry-annotation { 802 | margin: 15px 0 10px; 803 | color: #666; 804 | max-width: 565px; 805 | } 806 | .entry-author-attribution-author-name { font-weight: bold } 807 | .entry-annotation-body { 808 | margin: .3em; 809 | line-height: 115%; 810 | font-style: italic; 811 | } 812 | 813 | 814 | /* Added */ 815 | #feed img { 816 | max-width: 100%; 817 | height: auto; 818 | } 819 | 820 | .entry-contents { 821 | display: none; 822 | } 823 | .expanded .entry-contents { 824 | display: block; 825 | } 826 | 827 | h2 { 828 | color: #222; 829 | font-size: 1.54em; 830 | font-weight: normal; 831 | line-height: 24px; 832 | margin: 0 0 .46em; 833 | } 834 | .login { 835 | margin: 0 auto; 836 | width: 650px; 837 | padding-top: 23px; 838 | padding-bottom: 100px; 839 | background: #f1f1f1; 840 | } 841 | .login h1:first-child { 842 | margin: 0 0 .92em; 843 | } 844 | .login { 845 | width: auto; 846 | max-width: 480px; 847 | padding-bottom: 100px; 848 | } 849 | .content { 850 | padding: 10px; 851 | } 852 | .clearfix:after { 853 | visibility: hidden; 854 | display: block; 855 | font-size: 0; 856 | content: '.'; 857 | clear: both; 858 | height: 0; 859 | } 860 | * html .clearfix { 861 | zoom: 1; 862 | } 863 | *:first-child+html .clearfix { 864 | zoom: 1; 865 | } 866 | .signin-box, 867 | .accountchooser-box { 868 | margin: -4px 0 0; 869 | } 870 | .signin-box h2 { 871 | font-size: 17px !important; 872 | } 873 | .signin-box #Username, 874 | .signin-box #Passwd { 875 | height: 37px; 876 | } 877 | .signin-box label.remember { 878 | margin-top: 13px !important; 879 | margin-left: 1em !important; 880 | } 881 | .signin-box .g-button { 882 | height: 37px !important; 883 | line-height: 37px !important; 884 | padding-left: 14px; 885 | padding-right: 14px; 886 | } 887 | .signin-box ul li { 888 | margin: 1.3em 0; 889 | } 890 | .signin-box ul li:first-of-type { 891 | margin-top: .7em; 892 | } 893 | .signin-box input::-webkit-input-placeholder { 894 | display: none; 895 | } 896 | .signin-box h2 { 897 | font-size: 16px; 898 | line-height: 17px; 899 | height: 16px; 900 | margin: 0 0 1.2em; 901 | position: relative; 902 | } 903 | 904 | @media only screen and (-webkit-device-pixel-ratio: 2){ 905 | .signin-box h2 strong { 906 | background-size: 52px 19px; 907 | } 908 | } 909 | .signin-box div { 910 | margin: 0 0 1.5em; 911 | } 912 | .signin-box label { 913 | display: block; 914 | } 915 | .signin-box input[type=username], 916 | .signin-box input[type=text], 917 | .signin-box input[type=password] { 918 | width: 100%; 919 | height: 32px; 920 | font-size: 15px; 921 | direction: ltr; 922 | } 923 | .signin-box .username-label, 924 | .signin-box .passwd-label { 925 | font-weight: bold; 926 | margin: 0 0 .5em; 927 | display: block; 928 | -webkit-user-select: none; 929 | -moz-user-select: none; 930 | user-select: none; 931 | } 932 | .signin-box .reauth { 933 | display: inline-block; 934 | font-size: 15px; 935 | height: 29px; 936 | line-height: 29px; 937 | margin: 0; 938 | } 939 | .signin-box label.remember { 940 | display: inline-block; 941 | vertical-align: top; 942 | margin: 9px 0 0; 943 | } 944 | .signin-box .remember-label { 945 | font-weight: normal; 946 | color: #666; 947 | line-height: 0; 948 | padding: 0 0 0 .4em; 949 | -webkit-user-select: none; 950 | -moz-user-select: none; 951 | user-select: none; 952 | } 953 | .signin-box input[type=submit] { 954 | margin: 0 1.5em 1.2em 0; 955 | height: 32px; 956 | font-size: 13px; 957 | } 958 | .signin-box ul { 959 | margin: 0; 960 | } 961 | .signin-box .training-msg { 962 | padding: .5em 8px; 963 | background: #f9edbe; 964 | } 965 | .signin-box .training-msg p { 966 | margin: 0 0 .5em; 967 | } 968 | strong { 969 | color: #222; 970 | } 971 | input[type=username], 972 | input[type=password], { 973 | -webkit-appearance: none; 974 | appearance: none; 975 | display: inline-block; 976 | height: 29px; 977 | margin: 0; 978 | padding: 0 8px; 979 | background: #fff; 980 | border: 1px solid #d9d9d9; 981 | border-top: 1px solid #c0c0c0; 982 | -webkit-box-sizing: border-box; 983 | -moz-box-sizing: border-box; 984 | box-sizing: border-box; 985 | -webkit-border-radius: 1px; 986 | -moz-border-radius: 1px; 987 | border-radius: 1px; 988 | } 989 | input[type=username]:hover, 990 | input[type=password]:hover, { 991 | border: 1px solid #b9b9b9; 992 | border-top: 1px solid #a0a0a0; 993 | -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 994 | -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 995 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 996 | } 997 | input[type=username]:focus, 998 | input[type=password]:focus, { 999 | outline: none; 1000 | border: 1px solid #4d90fe; 1001 | -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 1002 | -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 1003 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 1004 | } 1005 | input[type=username][disabled=disabled], 1006 | input[type=password][disabled=disabled] { 1007 | border: 1px solid #e5e5e5; 1008 | background: #f1f1f1; 1009 | } 1010 | input[type=username][disabled=disabled]:hover, 1011 | input[type=password][disabled=disabled]:hover { 1012 | -webkit-box-shadow: none; 1013 | -moz-box-shadow: none; 1014 | box-shadow: none; 1015 | } 1016 | input[type=username][readonly=readonly], 1017 | input[type=password][readonly=readonly] { 1018 | border: 1px solid #d9d9d9; 1019 | } 1020 | input[type=username][readonly=readonly]:hover, 1021 | input[type=password][readonly=readonly]:hover, 1022 | input[type=username][readonly=readonly]:focus, 1023 | input[type=password][readonly=readonly]:focus, { 1024 | -webkit-box-shadow: none; 1025 | -moz-box-shadow: none; 1026 | box-shadow: none; 1027 | } 1028 | input[type=username].form-error, 1029 | input[type=password].form-error,{ 1030 | border: 1px solid #dd4b39; 1031 | } 1032 | button, input, select, textarea { 1033 | font-family: inherit; 1034 | font-size: inherit; 1035 | } 1036 | button::-moz-focus-inner, 1037 | input::-moz-focus-inner { 1038 | border: 0; 1039 | } 1040 | 1041 | 1042 | .g-button { 1043 | display: inline-block; 1044 | min-width: 46px; 1045 | text-align: center; 1046 | color: #444; 1047 | font-size: 11px; 1048 | font-weight: bold; 1049 | height: 27px; 1050 | padding: 0 8px; 1051 | line-height: 27px; 1052 | -webkit-border-radius: 2px; 1053 | -moz-border-radius: 2px; 1054 | border-radius: 2px; 1055 | -webkit-transition: all 0.218s; 1056 | -moz-transition: all 0.218s; 1057 | -ms-transition: all 0.218s; 1058 | -o-transition: all 0.218s; 1059 | transition: all 0.218s; 1060 | border: 1px solid #dcdcdc; 1061 | background-color: #f5f5f5; 1062 | background-image: -webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1)); 1063 | background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1); 1064 | background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1); 1065 | background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1); 1066 | background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1); 1067 | background-image: linear-gradient(top,#f5f5f5,#f1f1f1); 1068 | -webkit-user-select: none; 1069 | -moz-user-select: none; 1070 | user-select: none; 1071 | cursor: default; 1072 | } 1073 | *+html .g-button { 1074 | min-width: 70px; 1075 | } 1076 | button.g-button, 1077 | input[type=submit].g-button { 1078 | height: 29px; 1079 | line-height: 29px; 1080 | vertical-align: bottom; 1081 | margin: 0; 1082 | padding: 0; 1083 | } 1084 | *+html button.g-button, 1085 | *+html input[type=submit].g-button { 1086 | overflow: visible; 1087 | } 1088 | .g-button:hover { 1089 | border: 1px solid #c6c6c6; 1090 | color: #333; 1091 | text-decoration: none; 1092 | -webkit-transition: all 0.0s; 1093 | -moz-transition: all 0.0s; 1094 | -ms-transition: all 0.0s; 1095 | -o-transition: all 0.0s; 1096 | transition: all 0.0s; 1097 | background-color: #f8f8f8; 1098 | background-image: -webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#f1f1f1)); 1099 | background-image: -webkit-linear-gradient(top,#f8f8f8,#f1f1f1); 1100 | background-image: -moz-linear-gradient(top,#f8f8f8,#f1f1f1); 1101 | background-image: -ms-linear-gradient(top,#f8f8f8,#f1f1f1); 1102 | background-image: -o-linear-gradient(top,#f8f8f8,#f1f1f1); 1103 | background-image: linear-gradient(top,#f8f8f8,#f1f1f1); 1104 | -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1); 1105 | -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.1); 1106 | box-shadow: 0 1px 1px rgba(0,0,0,0.1); 1107 | } 1108 | .g-button:active { 1109 | background-color: #f6f6f6; 1110 | background-image: -webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#f1f1f1)); 1111 | background-image: -webkit-linear-gradient(top,#f6f6f6,#f1f1f1); 1112 | background-image: -moz-linear-gradient(top,#f6f6f6,#f1f1f1); 1113 | background-image: -ms-linear-gradient(top,#f6f6f6,#f1f1f1); 1114 | background-image: -o-linear-gradient(top,#f6f6f6,#f1f1f1); 1115 | background-image: linear-gradient(top,#f6f6f6,#f1f1f1); 1116 | -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1117 | -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1118 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1119 | } 1120 | .g-button:visited { 1121 | color: #666; 1122 | } 1123 | .g-button-submit { 1124 | border: 1px solid #3079ed; 1125 | color: #fff; 1126 | text-shadow: 0 1px rgba(0,0,0,0.1); 1127 | background-color: #4d90fe; 1128 | background-image: -webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#4787ed)); 1129 | background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed); 1130 | background-image: -moz-linear-gradient(top,#4d90fe,#4787ed); 1131 | background-image: -ms-linear-gradient(top,#4d90fe,#4787ed); 1132 | background-image: -o-linear-gradient(top,#4d90fe,#4787ed); 1133 | background-image: linear-gradient(top,#4d90fe,#4787ed); 1134 | } 1135 | .g-button-submit:hover { 1136 | border: 1px solid #2f5bb7; 1137 | color: #fff; 1138 | text-shadow: 0 1px rgba(0,0,0,0.3); 1139 | background-color: #357ae8; 1140 | background-image: -webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8)); 1141 | background-image: -webkit-linear-gradient(top,#4d90fe,#357ae8); 1142 | background-image: -moz-linear-gradient(top,#4d90fe,#357ae8); 1143 | background-image: -ms-linear-gradient(top,#4d90fe,#357ae8); 1144 | background-image: -o-linear-gradient(top,#4d90fe,#357ae8); 1145 | background-image: linear-gradient(top,#4d90fe,#357ae8); 1146 | } 1147 | .g-button-submit:active { 1148 | background-color: #357ae8; 1149 | background-image: -webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8)); 1150 | background-image: -webkit-linear-gradient(top,#4d90fe,#357ae8); 1151 | background-image: -moz-linear-gradient(top,#4d90fe,#357ae8); 1152 | background-image: -ms-linear-gradient(top,#4d90fe,#357ae8); 1153 | background-image: -o-linear-gradient(top,#4d90fe,#357ae8); 1154 | background-image: linear-gradient(top,#4d90fe,#357ae8); 1155 | -webkit-box-shadow: inset 0 1px 2px rgb a(0,0,0,0.3); 1156 | -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 1157 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 1158 | } 1159 | .g-button-red:visited, 1160 | .g-button-share:visited, 1161 | .g-button-submit:visited { 1162 | color: #fff; 1163 | } 1164 | .g-button-submit:focus, 1165 | .g-button-share:focus, 1166 | .g-button-red:focus { 1167 | -webkit-box-shadow: inset 0 0 0 1px #fff; 1168 | -moz-box-shadow: inset 0 0 0 1px #fff; 1169 | box-shadow: inset 0 0 0 1px #fff; 1170 | } 1171 | .g-button-submit:focus:hover, 1172 | .g-button-share:focus:hover, 1173 | .g-button-red:focus:hover { 1174 | -webkit-box-shadow: inset 0 0 0 1px #fff, 0 1px 1px rgba(0,0,0,0.1); 1175 | -moz-box-shadow: inset 0 0 0 1px #fff, 0 1px 1px rgba(0,0,0,0.1); 1176 | box-shadow: inset 0 0 0 1px #fff, 0 1px 1px rgba(0,0,0,0.1); 1177 | } 1178 | .g-button.selected { 1179 | background-color: #eee; 1180 | background-image: -webkit-gradient(linear,left top,left bottom,from(#eee),to(#e0e0e0)); 1181 | background-image: -webkit-linear-gradient(top,#eee,#e0e0e0); 1182 | background-image: -moz-linear-gradient(top,#eee,#e0e0e0); 1183 | background-image: -ms-linear-gradient(top,#eee,#e0e0e0); 1184 | background-image: -o-linear-gradient(top,#eee,#e0e0e0); 1185 | background-image: linear-gradient(top,#eee,#e0e0e0); 1186 | -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1187 | -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1188 | box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 1189 | border: 1px solid #ccc; 1190 | color: #333; 1191 | } 1192 | .g-button img { 1193 | display: inline-block; 1194 | margin: -3px 0 0; 1195 | opacity: .55; 1196 | filter: alpha(opacity=55); 1197 | vertical-align: middle; 1198 | pointer-events: none; 1199 | } 1200 | *+html .g-button img { 1201 | margin: 4px 0 0; 1202 | } 1203 | .g-button:hover img { 1204 | opacity: .72; 1205 | filter: alpha(opacity=72); 1206 | } 1207 | .g-button:active img { 1208 | opacity: 1; 1209 | filter: alpha(opacity=100); 1210 | } 1211 | .g-button.disabled img { 1212 | opacity: .5; 1213 | filter: alpha(opacity=50); 1214 | } 1215 | .g-button.disabled, 1216 | .g-button.disabled:hover, 1217 | .g-button.disabled:active, 1218 | .g-button-submit.disabled, 1219 | .g-button-submit.disabled:hover, 1220 | .g-button-submit.disabled:active, 1221 | .g-button-share.disabled, 1222 | .g-button-share.disabled:hover, 1223 | .g-button-share.disabled:active, 1224 | .g-button-red.disabled, 1225 | .g-button-red.disabled:hover, 1226 | .g-button-red.disabled:active, 1227 | input[type=submit][disabled].g-button { 1228 | background-color: none; 1229 | opacity: .5; 1230 | filter: alpha(opacity=50); 1231 | cursor: default; 1232 | pointer-events: none; 1233 | } 1234 | 1235 | .blueCheck { 1236 | position: absolute; 1237 | top: 8px; 1238 | left: 4px; 1239 | color: #2A5DB0; 1240 | } 1241 | 1242 | .header { 1243 | margin: auto; 1244 | position: relative; 1245 | width: 300px; 1246 | padding: 0px; 1247 | } 1248 | 1249 | /* additions for adding new feeds and font-awesome */ 1250 | label, input { 1251 | display:block; 1252 | } 1253 | input.text { 1254 | margin-bottom:12px; 1255 | width:95%; 1256 | padding: .4em; 1257 | } 1258 | fieldset { 1259 | padding:0; 1260 | border:0; 1261 | margin-top:5px; 1262 | } 1263 | 1264 | .ui-dialog .ui-state-error { 1265 | padding: .3em; 1266 | } 1267 | .validateTips { 1268 | border: 1px solid transparent; 1269 | padding: 0.3em; 1270 | } 1271 | #catItems-button span { 1272 | display:none; 1273 | } 1274 | #feedsAvail-button span { 1275 | display:none; 1276 | } 1277 | #multipleFeedNotice { 1278 | background-color: #ecf4ff; 1279 | border-color: #88b0f0; 1280 | } 1281 | #indicator { 1282 | position: absolute; 1283 | color:#7BA3CF; 1284 | top: 6px; 1285 | right: -10px; 1286 | } 1287 | .ui-widget-overlay { 1288 | background:#aaaaaa; 1289 | } 1290 | .dialog-nav-bar .ui-widget-header 1291 | { 1292 | background-color:yellow; 1293 | } 1294 | .ui-widget-header { 1295 | position: relative; 1296 | border-top: 1px solid #a0b6e6; 1297 | padding: 4px; 1298 | background: -webkit-gradient(linear,left top,left bottom,from(#d9e2fa),to(#b5c8f9)); 1299 | background: -webkit-linear-gradient(top,#d9e2fa,#b5c8f9); 1300 | background: -moz-linear-gradient(top,#d9e2fa,#b5c8f9); 1301 | background: -ms-linear-gradient(top,#d9e2fa,#b5c8f9); 1302 | background: -o-linear-gradient(top,#d9e2fa,#b5c8f9); 1303 | background-color: #dbe3fa; 1304 | border-bottom: solid 1px #9eadd2; 1305 | z-index: 3; 1306 | } 1307 | 1308 | .ui-widget-content { 1309 | border: 1px solid #c2cff1; 1310 | } 1311 | .ui-state-hover { 1312 | background: black; 1313 | 1314 | 1315 | } 1316 | 1317 | .fullSite { 1318 | float:right; 1319 | } 1320 | 1321 | .entry-icons i { 1322 | top: 10px; 1323 | position: absolute; 1324 | left: -2px; 1325 | } 1326 | 1327 | .starBorder { 1328 | color:#a0b6e6; 1329 | font-weight:bold; 1330 | z-index:10; 1331 | } 1332 | 1333 | .starNotActive { 1334 | color: white; 1335 | 1336 | } 1337 | .starActive { 1338 | color:yellow; 1339 | } 1340 | 1341 | .fa-folder-open { 1342 | color:#F2CA87; 1343 | } 1344 | .fa-folder { 1345 | color:#F2CA87; 1346 | float:right; 1347 | margin-right:4px; 1348 | } 1349 | 1350 | .fa-rss-square { 1351 | color: #8E95E9; 1352 | float: right; 1353 | margin-right: 4px; 1354 | } 1355 | 1356 | /* additions for adding new feeds and font-awesome */ 1357 | -------------------------------------------------------------------------------- /js/g2tt.js: -------------------------------------------------------------------------------- 1 | pref_IsCat = false; 2 | 3 | if (typeof ($.cookie('g2tt_feed')) !== 'undefined') { 4 | pref_Feed = $.cookie('g2tt_feed'); 5 | } 6 | if (typeof ($.cookie('g2tt_isCat')) !== 'undefined') { 7 | pref_IsCat = $.cookie('g2tt_isCat'); 8 | } 9 | if (typeof ($.cookie('g2tt_viewMode')) !== 'undefined') { 10 | pref_ViewMode = $.cookie('g2tt_viewMode'); 11 | } 12 | /* Not used 13 | if (typeof ($.cookie('g2tt_textType')) !== 'undefined') { 14 | pref_textType = $.cookie('g2tt_textType'); 15 | } 16 | */ 17 | if (typeof ($.cookie('g2tt_orderBy')) !== 'undefined') { 18 | pref_OrderBy = $.cookie('g2tt_orderBy'); 19 | } 20 | if (typeof ($.cookie('g2tt_feedSort')) !== 'undefined') { 21 | pref_FeedSort = $.cookie('g2tt_feedSort'); 22 | } 23 | 24 | global_backCat = []; // Feed view always starts with all items 25 | global_ids = []; // List of all article IDs currently displayed 26 | global_parentId = '-4'; 27 | 28 | $(document).ready(function () { 29 | 30 | $('html').unbind('click').click(function () { 31 | $('#header-menu').removeClass('m-button-pressed'); 32 | $('#menuDown').removeClass('hidden'); 33 | $('#menuUp').addClass('hidden'); 34 | 35 | $('.g2tt-menu').hide(); 36 | }); 37 | 38 | $("#login").submit(function (event) { 39 | if (request) { 40 | request.abort(); 41 | } 42 | 43 | var $loginForm = $(this); 44 | var $inputs = $loginForm.find("input"); 45 | var values = {}; 46 | $inputs.each(function () { 47 | values[this.name] = $(this).val(); 48 | }); 49 | 50 | var data = { 51 | 'op': 'login', 52 | 'user': values['Username'], 53 | 'password': values['Passwd'], 54 | }; 55 | 56 | $inputs.prop("disabled", true); 57 | 58 | var request = apiCall(data); 59 | 60 | request.done(function (response, textStatus, jqXHR) { 61 | //console.log(response['content']); 62 | if (response['content'].error =='LOGIN_ERROR'){ 63 | window.alert("Username and/or Password were incorrect!"); 64 | } 65 | if (response['content'].error =='API_DISABLED'){ 66 | window.alert("The API Setting is disabled. Login on the desktop version and enable API in the Preferences."); 67 | } 68 | else { 69 | $.cookie('g2tt_sid', response['content'].session_id, { 70 | expires: 7 71 | }); 72 | $('.login').addClass('hidden'); 73 | $('#main').removeClass('hidden'); 74 | load(); 75 | } 76 | }); 77 | 78 | // callback handler that will be called on failure 79 | request.fail(function (jqXHR, textStatus, errorThrown) { 80 | // log the error to the console 81 | console.error( 82 | "The following error occured: " + 83 | textStatus, errorThrown); 84 | }); 85 | 86 | // callback handler that will be called regardless 87 | // if the request failed or succeeded 88 | request.always(function () { 89 | // reenable the inputs 90 | $inputs.prop("disabled", false); 91 | }); 92 | 93 | // prevent default posting of form 94 | event.preventDefault(); 95 | }); 96 | //end of #login function 97 | 98 | 99 | // Show more items 100 | $('#load-more-items').unbind('click').click(function () { 101 | if(pref_OrderBy == "date_reverse") { 102 | var last = $('.entry-row').last().attr('id'); 103 | } else { 104 | var last = $('.entry-row').length; 105 | } 106 | getHeadlines(last); 107 | }); 108 | 109 | // Menu button 110 | $('#header-menu').unbind('click').click(function (event) { 111 | $(this).toggleClass('m-button-pressed'); 112 | $('#menuDown').toggleClass('hidden'); 113 | $('#menuUp').toggleClass('hidden'); 114 | 115 | //Adjust the placement of the menu based on the height of the Nav bar 116 | //(for when category title is long) 117 | $('.g2tt-menu').css({top: parseInt($('.nav-bar-container').height()) - 8 + "px"}); 118 | $('.g2tt-menu').toggle(); 119 | event.stopPropagation(); 120 | }); 121 | 122 | // Refresh button 123 | $('#header-refresh').unbind('click').click(function () { 124 | $(this).addClass('m-button-pressed'); 125 | if ($('#subscriptions').is(':hidden')) { 126 | location.reload(true); 127 | } 128 | else { 129 | refreshCats(); 130 | } 131 | }); 132 | 133 | // View mode menu selection 134 | $('#' + pref_ViewMode).addClass('g2tt-option-selected'); 135 | $('.showItem').unbind('click').click(function () { 136 | pref_ViewMode = $(this).attr('id'); 137 | $.cookie('g2tt_viewMode', pref_ViewMode); 138 | $('.showItem').removeClass('g2tt-option-selected'); 139 | $(this).addClass('g2tt-option-selected'); 140 | $('.feedsItem').removeClass('g2tt-option-selected'); 141 | $('#feeds-' + pref_ViewMode).addClass('g2tt-option-selected'); 142 | $('#entries').empty(); 143 | $('#subscriptions').attr('class', 'hidden show-' + pref_ViewMode); 144 | getHeadlines(); 145 | }); 146 | 147 | // Order by menu selection 148 | $('#' + pref_OrderBy).addClass('g2tt-option-selected'); 149 | 150 | 151 | $('.sortItem').unbind('click').click(function () { 152 | pref_OrderBy = $(this).attr('id'); 153 | $.cookie('g2tt_orderBy', pref_OrderBy); 154 | $('.sortItem').removeClass('g2tt-option-selected'); 155 | $(this).addClass('g2tt-option-selected'); 156 | $('#entries').empty(); 157 | getHeadlines(); 158 | }); 159 | 160 | // Back to Feeds 161 | $('.back-to-feeds').unbind('click').click(function () { 162 | refreshCats(); 163 | showFeeds(); 164 | }); 165 | 166 | // ADDED - Subscribe to new Feeds 167 | $('#add-new-subscription').unbind('click').click(function () { 168 | $( "#dialog-form" ).dialog( "open" ); 169 | getCategoriesForNewSubscribe(); 170 | 171 | }); 172 | 173 | // View mode feeds menu selection 174 | $('#feeds-' + pref_ViewMode).addClass('g2tt-option-selected'); 175 | $('#subscriptions').addClass('show-' + pref_ViewMode); 176 | $('.feedsItem').unbind('click').click(function () { 177 | pref_ViewMode = $(this).attr('id').substring(6); 178 | $.cookie('g2tt_viewMode', pref_ViewMode); 179 | $('.feedsItem').removeClass('g2tt-option-selected'); 180 | $(this).addClass('g2tt-option-selected'); 181 | $('.showItem').removeClass('g2tt-option-selected'); 182 | $('#' + pref_ViewMode).addClass('g2tt-option-selected'); 183 | $('#subscriptions').attr('class', 'show-' + $(this).attr('id').substring(6)); 184 | }); 185 | 186 | // Sort feeds A-Z 187 | if(pref_FeedSort == '1') { 188 | $('.feedsSort').addClass('g2tt-option-selected'); 189 | } 190 | $('.feedsSort').unbind('click').click(function () { 191 | if(pref_FeedSort == '1') { 192 | pref_FeedSort = '0'; 193 | } else { 194 | pref_FeedSort = '1'; 195 | } 196 | $.cookie('g2tt_feedSort', pref_FeedSort); 197 | $(this).toggle('g2tt-option-selected'); 198 | }); 199 | 200 | // Back to Feeds from sub category 201 | $('#sub-list-back').unbind('click').click(function () { 202 | refreshCats(); 203 | getFeeds(global_backCat.pop()); 204 | $('#add-new-subscription').removeClass('hidden'); 205 | 206 | }); 207 | 208 | // Mark all as read 209 | $('#show-more-row, #menu-mark-read').unbind('click').click(function () { 210 | $('body').removeClass('loaded').addClass('loading'); 211 | $('.load-more-message').html('Marking as read...'); 212 | //remove those that need to be kept unread 213 | keepUnread.removeFromArray(global_ids); 214 | var data = new Object(); 215 | data.op = "updateArticle"; 216 | data.article_ids = global_ids.join(','); 217 | data.mode = 0; 218 | data.field = 2; 219 | var request = apiCall(data); 220 | 221 | request.done(function (response) { 222 | $('#entries').empty(); 223 | getHeadlines(); 224 | }); 225 | }); 226 | 227 | // Logout 228 | $('#menu-logout').unbind('click').click(function () { 229 | var data = new Object(); 230 | data.op = "logout"; 231 | var request = apiCall(data); 232 | 233 | request.done(function (response) { 234 | $.removeCookie('g2tt_feed'); 235 | $.removeCookie('g2tt_isCat'); 236 | $.removeCookie('g2tt_viewMode'); 237 | // Not used $.removeCookie('g2tt_textType'); 238 | $.removeCookie('g2tt_orderBy'); 239 | $.removeCookie('g2tt_sid'); 240 | location.reload(true); 241 | }); 242 | }); 243 | 244 | // Search 245 | // Show search 246 | $('#menu-search').unbind('click').click(function () { 247 | $('.search-box').removeClass('hidden'); 248 | $('#search-input').focus(); 249 | }); 250 | // Clear and hide search 251 | $('#search-cancel').unbind('click').click(function () { 252 | $('#search-input').val(''); 253 | $('.search-box').addClass('hidden'); 254 | }); 255 | // Enter in search field searches 256 | $('#search-input').keypress(function(e) { 257 | if(e.which == 13) { 258 | jQuery(this).blur(); 259 | jQuery('#search-submit').focus().click(); 260 | return false; 261 | } 262 | }); 263 | // Remove currently displayed headlines and search 264 | $('#search-submit').unbind('click').click(function () { 265 | $('#entries').empty(); 266 | getHeadlines(); 267 | return false; 268 | }); 269 | 270 | load(); 271 | 272 | //Added for Subscribe to New Feeds 273 | $('.ui-loader').remove(); 274 | 275 | var feedURL = $( "#feedURL" ), 276 | //password = $( "#password" ), 277 | allFields = $( [] ).add( feedURL ), 278 | tips = $( ".validateTips" ); 279 | 280 | function updateTips( t ) { 281 | tips 282 | .text( t ) 283 | .addClass( "ui-state-highlight" ).removeClass("hidden"); 284 | setTimeout(function() { 285 | tips.removeClass( "ui-state-highlight", 1500 ); 286 | }, 500 ); 287 | } 288 | 289 | function checkLength( o, n, min, max ) { 290 | if ( o.val().length > max || o.val().length < min ) { 291 | o.addClass( "ui-state-error" ); 292 | updateTips( "Length of " + n + " must be between " + 293 | min + " and " + max + "." ); 294 | return false; 295 | } else { 296 | return true; 297 | } 298 | } 299 | 300 | function firstToUpperCase( str ) { 301 | return str.substr(0, 5).toLowerCase() + str.substr(5); 302 | } 303 | 304 | function checkRegexp( o, regexp, n ) { 305 | var makeOvalidHttp = o.val().trim(); 306 | console.log(firstToUpperCase(makeOvalidHttp) ); 307 | if ( !( regexp.test( firstToUpperCase(makeOvalidHttp) ) ) ) { 308 | o.addClass( "ui-state-error" ); 309 | updateTips( n ); 310 | return false; 311 | } else { 312 | return true; 313 | } 314 | } 315 | 316 | $( "#dialog-form" ).dialog({ 317 | 318 | autoOpen: false, 319 | //height: 300, 320 | dialogClass: "dialog-nav-bar", 321 | draggable: false, 322 | resizable: false, 323 | //position: { my: "left top", at: "left top" } , 324 | position: [ 5,10] , 325 | width: 300, 326 | modal: true, 327 | buttons: { 328 | "Subscribe": function() { 329 | var bValid = true; 330 | allFields.removeClass( "ui-state-error" ); 331 | tips.addClass( "hidden"); 332 | 333 | bValid = bValid && checkLength( feedURL, "URL", 5, 1000 ); 334 | bValid = bValid && checkRegexp( feedURL, /^(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/, 335 | "URL must be a valid URL. Make sure the URL is correct and re-submit" ); 336 | 337 | // From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ 338 | 339 | if ( bValid ) { 340 | var catIDnum = $( "#catItems option:selected" ).val(); 341 | var feedURLTrimmed = firstToUpperCase(feedURL.val().trim()); 342 | 343 | var multipleFeedSelected = $( "#feedsAvail option:selected" ).val(); 344 | //console.log('When subscribe is chosen again ' + multipleFeedSelected); 345 | 346 | if (multipleFeedSelected == null) { 347 | $('#feedURL').val(feedURLTrimmed); 348 | var subscriberesult = subscribe( feedURLTrimmed, catIDnum); 349 | // console.log(subscriberesult); 350 | } else { 351 | $('#feedURL').val(multipleFeedSelected); 352 | var subscriberesult = subscribe( multipleFeedSelected, catIDnum); 353 | //console.log(subscriberesult); 354 | } 355 | 356 | 357 | 358 | } 359 | }, 360 | Cancel: function() { 361 | $( this ).dialog( "close" ); 362 | } 363 | }, 364 | close: function() { 365 | allFields.val( "" ).removeClass( "ui-state-error" ); 366 | } 367 | }); 368 | 369 | //Added for Subscribe to New Feeds 370 | 371 | // Hotkeys 372 | $(document).bind('keydown', 'j', expandNextEntry); 373 | $(document).bind('keydown', 'k', expandPreviousEntry); 374 | $(document).bind('keydown', 'n', jumpNextEntry); 375 | $(document).bind('keydown', 'p', jumpPreviousEntry); 376 | $(document).bind('keydown', 'o', toggleCurrentEntryAsExpanded); 377 | $(document).bind('keydown', 'm', toggleCurrentEntryAsRead); 378 | }); 379 | 380 | 381 | 382 | function refreshCats() { 383 | var data = new Object(); 384 | data.op = "getCounters"; 385 | data.output_mode = "fc"; 386 | var request = apiCall(data); 387 | 388 | request.done(function (response) { 389 | var counters = response['content']; 390 | var cats = []; 391 | var feeds = []; 392 | 393 | for (var i = 0; i < counters.length; i++) { 394 | if (counters[i]['kind'] == 'cat') { 395 | cats[counters[i]['id']] = (counters[i]); 396 | } else { 397 | feeds[counters[i]['id']] = (counters[i]); 398 | } 399 | } 400 | $('.sub-row').each(function (i,j) { 401 | var id = $(this).attr('id').substring(10); 402 | var is_cat = ($(this).hasClass('open-sub-folder') || $(this).hasClass('closed-sub-folder')); 403 | 404 | if (id == "-4" || id == "-1") { 405 | $(this).find('.item-count-value').html(feeds['global-unread']['counter']); 406 | if (feeds['global-unread']['counter'] == '0') { 407 | $(this).addClass('no-unread-sub-row').removeClass('unread-sub'); 408 | $('#subscriptions').removeClass('show-unread').addClass('show-all'); 409 | } else { 410 | $(this).removeClass('no-unread-sub-row').addClass('unread-sub'); 411 | if (pref_ViewMode == 'unread' && $('#subscriptions').hasClass('show-all')) { 412 | $('#subscriptions').removeClass('show-all').addClass('show-unread'); 413 | } 414 | } 415 | } else if (is_cat) { 416 | $(this).find('.item-count-value').html(cats[id]['counter']); 417 | if (cats[id]['counter'] == '0') { 418 | $(this).addClass('no-unread-sub-row').removeClass('unread-sub'); 419 | } else { 420 | $(this).removeClass('no-unread-sub-row').addClass('unread-sub'); 421 | } 422 | } else { 423 | $(this).find('.item-count-value').html(feeds[id]['counter']); 424 | if (feeds[id]['counter'] == '0') { 425 | $(this).addClass('no-unread-sub-row').removeClass('unread-sub'); 426 | } else { 427 | $(this).removeClass('no-unread-sub-row').addClass('unread-sub'); 428 | } 429 | } 430 | }); 431 | 432 | showEmpty(); 433 | 434 | $('#header-refresh').removeClass('m-button-pressed'); 435 | }); 436 | } 437 | 438 | function showEmpty() { 439 | var visible = $('#sub-' + global_parentId).children(':visible'); 440 | if (visible.length == 0) { 441 | $('#subscriptions').removeClass('show-unread').addClass('show-all'); 442 | } 443 | } 444 | 445 | function showFeeds() { 446 | $('#feed').addClass('hidden'); 447 | $('#subscriptions').removeClass('hidden'); 448 | $('.back-to-feeds').addClass('hidden'); 449 | $('.articlesMenu').addClass('hidden'); 450 | $('.feedsMenu').removeClass('hidden'); 451 | //added to show + for adding new subscriptions 452 | $('#add-new-subscription').removeClass('hidden'); 453 | if (global_parentId != '-4') { 454 | $('#sub-list-back').removeClass('hidden'); 455 | //added to show + for hiding new subscriptions 456 | $('#add-new-subscription').addClass('hidden'); 457 | 458 | } 459 | $('#nav-title').html(''); 460 | } 461 | 462 | function showArticles() { 463 | $('#feed').removeClass('hidden'); 464 | $('#subscriptions').addClass('hidden'); 465 | //added to hide + for add new subscriptions 466 | $('#add-new-subscription').addClass('hidden'); 467 | 468 | $('.back-to-feeds').removeClass('hidden'); 469 | $('.articlesMenu').removeClass('hidden'); 470 | $('.feedsMenu').addClass('hidden'); 471 | $('#sub-list-back').addClass('hidden'); 472 | } 473 | 474 | function apiCall(data, asynch) { 475 | if (typeof (asynch) === 'undefined') asynch = true; 476 | data.sid = $.cookie('g2tt_sid'); 477 | data = JSON.stringify(data); 478 | var request = $.ajax({ 479 | url: global_ttrssUrl + "/api/", 480 | type: "post", 481 | dataType: "json", 482 | data: data, 483 | asynch: asynch, 484 | }); 485 | 486 | return request; 487 | } 488 | 489 | function getHeadlines(since) { 490 | $('body').addClass('loading'); 491 | $('.load-more-message').html('Loading...'); 492 | $('.entries-count').html(''); 493 | if (typeof (since) === 'undefined') since = 0; 494 | 495 | //Anytime we get headlines, check if there is a search filter 496 | var search = $('#search-input').val(); 497 | 498 | var data = new Object(); 499 | data.op = "getHeadlines"; 500 | data.feed_id = pref_Feed; 501 | //data.limit = 25; 502 | //uses config.js to get feed limit 503 | data.limit = pref_Feed_limit; 504 | data.show_excerpt = 1; 505 | data.show_content = 1; 506 | data.include_attachments = 0; 507 | data.view_mode = pref_ViewMode; 508 | data.is_cat = pref_IsCat; 509 | data.include_nested = true; 510 | data.order_by = pref_OrderBy; 511 | if (pref_OrderBy == "date_reverse") { 512 | data.since_id = since; 513 | } else { 514 | data.skip = since; 515 | } 516 | data.search = search; 517 | var headlines = apiCall(data); 518 | 519 | headlines.done(function (response, textStatus, jqXHR) { 520 | if (response['status'] != 0) { 521 | $.removeCookie('g2tt_sid'); 522 | getData(); 523 | return; 524 | } 525 | headlines = response['content']; 526 | 527 | if (headlines.length != data.limit) { 528 | $('#load-more-items').hide(); 529 | } else { 530 | $('#load-more-items').show(); 531 | } 532 | $.each(headlines, function (index, headline) { 533 | global_ids.push(headline.id); 534 | var email_subject = headline.title; 535 | var email_body = '

Sent to you via tt-rss

' + headline.title + '

' + headline.content; 536 | 537 | var $content = $(headline.content); 538 | var alt = null; 539 | if($content.length == 1 && $content.is("img") && (alt = ($content.attr("title") || $content.attr("alt")))){ 540 | $content = $("
" + $content[0].outerHTML + "
" + alt + "
"); 541 | } else { 542 | var $container = $("
"); 543 | $container.append($content); 544 | $content = $container; 545 | } 546 | 547 | var date = new Date(headline.updated * 1000); 548 | var entry = "
\ 549 |
\ 550 |
\ 551 | \ 552 | \ 553 | Next item \ 554 | \ 555 | \ 556 | \ 557 | Collapse \ 558 | \ 559 |
\ 560 |
\ 561 |
\ 562 | \ 563 | \ 564 |
\ 565 |
\ 566 |
\ 567 | " + headline.title + " \ 568 | " + headline.title + " \ 570 |  - " + headline.feed_title + " \ 571 |
" + ((headline.excerpt && headline.excerpt != '…')? headline.excerpt : $(headline.content).text().substr(0, 100) + '…') + "
\ 572 |
\ 573 |
by " + headline.author + " on " + date.toLocaleString() + "
\ 574 |
\ 575 |
\ 576 |
\ 577 |
\ 578 |
\ 579 |
" + $content[0].outerHTML + "
\ 580 |
\ 581 | \ 593 |
\ 594 |
\ 595 |
\ 596 |
"; 597 | 598 | $('#entries').append(entry); 599 | }); 600 | 601 | // Expand an entry 602 | $('.entry-header-body').unbind('click').click(function () { 603 | expandEntry($(this).closest('.entry-row')); 604 | }); 605 | 606 | // Collapse an entry 607 | $('.entry-top-bar').unbind('click').click(function () { 608 | collapseEntry($(this).closest('.entry-row')); 609 | }); 610 | 611 | // Next entry 612 | $('.entry-next').unbind('click').click(function (event) { 613 | expandEntry($(this).closest('.entry-row').next()); 614 | event.stopPropagation(); 615 | }); 616 | 617 | // Toggle read 618 | $('.read-state').unbind('click').click(function () { 619 | toggleEntryAsRead($(this).closest('.entry-row')); 620 | }); 621 | 622 | /* 623 | // Mark (star) entry 624 | $('.star').unbind('click').click(function () { 625 | var data = new Object(); 626 | data.op = "updateArticle"; 627 | data.article_ids = $(this).closest('.entry-row').attr('id'); 628 | data.mode = 2; 629 | data.field = 0; 630 | var response = apiCall(data); 631 | $(this).toggleClass('item-star').toggleClass('item-star-active'); 632 | }); 633 | */ 634 | 635 | // Mark NewFont (star) entry 636 | $('.favStarDiv').unbind('click').click(function () { 637 | var data = new Object(); 638 | data.op = "updateArticle"; 639 | data.article_ids = $(this).closest('.entry-row').attr('id'); 640 | data.mode = 2; 641 | data.field = 0; 642 | var response = apiCall(data); 643 | 644 | $(this).next().toggleClass('starNotActive').toggleClass('starActive'); 645 | //console.log(newstar); 646 | }); 647 | 648 | // Done loading 649 | $('body').removeClass('loading').addClass('loaded'); 650 | $('.load-more-message').html('Mark these items as read'); 651 | $('.entries-count').html('Showing ' + $('.entry-row').length + ' items'); 652 | keepUnread.clean(global_ids); 653 | }); 654 | } 655 | 656 | function getTopCategories() { 657 | $('#nav-title').html(''); 658 | $('#sub-list-back').addClass('hidden'); 659 | if ($('#sub--4').length != 0) { 660 | $('#subscriptions-list').children().addClass('hidden'); 661 | $('#sub--4').removeClass('hidden'); 662 | $('.closed-sub-folder').unbind('click').click(function () { 663 | global_backCat.push("-4"); 664 | $('#subscriptions-list').children().addClass('hidden'); 665 | getFeeds($(this).attr('id').substring(10), $(this).find('.sub-item').html(), $(this).find('.item-count-value').html()); 666 | }); 667 | } else { 668 | $('body').addClass('loading').addClass('sub-tree'); 669 | $('#loading-area-container').removeClass('hidden'); 670 | 671 | $('#subscriptions-list').append("
"); 672 | 673 | var data = new Object(); 674 | data.op = "getUnread"; 675 | var request = apiCall(data); 676 | request.done(function (response, textStatus, jqXHR) { 677 | unread = response['content'].unread; 678 | 679 | var entry = "
\ 680 |
\ 681 |
\ 682 |
All articles
\ 683 |
\ 684 | " + unread + " \ 685 |
\ 686 |
"; 687 | 688 | $('#sub--4').prepend(entry); 689 | 690 | $('#tree-item--4').unbind('click').click(function () { 691 | $.cookie('g2tt_feed', $(this).attr('id').substring(10)); 692 | $.cookie('g2tt_isCat', false); 693 | pref_Feed = $.cookie('g2tt_feed'); 694 | pref_IsCat = $.cookie('g2tt_isCat'); 695 | getData(); 696 | }); 697 | }); 698 | 699 | var data = new Object(); 700 | data.op = "getCategories"; 701 | data.enable_nested = true; 702 | var cats = apiCall(data); 703 | 704 | cats.done(function (response, textStatus, jqXHR) { 705 | cats = response['content']; 706 | 707 | cats.sort(function (a, b) { 708 | var db_order = ((a.order_id < b.order_id) ? -1 : ((a.order_id > b.order_id) ? 1 : 0)); 709 | var alpha_order = ((a.title < b.title) ? -1 : ((a.title > b.title) ? 1 : 0)); 710 | if (pref_FeedSort == '1') { 711 | return alpha_order; 712 | } else { 713 | return db_order; 714 | } 715 | }); 716 | $.each(cats, function (index, cat) { 717 | var entry = "
\ 718 |
\ 719 |
\ 720 |
" + cat.title + "
\ 721 |
\ 722 | " + cat.unread + " \ 723 |
\ 724 |
"; 725 | 726 | $('#sub--4').append(entry); 727 | 728 | }); 729 | 730 | $('.closed-sub-folder').unbind('click').click(function () { 731 | global_backCat.push("-4"); 732 | $('#subscriptions-list').children().addClass('hidden'); 733 | getFeeds($(this).attr('id').substring(10), $(this).find('.sub-item').html(), $(this).find('.item-count-value').html()); 734 | }); 735 | 736 | // Done loading 737 | $('body').removeClass('loading').addClass('loaded'); 738 | $('#loading-area-container').addClass('hidden'); 739 | }); 740 | } 741 | } 742 | 743 | function getFeeds(parent_id, parent_title, parent_unread) { 744 | global_parentId = parent_id; 745 | if (parent_id === '-4') { 746 | getTopCategories(); 747 | return; 748 | } 749 | $('#nav-title').html(''); 750 | $('#sub-list-back').removeClass('hidden'); 751 | //added to show + for adding new subscriptions 752 | $('#add-new-subscription').addClass('hidden'); 753 | 754 | if ($('#sub-' + parent_id).length != 0) { 755 | $('#subscriptions-list').children().addClass('hidden'); 756 | $('#sub-' + parent_id).removeClass('hidden'); 757 | $('.closed-sub-folder').unbind('click').click(function () { 758 | global_backCat.push(parent_id); 759 | $('#subscriptions-list').children().addClass('hidden'); 760 | getFeeds($(this).attr('id').substring(10), $(this).find('.sub-item').html(), $(this).find('.item-count-value').html()); 761 | }); 762 | } else { 763 | $('body').addClass('loading').addClass('sub-tree'); 764 | $('#loading-area-container').removeClass('hidden'); 765 | 766 | var data = new Object(); 767 | data.op = "getFeeds"; 768 | data.cat_id = parent_id; 769 | data.include_nested = true; 770 | var feeds = apiCall(data); 771 | 772 | feeds.done(function (response, textStatus, jqXHR) { 773 | feeds = response['content']; 774 | feeds.sort(function (a, b) { 775 | var alpha_order = ((a.title < b.title) ? -1 : ((a.title > b.title) ? 1 : 0)); 776 | if (pref_FeedSort == '1') { 777 | return alpha_order; 778 | } else { 779 | return ((a.cat_id < b.cat_id) ? -1 : ((a.cat_id > b.cat_id) ? 1 : 0)); 780 | } 781 | }); 782 | $('#subscriptions-list').append("
"); 783 | 784 | var entry = "
\ 785 |
\ 786 |
\ 787 |
" + parent_title + "
\ 788 |
\ 789 | " + parent_unread + " \ 790 |
\ 791 |
"; 792 | 793 | $('#sub-' + parent_id).prepend(entry); 794 | 795 | $.each(feeds, function (index, feed) { 796 | var entry = "
\ 797 |
\ 798 |
\ 799 |
" + feed.title + "
\ 800 |
\ 801 | " + feed.unread + " \ 802 |
\ 803 |
"; 804 | 805 | $('#sub-' + parent_id).append(entry); 806 | 807 | }); 808 | 809 | $('.closed-sub-folder').unbind('click').click(function () { 810 | global_backCat.push(parent_id); 811 | $('#subscriptions-list').children().addClass('hidden'); 812 | getFeeds($(this).attr('id').substring(10), $(this).find('.sub-item').html(), $(this).find('.item-count-value').html()); 813 | }); 814 | 815 | $('.open-sub-folder[id!="tree-item--4"]').unbind('click').click(function () { 816 | $.cookie('g2tt_feed', $(this).attr('id').substring(10)); 817 | $.cookie('g2tt_isCat', true); 818 | pref_Feed = $.cookie('g2tt_feed'); 819 | pref_IsCat = $.cookie('g2tt_isCat'); 820 | getData(); 821 | }); 822 | 823 | $('.sub').unbind('click').click(function () { 824 | $.cookie('g2tt_feed', $(this).attr('id').substring(10)); 825 | $.cookie('g2tt_isCat', false); 826 | pref_Feed = $.cookie('g2tt_feed'); 827 | pref_IsCat = $.cookie('g2tt_isCat'); 828 | getData(); 829 | }); 830 | 831 | // Done loading 832 | $('body').removeClass('loading').addClass('loaded'); 833 | $('#loading-area-container').addClass('hidden'); 834 | }); 835 | } 836 | } 837 | 838 | function getTitle() { 839 | var data = new Object(); 840 | if (pref_IsCat == "true") { 841 | data.op = "getCategories"; 842 | } else { 843 | data.op = "getFeeds"; 844 | data.cat_id = "-4"; 845 | } 846 | 847 | var request = apiCall(data); 848 | 849 | request.done(function (response, textStatus, jqXHR) { 850 | if (response['status'] != 0) { 851 | $.removeCookie('g2tt_sid'); 852 | getData(); 853 | return; 854 | } 855 | items = response['content']; 856 | 857 | $.each(items, function (index, item) { 858 | if (item.id == pref_Feed) { 859 | $('#nav-title').html(item.title); 860 | return; 861 | } 862 | }); 863 | }); 864 | } 865 | 866 | function load() { 867 | if (typeof ($.cookie('g2tt_sid')) === 'undefined') { 868 | $('#main').addClass('hidden'); 869 | $('.login').removeClass('hidden'); 870 | } else if (pref_StartInCat == '1') { 871 | showFeeds(); 872 | getTopCategories(); 873 | } else { 874 | getTitle(); 875 | getHeadlines(); 876 | getTopCategories(); 877 | } 878 | } 879 | 880 | function getData() { 881 | showArticles(); 882 | $('body').removeClass('loaded').addClass('loading'); 883 | $('.load-more-message').html('Marking as read...'); 884 | $('#entries').empty(); 885 | global_ids = []; 886 | getTitle(); 887 | getHeadlines(); 888 | } 889 | 890 | var keepUnread = new function() { 891 | var COOKIE_NAME = 'g2tt_keepUnread_ids'; 892 | this.keepUnreadIdMap = undefined; 893 | 894 | this.hasId = function (ids, articleId) { 895 | return true == getIdMap[articleId]; 896 | }; 897 | this.removeId = function (articleId) { 898 | delete getIdMap()[articleId]; 899 | }; 900 | this.addId = function (articleId) { 901 | getIdMap()[articleId] = true; 902 | this.save(); 903 | }; 904 | this.clean = function (ids) { 905 | //check that global_keepUnread_ids does not contain items which are no longer in global_ids 906 | var keepUnreadIds = getIdMap(); 907 | if (ids.length > 0) { 908 | for (var id in keepUnreadIds) { 909 | id = id|0;//id must be numeric 910 | if ($.inArray(id, ids) < 0) { 911 | this.removeId(id); 912 | } 913 | } 914 | } 915 | this.save(); 916 | }; 917 | 918 | var getIdMap = function () { 919 | if (undefined == this.keepUnreadIdMap) { 920 | //attempt to load from cookie 921 | this.keepUnreadIdMap = []; 922 | var savedKeepUnread_ids; 923 | if (typeof ($.cookie(COOKIE_NAME)) !== 'undefined') { 924 | savedKeepUnread_ids = $.cookie(COOKIE_NAME); 925 | } 926 | 927 | if (savedKeepUnread_ids && savedKeepUnread_ids.length > 0) { 928 | var idList = savedKeepUnread_ids.split(','); 929 | for (var i=0; i < idList.length; i++) { 930 | this.keepUnreadIdMap[idList[i]] = true; 931 | } 932 | } 933 | } 934 | return this.keepUnreadIdMap; 935 | }; 936 | 937 | /*given array of ids, remove all that need to be kept unread*/ 938 | this.removeFromArray = function (ids) { 939 | var keepUnreadIds = getIdMap(); 940 | for (var id in keepUnreadIds) { 941 | id = id|0;//id must be numeric 942 | var index = $.inArray(id, ids); 943 | if ( index >= 0) { 944 | ids.splice(index, 1); 945 | } 946 | } 947 | }; 948 | this.save = function () { 949 | var strVal = ''; 950 | var keepIdMap = getIdMap(); 951 | for (articleId in keepIdMap) { 952 | if (strVal.length > 0) { 953 | strVal += ','; 954 | } 955 | strVal += articleId; 956 | } 957 | $.cookie(COOKIE_NAME, strVal); 958 | }; 959 | } 960 | 961 | 962 | //ADDED for subscribing to new feeds 963 | 964 | function subscribe( feedurl, categoryID) { 965 | 966 | 967 | var subscribeResult = ""; 968 | var data = new Object(); 969 | data.op = "subscribeToFeed"; 970 | data.feed_url = feedurl; 971 | data.category_id = categoryID; 972 | //data.sid = session_id; 973 | $('#indicator').removeClass('hidden'); 974 | var request = apiCall(data); 975 | 976 | 977 | // return request; 978 | //var request = apiCall(data); 979 | 980 | request.done(function (response, textStatus, jqXHR) { 981 | var content = response['content']; 982 | var message = response['content'].status.message; 983 | var status = response['content'].status; 984 | var statusCode = response['content'].status.code; 985 | //var feeds = []; 986 | var feeds = response['content'].status.feeds; 987 | var feedUrls = []; 988 | var feedUrlsTitles = []; 989 | 990 | for (var key in feeds) { 991 | if (feeds.hasOwnProperty(key)) { 992 | 993 | feedUrls.push(key); 994 | feedUrlsTitles.push(feeds[key]); 995 | } 996 | } 997 | 998 | 999 | //console.log(statusCode); 1000 | switch(statusCode) { 1001 | case 0: 1002 | //0 - OK, Feed already exists 1003 | //var status0 = confirm('Feed already exists in your feed list. Press OK to return to feed list, or Cancel to try again.'); 1004 | $('#indicator').addClass('hidden'); 1005 | window.alert('Feed already exists in your feed list.'); 1006 | 1007 | //uncomment next line if you'd like it to close pop-up when they press OK. 1008 | //$( "#dialog-form" ).dialog( "close" ); 1009 | 1010 | break; 1011 | case 1: 1012 | //1 - OK, Feed added 1013 | $('#indicator').addClass('hidden'); 1014 | var tips = $( ".validateTips" ); 1015 | tips.text( 'Your Feed was Added' ) 1016 | .addClass( "ui-state-highlight" ).removeClass("hidden"); 1017 | $('#multipleFeedNotice').addClass('hidden'); 1018 | $('#multipleFeedsSelect').addClass('hidden'); 1019 | setTimeout(function() { 1020 | //tips.removeClass( "ui-state-highlight", 1500 ); 1021 | 1022 | $('#feedURL').val(""); 1023 | }, 100 ); 1024 | 1025 | //uncomment next line if you'd like it to close pop-up when subscription is added. 1026 | //$( "#dialog-form" ).dialog( "close" ); 1027 | break; 1028 | case 2: 1029 | //2 - Invalid URL 1030 | $('#indicator').addClass('hidden'); 1031 | $('#multipleFeedNotice').addClass('hidden'); 1032 | $('#multipleFeedsSelect').addClass('hidden'); 1033 | window.alert('Invalid URL submitted. Please check URL and try again.'); 1034 | 1035 | break; 1036 | case 3: 1037 | //3 - URL content is HTML, no feeds available 1038 | $('#indicator').addClass('hidden'); 1039 | $('#multipleFeedNotice').addClass('hidden'); 1040 | $('#multipleFeedsSelect').addClass('hidden'); 1041 | window.alert('URL content is HTML, no feeds available. Please check that URL has feeds and try again.'); 1042 | 1043 | break; 1044 | case 4: 1045 | //4 - URL content is HTML which contains multiple feeds. 1046 | $('#indicator').addClass('hidden'); 1047 | $('#multipleFeedNotice').removeClass('hidden'); 1048 | $('#multipleFeedsSelect').removeClass('hidden'); 1049 | console.log(feeds); 1050 | //$('#feedsAvail').append( $('').val('').html('Choose available feed') ); 1051 | 1052 | $.each(feeds, function(url, title){ 1053 | $('#feedsAvail').append( $('').val(url).html(title) ); 1054 | 1055 | }); 1056 | console.log('Populate Multiple FeedsNew'); 1057 | break; 1058 | case 5: 1059 | //5 - Couldn't download the URL content. 1060 | $('#indicator').addClass('hidden'); 1061 | $('#multipleFeedNotice').addClass('hidden'); 1062 | $('#multipleFeedsSelect').addClass('hidden'); 1063 | window.alert('Unable to download the URL content. Please check your internet connection or the URL and try again.'); 1064 | 1065 | break; 1066 | case 6: 1067 | //6 - Content is an invalid XML. 1068 | $('#indicator').addClass('hidden'); 1069 | $('#multipleFeedNotice').addClass('hidden'); 1070 | $('#multipleFeedsSelect').addClass('hidden'); 1071 | window.alert('Content is an invalid XML format. Please visit the website you are trying to add to verify they use XML feed output.'); 1072 | 1073 | break; 1074 | } 1075 | 1076 | 1077 | 1078 | 1079 | return response; 1080 | 1081 | /** 1082 | * @return array (code => Status code, message => error message if available) 1083 | * 1084 | * 0 - OK, Feed already exists 1085 | * 1 - OK, Feed added 1086 | * 2 - Invalid URL 1087 | * 3 - URL content is HTML, no feeds available 1088 | * 4 - URL content is HTML which contains multiple feeds. 1089 | * Here you should call extractfeedurls in rpc-backend 1090 | * to get all possible feeds. 1091 | * 5 - Couldn't download the URL content. 1092 | * 6 - Content is an invalid XML. 1093 | */ 1094 | 1095 | 1096 | }); 1097 | //$('#indicator').addClass('hidden'); 1098 | 1099 | } 1100 | 1101 | 1102 | //haven't implemented yet. 1103 | function unSubscribe(url, session_id, feed_id) { 1104 | var subscribeResult = ""; 1105 | var data = { 1106 | op: "unsubscribeFeed", 1107 | sid: session_id, 1108 | feed_id: feed_id 1109 | }; 1110 | 1111 | $.ajax({ 1112 | type: "POST", 1113 | url: url + "/api/", 1114 | contentType: "application/json", 1115 | data: JSON.stringify(data), 1116 | dataType: "json", 1117 | async:false, 1118 | success: function(data) 1119 | { 1120 | subscribeResult = data.content.status; 1121 | 1122 | }, 1123 | error: function() 1124 | { 1125 | showAlert("Network Error, Please Check Network","ttRss"); 1126 | } 1127 | }); 1128 | return subscribeResult; 1129 | } 1130 | 1131 | function getCategoriesForNewSubscribe() { 1132 | var data = new Object(); 1133 | data.op = "getFeedTree"; 1134 | data.include_empty = true; 1135 | // data.op = "getCategories"; 1136 | data.enable_nested = false; 1137 | var catsForNew = apiCall(data); 1138 | 1139 | catsForNew.done(function (response, textStatus, jqXHR) { 1140 | catsForNew = response['content']; 1141 | // console.log(catsForNew); 1142 | 1143 | $('#catItems').find('option').remove(); 1144 | $('#catItems').append( $('').val(0).html('Uncategorized') ); 1145 | 1146 | $.each(catsForNew, function (index, cat) { 1147 | $.each(cat.items, function (index, catObject){ 1148 | //console.log(index); 1149 | var catObjectIds = []; 1150 | if (catObject.bare_id != -1 && catObject.bare_id != 0 ) { 1151 | catObjectIds.push({"parent_id":catObject.bare_id,"child_id":catObject.bare_id,"Name":catObject.name}); 1152 | } 1153 | // console.log(catObjectIds); 1154 | // console.log(catObject); 1155 | $.each(catObject.items, function(index, subcatObject){ 1156 | var subcatObjectIds = []; 1157 | 1158 | if (subcatObject.type == "category") { 1159 | //subcatObjectIds.push({"parent_id":catObject.bare_id,"child_id":subcatObject.bare_id,"Name":subcatObject.name}); 1160 | catObjectIds.push({"parent_id":catObject.bare_id,"child_id":subcatObject.bare_id,"Name":subcatObject.name}); 1161 | //console.log(subcatObjectIds.Name); 1162 | //console.log(catObject,subcatObject); 1163 | 1164 | } 1165 | //console.log(subcatObject); 1166 | }); 1167 | 1168 | //put Uncategorized first 1169 | 1170 | 1171 | $.each(catObjectIds, function(index, objects){ 1172 | 1173 | $.each(objects, function(parent_id, child_id, Name ) { 1174 | // console.log(parent_id); 1175 | //$('#catItems').append( $('').val(val).html(text) ) 1176 | }); 1177 | if (objects.parent_id == objects.child_id) { 1178 | 1179 | $('#catItems').append( $('').val(objects.parent_id).html(objects.Name) ); 1180 | } else { 1181 | var newOptionCat = $('#catItems').append( $('').val(objects.child_id).html('⌊ ' + objects.Name) ); 1182 | //newOptionCat.prepend('⌊'); 1183 | } 1184 | 1185 | 1186 | //console.log(objects.parent_id); 1187 | //console.log(objects.child_id); 1188 | //console.log(objects.Name); 1189 | }); 1190 | 1191 | }); 1192 | 1193 | }); 1194 | 1195 | 1196 | 1197 | }); 1198 | 1199 | } 1200 | 1201 | function expandEntry($entryRow) { 1202 | if ($entryRow.hasClass('expanded')) { 1203 | return; 1204 | } 1205 | 1206 | $('.expanded').removeClass('expanded'); 1207 | $entryRow.addClass('expanded'); 1208 | $('html,body').scrollTop($entryRow.offset().top); 1209 | 1210 | $('.current-entry').removeClass('current-entry'); 1211 | $entryRow.addClass('current-entry'); 1212 | 1213 | // Mark as read 1214 | if (! $entryRow.hasClass('read')) { 1215 | $entryRow.addClass('read'); 1216 | var data = new Object(); 1217 | data.op = "updateArticle"; 1218 | data.article_ids = $entryRow.attr('id'); 1219 | data.mode = 0; 1220 | data.field = 2; 1221 | var response = apiCall(data); 1222 | } 1223 | } 1224 | 1225 | function collapseEntry($entryRow) { 1226 | $entryRow.removeClass('expanded'); 1227 | } 1228 | 1229 | function toggleEntryAsExpanded($entryRow) { 1230 | if ($entryRow.hasClass('expanded')) { 1231 | collapseEntry($entryRow); 1232 | 1233 | } else { 1234 | expandEntry($entryRow); 1235 | } 1236 | } 1237 | 1238 | function toggleCurrentEntryAsExpanded($entryRow) { 1239 | if ($('.current-entry').length) { 1240 | toggleEntryAsExpanded($('.current-entry')); 1241 | } 1242 | } 1243 | 1244 | function expandNextEntry() { 1245 | if (! $('.current-entry').length) { 1246 | $nextEntry = $('.entry-row').eq(0); 1247 | 1248 | } else { 1249 | $nextEntry = $('.current-entry').next(); 1250 | } 1251 | 1252 | if (! $nextEntry.is('.entry-row')) { 1253 | return; 1254 | } 1255 | 1256 | expandEntry($nextEntry); 1257 | } 1258 | 1259 | function expandPreviousEntry() { 1260 | if (! $('.current-entry').length) { 1261 | return 1262 | } 1263 | 1264 | $previous = $('.current-entry').prev(); 1265 | 1266 | if (! $previous.is('.entry-row')) { 1267 | return; 1268 | } 1269 | 1270 | expandEntry($previous); 1271 | } 1272 | 1273 | function jumpNextEntry() { 1274 | if (! $('.current-entry').length) { 1275 | $nextEntry = $('.entry-row').eq(0); 1276 | 1277 | } else { 1278 | $nextEntry = $('.current-entry').next(); 1279 | } 1280 | 1281 | if (! $nextEntry.is('.entry-row')) { 1282 | return; 1283 | } 1284 | 1285 | $('.current-entry').removeClass('current-entry'); 1286 | $nextEntry.addClass('current-entry'); 1287 | 1288 | if (! isElementInViewport($('.current-entry'))) { 1289 | $('.current-entry')[0].scrollIntoView(false); 1290 | } 1291 | } 1292 | 1293 | function jumpPreviousEntry() { 1294 | if (! $('.current-entry').length) { 1295 | return 1296 | } 1297 | 1298 | $previous = $('.current-entry').prev(); 1299 | 1300 | if (! $previous.is('.entry-row')) { 1301 | return; 1302 | } 1303 | 1304 | $('.current-entry').removeClass('current-entry'); 1305 | $previous.addClass('current-entry'); 1306 | 1307 | if (! isElementInViewport($('.current-entry'))) { 1308 | $('.current-entry')[0].scrollIntoView(); 1309 | } 1310 | } 1311 | 1312 | function toggleEntryAsRead($entryRow) { 1313 | $entryRow.toggleClass('read'); 1314 | 1315 | if (! $entryRow.hasClass('read')) { 1316 | $entryRow.find(".read-state").html(" Mark read"); 1317 | for (var i = 0; i < global_ids.length; i++) { 1318 | var articleId = $entryRow.attr('id'); 1319 | if (global_ids[i] == articleId) { 1320 | global_ids.splice(i,1); 1321 | keepUnread.addId(articleId); 1322 | } 1323 | } 1324 | } else { 1325 | $entryRow.find(".read-state").html(" Mark unread"); 1326 | var articleId = $entryRow.attr('id'); 1327 | global_ids.push(articleId); 1328 | keepUnread.removeId(articleId); 1329 | } 1330 | 1331 | var data = new Object(); 1332 | data.op = "updateArticle"; 1333 | data.article_ids = $entryRow.attr('id'); 1334 | data.mode = 2; 1335 | data.field = 2; 1336 | var response = apiCall(data); 1337 | } 1338 | 1339 | function toggleCurrentEntryAsRead($entryRow) { 1340 | if ($('.current-entry').length) { 1341 | toggleEntryAsRead($('.current-entry')); 1342 | } 1343 | } 1344 | 1345 | // source: http://stackoverflow.com/a/7557433/1135429 1346 | function isElementInViewport (el) { 1347 | //special bonus for those using jQuery 1348 | if (typeof jQuery === "function" && el instanceof jQuery) { 1349 | el = el[0]; 1350 | } 1351 | 1352 | var rect = el.getBoundingClientRect(); 1353 | 1354 | return ( 1355 | rect.top >= 0 && 1356 | rect.left >= 0 && 1357 | rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */ 1358 | rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */ 1359 | ); 1360 | } 1361 | -------------------------------------------------------------------------------- /js/jquery-1.9.1.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license 2 | //@ sourceMappingURL=jquery.min.map 3 | */(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; 4 | return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) 5 | }b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("