├── .gitignore ├── data ├── img │ ├── 128.png │ ├── 615.png │ ├── 733.png │ ├── icon19.png │ ├── icon38.png │ ├── nsfw.png │ ├── self.png │ ├── default.png │ ├── 733-white.png │ ├── ic_settings_grey600_36dp.png │ ├── ic_settings_applications_white_48dp.png │ └── ic_settings_applications_grey600_48dp.png ├── css │ ├── style-options.css │ └── stylesheet.css └── html │ ├── options.html │ └── popup.html ├── extras ├── promotional │ ├── large.png │ ├── small.png │ └── marquee.png ├── screenshots │ ├── 01-network.png │ ├── 02-markets.png │ ├── 03-mining.png │ ├── 04-reddit.png │ └── 05-options.png └── ChromeWebStore_BadgeWBorder_v2_206x58.png ├── exclude-chrome.txt ├── lib ├── js │ ├── funcs.js │ ├── navigation.js │ ├── podcast.js │ ├── markets.js │ ├── popup.js │ ├── options.js │ ├── se.js │ ├── reddit.js │ ├── network.js │ └── mining.js └── jquery │ ├── MIT-LICENSE.txt │ └── jquery.min.js ├── LICENSE ├── manifest.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | build 3 | -------------------------------------------------------------------------------- /data/img/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/128.png -------------------------------------------------------------------------------- /data/img/615.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/615.png -------------------------------------------------------------------------------- /data/img/733.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/733.png -------------------------------------------------------------------------------- /data/img/icon19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/icon19.png -------------------------------------------------------------------------------- /data/img/icon38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/icon38.png -------------------------------------------------------------------------------- /data/img/nsfw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/nsfw.png -------------------------------------------------------------------------------- /data/img/self.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/self.png -------------------------------------------------------------------------------- /data/img/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/default.png -------------------------------------------------------------------------------- /data/img/733-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/733-white.png -------------------------------------------------------------------------------- /extras/promotional/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/promotional/large.png -------------------------------------------------------------------------------- /extras/promotional/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/promotional/small.png -------------------------------------------------------------------------------- /extras/promotional/marquee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/promotional/marquee.png -------------------------------------------------------------------------------- /extras/screenshots/01-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/screenshots/01-network.png -------------------------------------------------------------------------------- /extras/screenshots/02-markets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/screenshots/02-markets.png -------------------------------------------------------------------------------- /extras/screenshots/03-mining.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/screenshots/03-mining.png -------------------------------------------------------------------------------- /extras/screenshots/04-reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/screenshots/04-reddit.png -------------------------------------------------------------------------------- /extras/screenshots/05-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/screenshots/05-options.png -------------------------------------------------------------------------------- /data/img/ic_settings_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/ic_settings_grey600_36dp.png -------------------------------------------------------------------------------- /data/img/ic_settings_applications_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/ic_settings_applications_white_48dp.png -------------------------------------------------------------------------------- /extras/ChromeWebStore_BadgeWBorder_v2_206x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/extras/ChromeWebStore_BadgeWBorder_v2_206x58.png -------------------------------------------------------------------------------- /data/img/ic_settings_applications_grey600_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monero-Monitor/monero-monitor/HEAD/data/img/ic_settings_applications_grey600_48dp.png -------------------------------------------------------------------------------- /exclude-chrome.txt: -------------------------------------------------------------------------------- 1 | build 2 | data/img/73*.png 3 | data/img/ic_settings_grey600_36dp.png 4 | extras 5 | lib/content 6 | .gitignore 7 | .git 8 | *.sh 9 | *.zip 10 | exclude-*.txt 11 | README.md 12 | -------------------------------------------------------------------------------- /data/css/style-options.css: -------------------------------------------------------------------------------- 1 | body { padding: 20px; width: 710px; } 2 | div { display: inline-block; float: left; padding: 5px 10px; } 3 | h3 { padding: 0px; margin: 0px auto; } 4 | h4 { padding: 0px; margin: 10px 0px 0px; } 5 | p { margin: 5px; } 6 | 7 | div#view-options { line-height: 20px; margin-bottom: 10px; width: 310px; } 8 | 9 | div#mining-monitor { line-height: 20px; margin-bottom: 10px; width: 360px; } 10 | select#mining-pool { width: 100%; } 11 | input#mining-address { width: 100%; } 12 | 13 | div#status-box { width: 690px; height: 16px; text-align: center; color: #98CD6D; margin-bottom: 5px; } 14 | span#status { line-height: 16px; } 15 | 16 | div#clear-save { width: 690px; text-align: right; border: 0px solid #313131; border-bottom-width: 1px;} 17 | 18 | div#about-tab { width: 690px; text-align: justify; margin: 10px 0px;} -------------------------------------------------------------------------------- /lib/js/funcs.js: -------------------------------------------------------------------------------- 1 | function unixTimeToDate(timestamp){ 2 | var a = new Date(timestamp * 1000); 3 | var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; 4 | var yr = a.getFullYear(); 5 | var month = months[a.getMonth()]; 6 | var date = a.getDate(); 7 | var hr = a.getHours(); 8 | var min = '0' + a.getMinutes(); 9 | var sec = '0' + a.getSeconds(); 10 | var time = date+' '+month+' '+yr+', '+hr+':'+min.substr(-2)+':'+sec.substr(-2); 11 | return time; 12 | } 13 | 14 | function numberWithCommas(x) { 15 | return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 16 | } 17 | 18 | function coinsFromAtomic(atomic) { 19 | return atomic / 1000000000000; 20 | } 21 | 22 | function replaceHtmlChars(text) { 23 | return text.replace(/&/g, '&').replace(/>/g, '>').replace(/</g, '<').replace(/'/g, "'").replace(/"/g, '"'); 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2017 The Monero Monitor developers. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Monero Monitor", 4 | "short_name":"XMR Monitor", 5 | "author": "bigreddmachine", 6 | "version": "1.4.1", 7 | "version_name": "1.4.1", 8 | "description": "A Chrome extension for monitoring the Monero network", 9 | "icons": {"128":"data/img/128.png"}, 10 | "browser_action": { 11 | "default_icon": { 12 | "19": "data/img/icon19.png", 13 | "38": "data/img/icon38.png" 14 | }, 15 | "default_title": "Monero Monitor", 16 | "default_popup": "data/html/popup.html" 17 | }, 18 | "options_ui": { 19 | "page": "data/html/options.html", 20 | "chrome_style": true 21 | }, 22 | "background": { 23 | "scripts": [ 24 | "lib/js/popup.js", 25 | "lib/jquery/jquery.min.js", 26 | "lib/js/funcs.js", 27 | "lib/js/navigation.js", 28 | "lib/js/network.js", 29 | "lib/js/markets.js", 30 | "lib/js/reddit.js", 31 | "lib/js/mining.js", 32 | "lib/js/podcast.js", 33 | "lib/js/options.js" 34 | ] 35 | }, 36 | "permissions": [ 37 | "storage", 38 | "https://api.coindesk.com/", 39 | "http://moneroblocks.info/api/" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /lib/jquery/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 jQuery Foundation and other contributors 2 | http://jquery.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/js/navigation.js: -------------------------------------------------------------------------------- 1 | function openNetwork() { 2 | // Switch to Network tab: 3 | closeAll(); 4 | document.getElementById('network-tab').style.display = 'block'; 5 | updateNetworkStats(); 6 | } 7 | 8 | function openMarkets() { 9 | // Switch to Markets tab: 10 | closeAll(); 11 | document.getElementById('markets-tab').style.display = 'block'; 12 | updateMarketsStats(); 13 | } 14 | 15 | function openReddit() { 16 | // Switch to Reddit tab: 17 | closeAll(); 18 | document.getElementById('reddit-tab').style.display = 'block'; 19 | updateRedditFeed(); 20 | } 21 | 22 | function openSE() { 23 | // Switch to SE tab: 24 | closeAll(); 25 | document.getElementById('se-tab').style.display = 'block'; 26 | updateSEFeed(); 27 | } 28 | 29 | function openMining() { 30 | // Switch to Mining tab: 31 | closeAll(); 32 | document.getElementById('mining-tab').style.display = 'block'; 33 | updateMiningStats(); 34 | } 35 | 36 | function openPodcast() { 37 | // Switch to Mining tab: 38 | closeAll(); 39 | document.getElementById('podcast-tab').style.display = 'block'; 40 | loadPodcastXML(); 41 | } 42 | 43 | function closeAll(){ 44 | document.getElementById('network-tab').style.display = 'none'; 45 | document.getElementById('markets-tab').style.display = 'none'; 46 | document.getElementById('reddit-tab').style.display = 'none'; 47 | document.getElementById('se-tab').style.display = 'none'; 48 | document.getElementById('mining-tab').style.display = 'none'; 49 | document.getElementById('podcast-tab').style.display = 'none'; 50 | } 51 | -------------------------------------------------------------------------------- /lib/js/podcast.js: -------------------------------------------------------------------------------- 1 | function loadPodcastXML() { 2 | var xml, xmlhttp = new XMLHttpRequest(); 3 | xmlhttp.onreadystatechange = function() { 4 | if (this.readyState == 4 && this.status == 200) { 5 | displayPodcastFeed(this); 6 | } else { 7 | return 0; 8 | } 9 | }; 10 | xmlhttp.open("GET", "https://moneromonitor.libsyn.com/rss", true); 11 | xmlhttp.send(); 12 | } 13 | 14 | function displayPodcastFeed(xml) { 15 | var i, xmlDoc, episodes, list, title, date, duration, link, url, item; 16 | xmlDoc = xml.responseXML; 17 | episodes = xmlDoc.getElementsByTagName("item"); 18 | if (episodes.length > 0) { 19 | list = document.getElementById("podcast-list"); 20 | list.innerHTML = ""; 21 | for (i=0; i<6; i++) { 22 | image = episodes[i].getElementsByTagName("itunes:image")[0].getAttribute("href"); 23 | title = episodes[i].getElementsByTagName("title")[0].innerHTML; 24 | date = episodes[i].getElementsByTagName("pubDate")[0].innerHTML; 25 | date = date.substring(0, date.length-15); 26 | duration = episodes[i].getElementsByTagName("itunes:duration")[0].innerHTML; 27 | link = episodes[i].getElementsByTagName("link")[0].innerHTML; 28 | url = link.substring(link.indexOf('http'), link.indexOf(']]')); 29 | item = document.createElement("div"); 30 | item.className = 'podcast-episode'; 31 | item.innerHTML = '
' + 33 | '' + title + '
' + date + ' (' + duration + ')
'; 34 | list.appendChild(item); 35 | } 36 | } else { 37 | console.log('There is an issue accessing the podcast feed.') 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/js/markets.js: -------------------------------------------------------------------------------- 1 | function updateMarketsStats() { 2 | // Get Poloniex XMR Ticker info: 3 | var polo = new XMLHttpRequest(); 4 | polo.open("GET", "https://poloniex.com/public?command=returnTicker", true); 5 | polo.onreadystatechange = function() { 6 | if (polo.readyState == 4) { 7 | var resp = JSON.parse(polo.responseText); 8 | setPoloInfo(resp); 9 | } 10 | } 11 | polo.send(); 12 | } 13 | 14 | function setPoloInfo(info) { 15 | var market_str = ['btc_xmr', 'usdt_xmr', 'xmr_bcn', 'xmr_blk', 'xmr_btcd', 'xmr_dash', 'xmr_ltc', 'xmr_maid', 'xmr_nxt', 'xmr_zec']; 16 | var markets = [info.BTC_XMR,info.USDT_XMR,info.XMR_BCN,info.XMR_BLK,info.XMR_BTCD,info.XMR_DASH,info.XMR_LTC,info.XMR_MAID,info.XMR_NXT,info.XMR_ZEC]; 17 | var N_markets = markets.length; 18 | for (i = 0; i < N_markets; i++) { 19 | var rate_vol = Number(markets[i].baseVolume); 20 | if (rate_vol > 0) { 21 | // Only show markets that have volume/returned data: 22 | document.getElementById(market_str[i] + '-line').style.display = ''; 23 | var rate = Number(markets[i].last); 24 | var rate_pct = markets[i].percentChange * 100; 25 | document.getElementById(market_str[i]).textContent = rate.toFixed(8); 26 | document.getElementById(market_str[i] + '_vol').textContent = rate_vol.toFixed(2); 27 | document.getElementById(market_str[i] + '_pct').textContent = '(' + rate_pct.toFixed(2) +'%)'; 28 | if (markets[i].percentChange >= 0) { 29 | document.getElementById(market_str[i] + '_pct').style.color = "#00bb00"; 30 | } else { 31 | document.getElementById(market_str[i] + '_pct').style.color = "#bb0000"; 32 | } 33 | 34 | // Link to Market: 35 | var a = document.createElement('a'); 36 | a.href = 'https://poloniex.com/exchange#' + market_str[i]; 37 | a.target = '_blank'; 38 | a.class = 'marketlink'; 39 | document.getElementById(market_str[i] + '-link').appendChild(a).appendChild(a.previousSibling); 40 | 41 | } else { 42 | // Hide markets with not volume or data returned: 43 | document.getElementById(market_str[i] + '-line').style.display = 'none'; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Monero Monitor Extension 2 | 3 | Copyright (c) 2015-2017 The Monero Monitor developers. 4 | 5 | 6 | ## License 7 | 8 | This software is released under the terms of the MIT license. See `LICENSE` for 9 | more information or see http://opensource.org/licenses/MIT. 10 | 11 | 12 | ## About 13 | 14 | [![Available in the Chrome Store](extras/ChromeWebStore_BadgeWBorder_v2_206x58.png)](https://chrome.google.com/webstore/detail/monero-monitor/ojekadcfnkkihlleaafggfgbggdckpgo) 15 | 16 | This Chrome extension allows the user to easily monitor basic Monero network 17 | statistics, including network hashrate; the most recent block, time, and reward; 18 | network difficulty; and total coin supply. This extension also provides easy access 19 | to the current XMR exchange rates on the Poloniex exchange. Also, the extension 20 | provides easy access to the current top posts on the /r/monero subreddit. Users can 21 | enable an additional tab to monitor mining status on a number of XMR mining pools. 22 | 23 | 24 | ## Installation 25 | To build this extension from source, 26 | 27 | git clone https://github.com/monero-monitor/monero-monitor 28 | 29 | cd monero-monitor 30 | 31 | ./build-chrome.sh 32 | 33 | Install in Chrome: 34 | 35 | 1) Navigate to chrome://extensions 36 | 37 | 2) Enable Developer Mode 38 | 39 | 3) Load Unpacked Extension located at: 40 | 41 | /path/to/monero-monitor/build/chrome 42 | 43 | 44 | ## External Public APIs Used 45 | 46 | * Powered by [CoinDesk](http://www.coindesk.com/price/) 47 | * Monero network info from [MoneroBlocks API](http://moneroblocks.info/api) 48 | * Market information from [Poloniex API](https://poloniex.com/support/api) 49 | * Various mining pools using the [node-cryptonote-pool](https://github.com/zone117x/node-cryptonote-pool) source. 50 | 51 | 52 | ## Contributing 53 | 54 | Please feel free to fork, submit pull requests or issues, or otherwise contribute 55 | in making this extension as useful as possible. 56 | 57 | 58 | If you find this extension useful, please consider donating to the developer: 59 | 60 | `49VtwYXDbbh7hq57wwkLH36x4D6XV6Tr2P93ANnBi9qFGyYZbx8SXWPUHC9V1o7N41b4c3WJ1kubkffRfPTPfMuB8QUqFD5` 61 | 62 | ## Screenshots 63 | 64 | ![Overview](extras/screenshots/01-network.png) 65 | 66 | ![Markets](extras/screenshots/02-markets.png) 67 | 68 | ![Mining](extras/screenshots/03-mining.png) 69 | 70 | ![reddit](extras/screenshots/04-reddit.png) 71 | 72 | ![Options](extras/screenshots/05-options.png) 73 | -------------------------------------------------------------------------------- /lib/js/popup.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function () { 2 | 3 | // Once ready, upload network stats: 4 | updateNetworkStats(); 5 | 6 | // Activate only enabled tabs: 7 | if (chrome.storage.sync.get) { 8 | chrome.storage.sync.get({ 9 | enableMining: false, 10 | enableReddit: true, 11 | redditOrdering: '/', 12 | enableSE: true, 13 | seOrdering: 'active', 14 | enableMarkets: true 15 | }, function(items) { 16 | if (items.enableMining == true) { 17 | document.getElementById('openMiningTabButton').style.display = 'inline'; 18 | } 19 | if (items.enableReddit == false) { 20 | document.getElementById('openRedditTabButton').style.display = 'none'; 21 | } 22 | if (items.enableSE == false) { 23 | document.getElementById('openSETabButton').style.display = 'none'; 24 | } 25 | if (items.enableMarkets == false) { 26 | document.getElementById('openMarketsTabButton').style.display = 'none'; 27 | } 28 | document.getElementById('reddit-link').innerHTML = '/r/monero' + items.redditOrdering + ''; 29 | var description = { 30 | active: "Active", 31 | featured: "Featured", 32 | hot: "Hot", 33 | week: "Weekly hot", 34 | month: "Monthly hot", 35 | newest: "Newest", 36 | votes: "Most voted", 37 | unanswered: "Unanswered" 38 | }; 39 | var url = "https://monero.stackexchange.com/"; 40 | if (items.seOrdering == "hot" || items.seOrdering == "week" || items.seOrdering == "month") 41 | url += "?tab="; 42 | else 43 | url += "questions?sort="; 44 | url += items.seOrdering; 45 | document.getElementById('se-tab-header').innerHTML = description[items.seOrdering] + ' questions on StackExchange:'; 46 | }); 47 | } 48 | 49 | // Add event listeners to navigation buttons and links: 50 | document.getElementById('openNetworkTabButton').addEventListener('click', openNetwork); 51 | document.getElementById('openMarketsTabButton').addEventListener('click', openMarkets); 52 | document.getElementById('openRedditTabButton').addEventListener('click', openReddit); 53 | document.getElementById('openSETabButton').addEventListener('click', openSE); 54 | document.getElementById('openMiningTabButton').addEventListener('click', openMining); 55 | document.getElementById('openPodcastTabButton').addEventListener('click', openPodcast); 56 | document.getElementById('next-reddit').addEventListener('click', nextRedditPage); 57 | document.getElementById('next-se').addEventListener('click', nextSEPage); 58 | document.getElementById('settings-menu').addEventListener('click', function() { 59 | if (chrome.runtime.openOptionsPage) { 60 | chrome.runtime.openOptionsPage(); 61 | } else { 62 | window.open(chrome.runtime.getURL('/data/html/options.html')); 63 | } 64 | }); 65 | 66 | }); -------------------------------------------------------------------------------- /lib/js/options.js: -------------------------------------------------------------------------------- 1 | function save_options() { 2 | // Read settings from Options pop-up box: 3 | var enableMining = document.getElementById('enable-mining').checked; 4 | var miningAddress = document.getElementById('mining-address').value; 5 | var miningPool = document.getElementById('mining-pool').selectedIndex; 6 | var enableReddit = document.getElementById('enable-reddit').checked; 7 | var redditNumPosts = document.getElementById('reddit-num-posts').value; 8 | var redditOrdering = document.getElementById('reddit-ordering').value; 9 | var enableSE = document.getElementById('enable-se').checked; 10 | var seNumPosts = document.getElementById('se-num-posts').value; 11 | var seOrdering = document.getElementById('se-ordering').value; 12 | var enableMarkets = document.getElementById('enable-markets').checked; 13 | 14 | if (miningPool == 0) { 15 | enableMining = false; 16 | document.getElementById('enable-mining').checked = false; 17 | } 18 | 19 | // Save options in Chrome storage: 20 | chrome.storage.sync.set({ 21 | enableMining: enableMining, 22 | miningAddress: miningAddress, 23 | miningPool: miningPool, 24 | enableReddit: enableReddit, 25 | redditNumPosts: redditNumPosts, 26 | redditOrdering: redditOrdering, 27 | seNumPosts: seNumPosts, 28 | seOrdering: seOrdering, 29 | enableMarkets: enableMarkets 30 | }, function() { 31 | var status = document.getElementById('status'); 32 | status.textContent = 'Options saved.'; 33 | setTimeout(function() { 34 | status.textContent = ''; 35 | }, 2000); 36 | }); 37 | } 38 | 39 | function restore_options() { 40 | // Get saved options from Chrome storage: 41 | chrome.storage.sync.get({ 42 | enableMining: false, 43 | miningAddress: '', 44 | miningPool: 0, 45 | enableReddit: true, 46 | redditNumPosts: 10, 47 | redditOrdering: '/', 48 | enableSE: true, 49 | seNumPosts: 10, 50 | seOrdering: 'active', 51 | enableMarkets: true 52 | }, function(items) { 53 | document.getElementById('enable-mining').checked = items.enableMining; 54 | document.getElementById('mining-address').value = items.miningAddress; 55 | document.getElementById('mining-pool').selectedIndex = items.miningPool; 56 | document.getElementById('enable-reddit').checked = items.enableReddit; 57 | document.getElementById('reddit-num-posts').value = items.redditNumPosts; 58 | document.getElementById('reddit-ordering').value = items.redditOrdering; 59 | document.getElementById('enable-se').checked = items.enableSE; 60 | document.getElementById('se-num-posts').value = items.seNumPosts; 61 | document.getElementById('se-ordering').value = items.seOrdering; 62 | document.getElementById('enable-markets').checked = items.enableMarkets; 63 | }); 64 | } 65 | 66 | function clear_storage() { 67 | // Clear all saved options in Chrome storage: 68 | chrome.storage.sync.clear( function() { 69 | var status = document.getElementById('status') 70 | document.getElementById('enable-mining').checked = false; 71 | document.getElementById('mining-address').value = ''; 72 | status.textContent = 'Options cleared'; 73 | setTimeout(function() { 74 | status.textContent = ''; 75 | }, 2000); 76 | }); 77 | } 78 | 79 | document.addEventListener('DOMContentLoaded', restore_options); 80 | document.getElementById('save').addEventListener('click', save_options); 81 | document.getElementById('clear').addEventListener('click', clear_storage); 82 | -------------------------------------------------------------------------------- /lib/js/se.js: -------------------------------------------------------------------------------- 1 | function updateSEFeed() { 2 | chrome.storage.sync.get({ 3 | seNumPosts: 10, 4 | seOrdering: 'active' 5 | }, function(items) { 6 | // Get Blockchain Explorer Info: 7 | var se = new XMLHttpRequest(); 8 | var url = "https://api.stackexchange.com/2.2/questions"; 9 | if (items.seOrdering == "featured" || items.seOrdering == "unanswered") 10 | url += "/" + items.seOrdering; 11 | url += "?site=monero.stackexchange&order=desc&sort="; 12 | var sort = { 13 | active: "activity", 14 | featured: "activity", 15 | hot: "hot", 16 | week: "week", 17 | month: "month", 18 | newest: "creation", 19 | votes: "votes", 20 | unanswered: "votes" 21 | }; 22 | url += sort[items.seOrdering]; 23 | se.open("GET", url, true); 24 | se.onreadystatechange = function() { 25 | if (se.readyState == 4) { 26 | // JSON.parse does not evaluate an attacker's scripts. 27 | var resp = JSON.parse(se.responseText); 28 | for (i = 0; i < 30; i++) { 29 | if (i < resp.items.length && i < items.seNumPosts) { 30 | writeSELine(resp.items[i], i); 31 | } else { 32 | document.getElementById('se-line' + i).style.display = 'none'; 33 | } 34 | } 35 | } 36 | } 37 | se.send(); 38 | }); 39 | } 40 | 41 | function writeSELine(info, i) { 42 | // vote(s) 43 | var span_vote = document.getElementById('se-vote-' + i); 44 | span_vote.innerHTML = info.score + '
vote' + (info.score != 1 ? 's' : '') + ''; 45 | 46 | // answer(s) 47 | var div_answer = document.getElementById('se-answer-'+ i); 48 | div_answer.innerHTML = info.answer_count + '
answer' + (info.answer_count != 1 ? 's' : '') + ''; 49 | if (info.answer_count > 0) 50 | div_answer.style.color = "#4c9067"; 51 | if (info.is_answered) 52 | div_answer.style["background-color"] = "#e4f9d3"; 53 | 54 | // view(s) 55 | var span_view = document.getElementById('se-view-' + i); 56 | span_view.innerHTML = info.view_count + '
view' + (info.view_count != 1 ? 's' : '') + ''; 57 | 58 | // bounty 59 | if (info.bounty_amount) { 60 | var span_bounty = document.getElementById('se-bounty' + i); 61 | span_bounty.innerHTML = '+' + info.bounty_amount; 62 | span_bounty.style.display = 'inline'; 63 | } 64 | 65 | // title 66 | var span_title = document.getElementById('se-title-' + i); 67 | info.title = replaceHtmlChars(info.title); 68 | if (info.title.length > 100) { 69 | span_title.textContent = info.title.substr(0,99) + '...'; 70 | } else { 71 | span_title.textContent = info.title; 72 | } 73 | var a_t = document.createElement('a'); 74 | a_t.href = info.link; 75 | a_t.target = '_blank'; 76 | a_t.class = 'title'; 77 | span_title.appendChild(a_t).appendChild(a_t.previousSibling); 78 | 79 | // tags 80 | var span_tags = document.getElementById('se-tag-' + i); 81 | span_tags.innerHTML = ''; 82 | for (var j = 0; j < info.tags.length; ++j) { 83 | span_tags.innerHTML += '' + info.tags[j] + ' '; 84 | } 85 | 86 | // time & author 87 | var div_time_author = document.getElementById('se-time-author-' + i); 88 | var t_created = info.creation_date; 89 | var t_current = new Date().getTime() / 1000; 90 | var n_secs = (t_current - t_created).toFixed(0); 91 | div_time_author.innerHTML = 'asked '; 92 | if (n_secs < 60) { 93 | div_time_author.innerHTML += n_secs + ' second' + (n_secs > 1 ? 's' : ''); 94 | } else if (n_secs < 3600) { 95 | var n_mins = (n_secs / 60).toFixed(0); 96 | div_time_author.innerHTML += n_mins + ' minute' + (n_mins > 1 ? 's' : ''); 97 | } else if (n_secs < 172800) { 98 | var n_hrs = (n_secs / 3600).toFixed(0); 99 | div_time_author.innerHTML += n_hrs + ' hour' + (n_hrs > 1 ? 's' : ''); 100 | } else { 101 | var n_days = (n_secs / 86400).toFixed(0); 102 | div_time_author.innerHTML += n_days + ' day' + (n_days > 1 ? 's' : ''); 103 | } 104 | div_time_author.innerHTML += ' ago by '; 105 | 106 | // author 107 | var reputation = info.owner.reputation; 108 | if (reputation > 10000) { 109 | reputation = Math.floor(reputation / 100); 110 | reputation /= 10; 111 | reputation += 'k'; 112 | } 113 | div_time_author.innerHTML += '' + info.owner.display_name + ' ' + reputation + ''; 114 | } 115 | 116 | function nextSEPage() { 117 | // Specify ordering 118 | chrome.storage.sync.get({ 119 | seOrdering: 'active' 120 | }, function(items) { 121 | var url = "https://monero.stackexchange.com/"; 122 | if (items.seOrdering == "hot" || items.seOrdering == "week" || items.seOrdering == "month") 123 | url += "?tab="; 124 | else 125 | url += "questions?sort="; 126 | url += items.seOrdering; 127 | chrome.tabs.create({'url': url}); 128 | }); 129 | } 130 | -------------------------------------------------------------------------------- /lib/js/reddit.js: -------------------------------------------------------------------------------- 1 | function updateRedditFeed() { 2 | chrome.storage.sync.get({ 3 | redditNumPosts: 10, 4 | redditOrdering: '/' 5 | }, function(items) { 6 | // Get Blockchain Explorer Info: 7 | var reddit = new XMLHttpRequest(); 8 | reddit.open("GET", "http://www.reddit.com/r/monero" + items.redditOrdering + ".json", true); 9 | reddit.onreadystatechange = function() { 10 | if (reddit.readyState == 4) { 11 | // JSON.parse does not evaluate an attacker's scripts. 12 | var resp = JSON.parse(reddit.responseText); 13 | for (i = 0; i < 30; i++) { 14 | if (i < resp.data.children.length && i < items.redditNumPosts) { 15 | writeRedditLine(resp.data.children[i], i); 16 | } else { 17 | document.getElementById('r-line' + i).style.display = 'none'; 18 | } 19 | } 20 | } 21 | } 22 | reddit.send(); 23 | }); 24 | } 25 | 26 | function writeRedditLine(info, i) { 27 | var upvote = info.data.ups; 28 | var downvote = info.data.downs; 29 | var score = upvote - downvote; 30 | var title = replaceHtmlChars(info.data.title); 31 | var comments = info.data.num_comments; 32 | var author = info.data.author; 33 | var link = info.data.url; 34 | var commentlink = 'https://www.reddit.com/' + info.data.permalink; 35 | var t_created = info.data.created_utc; 36 | var t_current = new Date().getTime() / 1000; 37 | var n_secs = (t_current - t_created).toFixed(0); 38 | var thumbnail = info.data.thumbnail; 39 | 40 | // Stickied? 41 | if (info.data.stickied) { 42 | document.getElementById('r-line' + i).style.fontWeight = "bold"; 43 | document.getElementById('r-stickied' + i).style.display = 'inline'; 44 | } 45 | 46 | // Vote Count 47 | if (score >= 0) { 48 | document.getElementById('upvote-' + i).textContent = '+' + score; 49 | document.getElementById('upvote-' + i).style.color = "#00bb00"; 50 | } else { 51 | document.getElementById('upvote-' + i).textContent = score; 52 | document.getElementById('upvote-' + i).style.color = "#bb0000"; 53 | } 54 | 55 | // Thumbnails 56 | if (thumbnail == 'self') { 57 | document.getElementById('thumb-' + i).src = '/data/img/self.png'; 58 | } else if (thumbnail == 'nsfw') { 59 | document.getElementById('thumb-' + i).src = '/data/img/nsfw.png'; 60 | } else if (thumbnail == 'default') { 61 | document.getElementById('thumb-' + i).src = '/data/img/default.png'; 62 | } else { 63 | document.getElementById('thumb-' + i).src = thumbnail; 64 | } 65 | 66 | // Title 67 | if (title.length > 100) { 68 | document.getElementById('title-' + i).textContent = title.substr(0,99) + '...'; 69 | } else { 70 | document.getElementById('title-' + i).textContent = title; 71 | } 72 | var a_t = document.createElement('a'); 73 | a_t.href = link; 74 | a_t.target = '_blank'; 75 | a_t.class = 'title'; 76 | document.getElementById('title-' + i).appendChild(a_t).appendChild(a_t.previousSibling); 77 | 78 | // Comments 79 | if (comments == 1) { 80 | document.getElementById('comment-' + i).textContent = '(' + comments + ' Comment)'; 81 | } else { 82 | document.getElementById('comment-' + i).textContent = '(' + comments + ' Comments)'; 83 | } 84 | var a_c = document.createElement('a'); 85 | a_c.href = commentlink; 86 | a_c.target = '_blank'; 87 | document.getElementById('comment-' + i).appendChild(a_c).appendChild(a_c.previousSibling); 88 | 89 | // Author 90 | document.getElementById('author-' + i).textContent = author; 91 | var a_a = document.createElement('a'); 92 | a_a.href = 'https://reddit.com/u/' + author; 93 | a_a.target = '_blank'; 94 | a_a.class = 'author'; 95 | document.getElementById('author-' + i).appendChild(a_a).appendChild(a_a.previousSibling); 96 | 97 | // Age 98 | if (n_secs < 60) { 99 | if (n_secs == 1) { 100 | document.getElementById('time-' + i).textContent = 'submitted ' + n_secs + ' second ago by '; 101 | } else { 102 | document.getElementById('time-' + i).textContent = 'submitted ' + n_secs + ' seconds ago by '; 103 | } 104 | } else if (n_secs < 3600) { 105 | var n_mins = (n_secs / 60).toFixed(0); 106 | if (n_mins == 1) { 107 | document.getElementById('time-' + i).textContent = 'submitted ' + n_mins + ' minute ago by '; 108 | } else { 109 | document.getElementById('time-' + i).textContent = 'submitted ' + n_mins + ' minutes ago by '; 110 | } 111 | } else if (n_secs < 172800) { 112 | var n_hrs = (n_secs / 3600).toFixed(0); 113 | if (n_hrs == 1) { 114 | document.getElementById('time-' + i).textContent = 'submitted ' + n_hrs + ' hour ago by '; 115 | } else{ 116 | document.getElementById('time-' + i).textContent = 'submitted ' + n_hrs + ' hours ago by '; 117 | } 118 | } else { 119 | var n_days = (n_secs / 86400).toFixed(0); 120 | document.getElementById('time-' + i).textContent = 'submitted ' + n_days + ' days ago by '; 121 | } 122 | } 123 | 124 | function nextRedditPage() { 125 | // Specify ordering 126 | chrome.storage.sync.get({ 127 | redditOrdering: '/' 128 | }, function(items) { 129 | chrome.tabs.create({'url': "https://www.reddit.com/r/monero" + items.redditOrdering}); 130 | }); 131 | } 132 | -------------------------------------------------------------------------------- /data/html/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Monero Monitor Extension Options 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

View Options

14 |

15 | 18 | 37 | 59 | 62 |

63 |
64 | 65 |
66 |

Mining Monitor Configuration

67 |
68 |

Mining Pool:

69 |

82 |

Mining Address:

83 |

84 |
85 |
86 | 87 |
88 |    89 |
90 | 91 |
92 | 93 |
94 | 95 |
96 |

About This Extension

97 |

98 | Source code for this extension is hosted on Github. Please feel free to fork, submit pull requests or issues, or otherwise contribute in making this extension as useful as possible. 99 | Network stats retrieved using the MoneroBlocks API. 100 | Market stats retrieved using the Poloniex API. 101 | Some code for retrieving mining information modified from Matthew Little's node-cryptonote-pool website examples, used under the GNU General public License v2. 102 |

103 |

104 | "Market Overview" price and cap information is calculated using the BTC-to-XMR rate on Poloniex and the Fiat-to-BTC rates from the CoinDesk Bitcoin Price Index. 105 | "Open" information is the price of XMR at 0:00:00 UTC of the current day. Percent changes are calculated from this price. 106 | Powered by CoinDesk. 107 |

108 |

Please consider donating to the developer if you find this tool useful:
109 | 49VtwYXDbbh7hq57wwkLH36x4D6XV6Tr2P93ANnBi9qFGyYZbx8SXWPUHC9V1o7N41b4c3WJ1kubkffRfPTPfMuB8QUqFD5

110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /lib/js/network.js: -------------------------------------------------------------------------------- 1 | function updateNetworkStats() { 2 | // Get Blockchain Explorer Info: 3 | var bchain = new XMLHttpRequest(); 4 | bchain.open("GET", "http://moneroblocks.info/api/get_stats/", true); 5 | bchain.onreadystatechange = function() { 6 | if (bchain.readyState == 4) { 7 | setChainInfo(JSON.parse(bchain.responseText)); 8 | } 9 | } 10 | bchain.send(); 11 | } 12 | 13 | function setChainInfo(info) { 14 | // Use parsed data to update Network information: 15 | var total_emission = info.total_emission; 16 | var totalCoins = Number(total_emission.substr(0, total_emission.length-12) + '.' 17 | + total_emission.substr(total_emission.length-12, total_emission.length)); 18 | getBTCrates(totalCoins); 19 | 20 | var last_reward = info.last_reward; 21 | var reward = Number(last_reward.substr(0, last_reward.length-12) + '.' 22 | + last_reward.substr(last_reward.length-12, last_reward.length)); 23 | 24 | document.getElementById('difficulty').textContent = numberWithCommas(info.difficulty); 25 | document.getElementById('blockheight').textContent = info.height; 26 | document.getElementById('hashrate').textContent = (info.hashrate/1000000).toFixed(3) + ' Mh/s'; 27 | document.getElementById('totalsupply').textContent = numberWithCommas(totalCoins.toFixed(3)) + ' XMR'; 28 | document.getElementById('blockreward').textContent = reward.toFixed(3) + ' XMR'; 29 | document.getElementById('blocktime').textContent = unixTimeToDate(Number(info.last_timestamp)); 30 | 31 | var a_height = document.createElement('a'); 32 | a_height.href = 'http://moneroblocks.info/block/' + info.height; 33 | a_height.target = '_blank'; 34 | a_height.class = 'title'; 35 | 36 | var a_hashrate = document.createElement('a'); 37 | a_hashrate.href = 'https://monerohash.com/#network'; 38 | a_hashrate.target = '_blank'; 39 | a_hashrate.class = 'title'; 40 | 41 | document.getElementById('blockheight').appendChild(a_height).appendChild(a_height.previousSibling); 42 | document.getElementById('hashrate').appendChild(a_hashrate).appendChild(a_hashrate.previousSibling); 43 | } 44 | 45 | function getBTCrates(totalCoins) { 46 | var coindesk = new XMLHttpRequest(); 47 | coindesk.open("GET", "https://api.coindesk.com/v1/bpi/currentprice.json", true); 48 | coindesk.onreadystatechange = function() { 49 | if (coindesk.readyState == 4) { 50 | var deskresp = JSON.parse(coindesk.responseText); 51 | getHistoricalBTC(totalCoins,deskresp); 52 | } 53 | } 54 | coindesk.send(); 55 | } 56 | 57 | function getHistoricalBTC(totalCoins,deskresp) { 58 | var USDtoBTC_now = deskresp.bpi.USD.rate_float; 59 | 60 | // Get BTXC Historical data from Coindesk: 61 | var coindesk = new XMLHttpRequest(); 62 | coindesk.open("GET", "https://api.coindesk.com/v1/bpi/historical/close.json?for=yesterday", true); 63 | coindesk.onreadystatechange = function() { 64 | if (coindesk.readyState == 4) { 65 | var resp = JSON.parse(coindesk.responseText); 66 | var bpi = resp.bpi; 67 | var day = Object.keys(bpi)[0]; 68 | var USDtoBTC_open = bpi[day]; 69 | var percentUSDtoBTC = (USDtoBTC_now)/USDtoBTC_open; 70 | 71 | // Get XMR historical data from Poloniex: 72 | var t_today = new Date(); 73 | var t_starttoday = t_today.setUTCHours(0,0,0,0) / 1000; 74 | var polo = new XMLHttpRequest(); 75 | polo.open("GET", "https://poloniex.com/public?command=returnChartData¤cyPair=BTC_XMR&start=" + (t_starttoday) + "&end=9999999999&period=300", true); 76 | polo.onreadystatechange = function() { 77 | if (polo.readyState == 4) { 78 | var poloresp = JSON.parse(polo.responseText); 79 | var BTCtoXMR_open = poloresp[0].open; 80 | var BTCtoXMR_now = poloresp[poloresp.length-1].close; 81 | 82 | // Calculate XMR Prices/Cap in various denominations: 83 | var USDtoXMR_open = USDtoBTC_open * BTCtoXMR_open; 84 | var rateBTC = BTCtoXMR_now; 85 | var rateUSD = BTCtoXMR_now * USDtoBTC_now; 86 | var rateGBP = BTCtoXMR_now * deskresp.bpi.GBP.rate_float; 87 | var rateEUR = BTCtoXMR_now * deskresp.bpi.EUR.rate_float; 88 | var marketCapUSD = rateUSD * totalCoins; 89 | 90 | // Fill in values on popup: 91 | document.getElementById('USDtoXMR').textContent = rateUSD.toFixed(4); 92 | document.getElementById('openUSDtoXMR').textContent = USDtoXMR_open.toFixed(4); 93 | document.getElementById('GBPtoXMR').textContent = rateGBP.toFixed(4); 94 | document.getElementById('EURtoXMR').textContent = rateEUR.toFixed(4); 95 | document.getElementById('BTCtoXMR').textContent = Number(rateBTC).toFixed(5); 96 | document.getElementById('CapUSD').textContent = '$' + numberWithCommas(marketCapUSD.toFixed(2)); 97 | 98 | // XMR Percent Gain/Loss in USD: 99 | var percentUSDtoXMR = (rateUSD/USDtoXMR_open - 1) * 100; 100 | document.getElementById('percentUSDtoXMR').textContent = '(' + percentUSDtoXMR.toFixed(2) + '%)'; 101 | if (percentUSDtoXMR >= 0) { 102 | document.getElementById('percentUSDtoXMR').style.color = "#00bb00"; 103 | } else { 104 | document.getElementById('percentUSDtoXMR').style.color = "#bb0000"; 105 | } 106 | 107 | // Show price info: 108 | document.getElementById('usdtable').style.display = 'inline-block'; 109 | document.getElementById('captable').style.display = 'inline-block'; 110 | } 111 | } 112 | polo.send(); 113 | } 114 | } 115 | coindesk.send(); 116 | } 117 | -------------------------------------------------------------------------------- /lib/js/mining.js: -------------------------------------------------------------------------------- 1 | var xhrAddressPoll; 2 | var addressTimeout; 3 | 4 | function updateMiningStats() { 5 | var poolApi = ''; 6 | var address = ''; 7 | var mining = false; 8 | 9 | // Load mining settings from Chrome Storage, and then load mining stats: 10 | chrome.storage.sync.get({ 11 | enableMining: false, 12 | miningAddress: '', 13 | miningPool: '' 14 | }, function(items) { 15 | mining = items.enableMining; 16 | address = items.miningAddress; 17 | if (items.miningPool == 0) { 18 | poolApi = ''; 19 | mining = false; 20 | } else if (items.miningPool == 1) { 21 | poolApi = 'http://monero.crypto-pool.fr:8090'; 22 | } else if (items.miningPool == 2) { 23 | poolApi = 'https://monerohash.com/api'; 24 | } else if (items.miningPool == 3) { 25 | poolApi = 'https://api.moneropool.com'; 26 | } else if (items.miningPool == 4) { 27 | poolApi = 'http://drill.moneroworld.com:8117'; 28 | } else if (items.miningPool == 5) { 29 | poolApi = 'http://46.165.232.77:8117'; // cryptmonero.com 30 | } else if (items.miningPool == 6) { 31 | poolApi = 'http://xmr.prohash.net:8117'; 32 | } else if (items.miningPool == 7) { 33 | poolApi = 'http://xmrapi.alimabi.cn:80'; 34 | } else if (items.miningPool == 8) { 35 | poolApi = 'http://xmrpool.eu:8117'; 36 | } else if (items.miningPool == 9) { 37 | poolApi = 'http://supportxmr.com:8117'; 38 | } else if (items.miningPool == 10) { 39 | poolApi = 'http://api.minexmr.com:8080'; 40 | } 41 | 42 | if (mining == true && items.miningPool > 0) { 43 | if (xhrAddressPoll) xhrAddressPoll.abort(); 44 | if (addressTimeout) clearTimeout(addressTimeout); 45 | 46 | function fetchAddressStats(longpoll){ 47 | xhrAddressPoll = $.ajax({ 48 | url: poolApi + '/stats_address', 49 | data: { 50 | address: address, 51 | longpoll: longpoll 52 | }, 53 | dataType: 'json', 54 | cache: 'false', 55 | success: function(data){ 56 | 57 | var addr_balance = coinsFromAtomic(0); 58 | var addr_hashes = 0; 59 | var addr_lastshare = 0; 60 | var addr_paid = coinsFromAtomic(0); 61 | var addr_hashrate = '0 H/s'; 62 | 63 | if (data.stats) { 64 | 65 | // Replace mining info defaults if possible: 66 | if (data.stats.balance) { addr_balance = coinsFromAtomic(data.stats.balance); } 67 | if (data.stats.hashes) { addr_hashes = data.stats.hashes; } 68 | if (data.stats.lastShare) { addr_lastshare = data.stats.lastShare; } 69 | if (data.stats.paid) { addr_paid = coinsFromAtomic(data.stats.paid); } 70 | 71 | // Recent payments and total: 72 | if (data.payments) { 73 | var t_current = new Date().getTime() / 1000; 74 | var payment; 75 | var paymentParts; 76 | var t_payment; 77 | var t_since_payment; 78 | document.getElementById("paymentstable").innerHTML = 'Date:AmountMixin'; 79 | for (i = 0; i < (data.payments.length/2); i++) { 80 | payment = data.payments[2*i]; 81 | paymentParts = payment.split(':'); 82 | t_payment = data.payments[2*i+1]; 83 | t_since_payment = t_current - t_payment; 84 | if ((i < 5) && (t_since_payment <= 7*86400)){ 85 | var link = 'http://moneroblocks.info/tx/' + paymentParts[0]; 86 | var addRow = '' + unixTimeToDate(t_payment) + '' + coinsFromAtomic(paymentParts[1]).toFixed(12) + '' + paymentParts[3] + ''; 87 | $('#paymentstable').append(addRow); 88 | } 89 | } 90 | } 91 | 92 | // Mining hashrate 93 | if (data.stats.hashrate) { 94 | var hashrate = data.stats.hashrate; 95 | if (isNaN(hashrate)) { 96 | addr_hashrate = hashrate; 97 | } else { 98 | if (hashrate < 1000) { 99 | addr_hashrate = hashrate.toFixed(2) + ' H/sec'; 100 | } else if (hashrate < 1000000) { 101 | addr_hashrate = (hashrate / 1000).toFixed(2) + ' kH/sec'; 102 | } else { 103 | addr_hashrate = (hashrate / 1000000).toFixed(2) + ' MH/sec'; 104 | } 105 | } 106 | } 107 | 108 | } 109 | 110 | // Fill in mining information 111 | document.getElementById('m-address').textContent = address.substr(0,47) + ' ' + address.substr(48,95); 112 | document.getElementById('m-balance').textContent = addr_balance.toFixed(12) + ' XMR'; 113 | document.getElementById('m-lastshare').textContent = unixTimeToDate(addr_lastshare); 114 | document.getElementById('m-paid').textContent = addr_paid.toFixed(6) + ' XMR'; 115 | document.getElementById('m-hashes').textContent = numberWithCommas(addr_hashes); 116 | document.getElementById('m-hashrate').textContent = addr_hashrate; 117 | 118 | fetchAddressStats(true); 119 | }, 120 | error: function(e){ 121 | document.getElementById('m-address').textContent = 'Unable to connect to pool. It may be offline.'; 122 | document.getElementById('m-hashrate').textContent = '0 H/sec'; 123 | document.getElementById('m-balance').textContent = '0.00000000 XMR'; 124 | document.getElementById('m-lastshare').textContent = 'N/A'; 125 | document.getElementById('m-paid').textContent = '0.00000000 XMR'; 126 | document.getElementById('m-hashes').textContent = '0'; 127 | 128 | if (e.statusText === 'abort') return; 129 | if (addressTimeout) clearTimeout(addressTimeout); 130 | addressTimeout = setTimeout(function(){ 131 | fetchAddressStats(false); 132 | }, 5000); 133 | } 134 | }); 135 | } 136 | } 137 | fetchAddressStats(false); 138 | }); 139 | } 140 | -------------------------------------------------------------------------------- /data/css/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Monero Monitor Stylesheet 2 | See LICENSE for use. */ 3 | 4 | /* General Settings */ 5 | html, body { width: 450px; min-height: 375px; padding: 0px; } 6 | html { 7 | background: #FAFAFA; 8 | } 9 | body { 10 | margin: 0px; 11 | color: #505050; 12 | font-family: sans-serif; 13 | font-size: 16pt; 14 | } 15 | .main-area { 16 | width: 100%; 17 | } 18 | h1 { 19 | font-size: 26pt; 20 | margin: 2px 0px; 21 | padding: 5px 5px 0px; 22 | font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; 23 | } 24 | .main-area p { 25 | padding: 5px 15px; 26 | width:auto; 27 | } 28 | h2 { 29 | margin: 10px 24px 5px; 30 | width: auto; 31 | font-size: 22pt; 32 | font-weight: bold; 33 | text-align: center; 34 | color: #313131; 35 | } 36 | h3 { margin: 10px 0px 5px 5px; font-size: 18pt; padding: 0px; } 37 | h4 { margin: 8px 0px 2px; font-size: 16pt; font-weight: bold; } 38 | a:link, a:visited, a:hover, a:active { 39 | color: #888888; text-decoration: none; outline: 0; 40 | } 41 | 42 | /* Header */ 43 | button#settings-menu { 44 | display: block; 45 | float: right; 46 | position: absolute; 47 | right: 0px; 48 | top: 4px; 49 | background-color:#313131; 50 | border: 0px; 51 | outline: 0px; 52 | } 53 | button#settings-menu::before { 54 | content: attr(data-tip); 55 | font-size: 10pt; 56 | position: absolute; 57 | z-index: 999; 58 | white-space: nowrap; 59 | top: -200px; 60 | right: 20px; 61 | width: auto; 62 | margin-left: 0px; 63 | background:#FAFAFA; 64 | border: 1px solid #FC6622; 65 | border-radius: 4px; 66 | color: #FC6622; 67 | padding: 0px 7px; 68 | text-align: left; 69 | opacity: 0; 70 | transition: opacity 0.4s ease-out; 71 | height: 24px; 72 | line-height: 24px; 73 | } 74 | button#settings-menu:hover::before { opacity: 1; top: 20px; transition-delay: 0.75s;} 75 | img#settings-icon { height: 24px; width: 24px; content:url("/data/img/ic_settings_applications_grey600_48dp.png"); } 76 | img#settings-icon:hover { content:url("/data/img/ic_settings_applications_white_48dp.png"); } 77 | 78 | div#logo-header { 79 | top: 0px; 80 | width: 100%; 81 | text-align: center; 82 | padding: 5px 0px 0px; 83 | background-color: #313131; 84 | color: #FAFAFA; 85 | border: 0px solid #505050; 86 | border-bottom-width:5px; 87 | margin: 0px; 88 | } 89 | img#monero-logo { 90 | height: 50px; 91 | vertical-align: middle; 92 | background: #FAFAFA; 93 | padding:5px; 94 | border-radius:30px; 95 | } 96 | ul#navbar { 97 | width: 100%; 98 | list-style-type: none; 99 | margin: 0px; 100 | padding: 0px; 101 | display: inline-block; 102 | position: relative; 103 | top: 5px; 104 | font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; 105 | } 106 | li.nav-button { 107 | width: 70px; 108 | background-color: #313131; 109 | padding: 6px 0px; 110 | margin: 0px; 111 | margin-bottom: 1px; 112 | border-collapse: collapse; 113 | border:0px solid #505050; 114 | border-right-width: 1px; 115 | display:inline; 116 | float: left; 117 | cursor:pointer; 118 | color: #FAFAFA; 119 | font-size:12px; 120 | text-align:center; 121 | text-decoration:none; 122 | outline: 0; 123 | } 124 | li.nav-button:hover, button.nav-button:active { 125 | background-color: #FAFAFA; 126 | color:#313131; 127 | } 128 | li.nav-button::before { 129 | content: attr(data-tip); 130 | font-size: 10pt; 131 | position: absolute; 132 | z-index: 999; 133 | white-space: nowrap; 134 | bottom: 200px; 135 | left: 20px; 136 | width: auto; 137 | margin-left: 0px; 138 | background:#FAFAFA; 139 | border: 1px solid #FC6622; 140 | border-radius: 4px; 141 | color: #FC6622; 142 | padding: 0px 7px; 143 | text-align: left; 144 | height: 24px; 145 | line-height: 24px; 146 | opacity: 0; 147 | transition: opacity 0.4s ease-out; 148 | } 149 | li.nav-button:hover::before { opacity: 1; bottom: 30px; transition-delay: 0.75s;} 150 | #openMiningTabButton { display: none; } 151 | 152 | /* Network Tab: */ 153 | div#network-tab { width: 100%; text-align: center; } 154 | #marketoverview { width: 100%; height: 80px; } 155 | .infotable { display: inline-block; padding: 0px; border-collapse: collapse; border: 0px; margin: 5px auto; } 156 | #infotop { border-top-width: 1px; } 157 | .infoline { height: 30px; border: 0px solid #E9E9E9; border-bottom-width: 1px; } 158 | .infotype { text-align: left; width: 180px; font-weight: bold; color: #313131;} 159 | .infofill { text-align: right; width: 220px; padding-left: 2px;} 160 | .infotable a:link, .infotable a:visited { color: #356797; text-decoration: none; outline: 0; } 161 | .infotable a:hover, .infotable a:active { color: #98CD6D; text-decoration: underline; outline: 0; } 162 | #captable, #usdtable { 163 | padding: 0px; 164 | border-collapse: collapse; 165 | border: 0px; 166 | text-align: center; 167 | clear:all; 168 | display: none; 169 | color: #313131; 170 | } 171 | #usdtable { font-size: 18pt; margin: 5px auto 0px; } 172 | #captable { font-size: 14pt; margin: 0px auto 5px; } 173 | #usdquote, #capquote { width: 100px; text-align: right; padding-right: 2px; } 174 | #usdcap { text-align:left; padding: 0px 10px;} 175 | #usdprice { width: auto; text-align: left; padding: 0px 10px; } 176 | #usdpriceopen { width: 100px; padding-left: 2px; font-size: 9pt; text-align: left; } 177 | .capline { border: 0px solid #E9E9E9; border-top-width: 1px; } 178 | .quotefill { padding: 0px 20px; } 179 | #USDtoXMR, #BTCtoXMR, #EURtoXMR, #GBPtoXMR { color: #505050; } 180 | #CapUSD, #CapBTC, #CapEUR, #CapGBP { color: #505050; } 181 | 182 | /* Markets Tab: */ 183 | div#markets-tab { display:none; font-size: 11pt; width: 100%; text-align: center; } 184 | .pricetable { 185 | padding: 0px; 186 | border-collapse: collapse; 187 | border: 0px; 188 | margin: 5px auto; 189 | text-align: center; 190 | clear:all; 191 | display: inline-block; 192 | font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; 193 | } 194 | 195 | .priceline { height: 20px; border: 0px solid #E9E9E9; border-bottom-width: 1px;} 196 | .pricetype { text-align: left; width: 45px; font-weight: bold; color:#313131; } 197 | .pricefill { text-align: right; width: 105px; padding-left: 2px; } 198 | .volumefill { text-align: right; width: 70px; padding-left: 2px; } 199 | .pctfill { text-align: center; width: 85px; padding-left: 2px; } 200 | .priceunit, .volumeunit { width: 45px; text-align: left; padding-left: 2px; } 201 | .mktheader { font-size: 12pt; text-align: center; font-weight: bold; background-color: #E9E9E9; border: 0px; padding: 2px 0px;} 202 | .rightcap .mktheader { padding-left: 38px; } 203 | .pricetype a:link, .pricetype a:visited { color: #356797; text-decoration: none; outline: 0; } 204 | .pricetype a:hover, .pricetype a:active { color: #98CD6D; text-decoration: underline; outline: 0; } 205 | 206 | /* Mining Tab: */ 207 | div#mining-tab { display:none; width: 100%; text-align: center; } 208 | #miningaddress { width: 100%; height: 44px; } 209 | .miningtable { display: inline-block; padding: 0px; border-collapse: collapse; border: 0px; margin: 5px auto; } 210 | #m-address { font-size: 11pt; margin-top: 0px; padding: 0px; line-height: 10px; font-family: Consolas, Monaco; } 211 | .miningline { height: 30px; border: 0px solid #E9E9E9; border-bottom-width: 1px; } 212 | #miningtop { border-top-width: 1px; } 213 | .miningtype { text-align: left; width: 160px; font-weight: bold; color: #313131; } 214 | .miningfill { text-align: right; width: 240px; padding-left: 2px; } 215 | 216 | .paymentline { height: 30px; border: 0px solid #E9E9E9; border-bottom-width: 1px; font-size: 10pt; font-weight: normal;} 217 | .paymenttime { text-align: left; width: 178px; font-weight: bold; color: #313131; } 218 | .paymentamount { text-align: right; width: 128px; font-weight: bold; color: #313131; } 219 | .paymentmixin { text-align: right; width: 48px; font-weight: bold; color: #313131; } 220 | #payment-time { font-weight: bold; text-align: left; color: #505050; } 221 | #payment-amount,#payment-mixin { font-weight: bold; text-align: right; color: #505050; } 222 | 223 | .paymenttime a:link, .paymenttime a:visited { color: #356797; text-decoration: none; outline: 0; } 224 | .paymenttime a:hover, .paymenttime a:active { color: #98CD6D; text-decoration: underline; outline: 0; } 225 | 226 | 227 | /* Reddit Feed: */ 228 | div#reddit-tab { display: none; color: #505050; width: 100%; } 229 | .reddittable { font-size: 7pt; border-collapse: collapse; border: 0 solid #E9E9E9; border-top-width: 1px; width: auto; margin: 0 4px; } 230 | .redditline { width: auto; margin: 20px; height: 40px; border: 0px solid #E9E9E9; border-bottom-width: 1px; } 231 | .reddittable tr td { color: #313131; } 232 | .reddittable tr:nth-child(odd) { background-color: #F5F5F5; } 233 | #r-stickied { color: #228822; display: none; } 234 | td.r-vote { width: 30px; text-align: center; border: 0px; font-size: 8pt; } 235 | td.r-thumb, td.r-thumb img { width: 40px; max-height: 50px; } 236 | td.r-thumb img { background-position: 0px -491px; } 237 | td.r-title { border: 0px; } 238 | .r-time { color: #888888; } 239 | .author a:link, .author a:visited { color: #356797; text-decoration: none; outline: 0; } 240 | .author a:hover, .author a:active { color: #98CD6D; text-decoration: underline; outline: 0; } 241 | .title { font-size: 9pt; } 242 | .title a:link, .title a:visited, .title a:hover, .title a:active { color: #313131; text-decoration: none; outline: 0; } 243 | #next-reddit-div { width: 100%; text-align: right; } 244 | #next-reddit { border: 0px solid #FAFAFA; color: #505050; background-color: #FAFAFA; text-decoration:none; outline: 0; margin-right: 5px; } 245 | #next-reddit:hover, #next-reddit:active { color: #888888; } 246 | 247 | /* StackExchange Feed: */ 248 | div#se-tab { display: none; color: #505050; width: 100%; } 249 | .setable { font-size: 8pt; border-collapse: collapse; border: 0 solid #E9E9E9; border-top-width: 1px; width: auto; margin: 0 4px; } 250 | .seline { width: auto; margin: 20px; border: 0px solid #E9E9E9; border-bottom-width: 1px; } 251 | .setable tr td { color: #313131; } 252 | .setable tr:nth-child(odd) { background-color: #F5F5F5; } 253 | td.se-vote { width: 30px; text-align: center; border: 0px; } 254 | td.se-answer { width: 30px; text-align: center; border: 0px; } 255 | td.se-view { width: 30px; text-align: center; border: 0px; } 256 | td.se-post { border: 0px; padding: 2px 0; } 257 | .se-bounty-title { width: 100%; } 258 | .se-bounty { color: white; background-color: #0077dd; padding: 1px 3px 1px 3px; margin-right: 3px; border-radius: 2px;} 259 | .se-title { font-size: 9pt; padding: 2px 0; } 260 | .se-title a:link, .se-title a:visited, .se-title a:hover, .se-title a:active { color: #313131; text-decoration: none; outline: 0; } 261 | .se-tags { width: 100%; line-height: 16px; } 262 | .se-tag { color: #556E77; background-color: #F7FDFF; border: 1px solid #BFD4DC; border-radius: 10px; padding: 0px 3px 1px 3px; } 263 | .se-time-author { width: 100%; color: #888888; text-align: right; } 264 | .se-time-author a:link, .se-time-author a:visited { color: #356797; text-decoration: none; outline: 0; } 265 | .se-time-author a:hover, .se-time-author a:active { color: #98CD6D; text-decoration: underline; outline: 0; } 266 | #next-se-div { width: 100%; text-align: right; } 267 | #next-se { border: 0px solid #FAFAFA; color: #505050; background-color: #FAFAFA; text-decoration:none; outline: 0; margin-right: 5px; } 268 | #next-se:hover, #next-se:active { color: #888888; } 269 | 270 | /* Footer */ 271 | #footer { 272 | margin: 10px 0px 0px; 273 | width:100%; 274 | background-color: #313131; 275 | color: #FAFAFA; 276 | border: 0px solid #505050; 277 | border-top-width:5px; 278 | padding: 18px 0px; 279 | text-align: center; 280 | font-size: 7pt; 281 | } 282 | 283 | /* Podcast List */ 284 | div#podcast-tab { 285 | display: none; color: #505050; width: 100%; 286 | } 287 | div#podcast-list { 288 | width: auto; 289 | margin: 0; 290 | padding: 0 10px; 291 | font-size: 12pt; 292 | } 293 | div.podcast-episode { 294 | width: auto; 295 | margin: 0; 296 | padding: 10px; 297 | border: 0 solid #E0E0E0; 298 | border-bottom-width: 1px; 299 | min-height: 80px; 300 | } 301 | div.podcast-episode:first-of-type { 302 | border-top-width: 1px; 303 | } 304 | div.episode-image { width: 80px; height: 80px; display: inline-block; vertical-align: top; } 305 | div.episode-image img { width: 100%; } 306 | div.episode-description { 307 | width: calc( 100% - 90px ); 308 | margin: 0; 309 | padding: 0 0 0 10px; 310 | display: inline-block; 311 | vertical-align: top; 312 | } 313 | -------------------------------------------------------------------------------- /data/html/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Monero Monitor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |

Monero Monitor

23 | 31 |
32 | 33 |
34 | 35 |
36 |

Market Overview:

37 |
38 | 39 | 40 |
Price:$
Open: $
41 | 42 | 43 |
£ BTC
44 |
45 | 46 |

Network Statistics:

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
Total Supply:
Market Cap:
Hashrate:
Last Block:
Block Time:
Block Reward:
Difficulty:
56 |
57 | 58 |
59 | 60 |

Poloniex Markets:

61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
 Last   VolumeChange
BTCBTC
USDTUSDT
XMRXMR
XMRXMR
XMRXMR
XMRXMR
XMRXMR
XMRXMR
XMRXMR
XMRXMR
74 |
75 | 76 |
77 |

Mining Stats

78 |
79 | 80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 |
Balance:
Hash Rate:
Last Share:
Total Paid:
Total Hashes:
88 |

Recent Payments:

89 | 90 |
91 |
92 | 93 |
94 |

Top posts on :

95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |






























127 |
128 |
129 | 130 |
131 |

132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 |
164 |
165 |
166 | 167 |
168 |

Podcast Episodes

169 |
170 |

171 | Episodes and more available on moneromonitor.com. 172 |

173 |
174 | 175 |
176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /lib/jquery/jquery.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c) 3 | },removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("