--- /dev/null +++ b/.gitignore @@ -1,1 +1,1 @@ - +/nbproject/private/
--- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,7 @@ [submodule "sag"] path = sag - url = git://github.com/sbisbee/sag.git + url = https://github.com/sbisbee/sag.git +[submodule "couchdb/couchdb-lucene"] + path = couchdb/couchdb-lucene + url = https://github.com/rnewson/couchdb-lucene.git
--- /dev/null +++ b/common.inc.php @@ -1,1 +1,133 @@ +<?php +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +function createAgencyDesignDoc() { + global $sag; + //See if the design doc exists, creating it if it doesn't + try { + //it does exist, so finish early + if ($sag->head('_design/app')->headers->_HTTP->status != "404") + return true; + } catch (Exception $e) { + //database issue + return false; + } + $ddoc = new StdClass(); + $ddoc->_id = '_design/app'; + $ddoc->views = new StdClass(); + // by abn, by name + $ddoc->views->byABN = new StdClass(); + $ddoc->views->byABN->map = "function(doc) { emit(doc.abn, doc); };"; + $ddoc->views->byName = new StdClass(); + $ddoc->views->byName->map = "function(doc) { emit(doc.name, doc); };"; + $ddoc->views->getActive = new StdClass(); + $ddoc->views->getActive->map = 'function(doc) { if (doc.status == "active") { emit(doc._id, doc); } };'; + $ddoc->views->getSuspended = new StdClass(); + $ddoc->views->getSuspended->map = 'function(doc) { if (doc.status == "suspended") { emit(doc._id, doc); } };'; + $ddoc->views->getScrapeRequired = new StdClass(); + $ddoc->views->getScrapeRequired->map = "function(doc) { emit(doc.abn, doc); };"; + try { + $sag->put('_design/app', $ddoc); + } catch (Exception $e) { + /* + * A 409 status code means there was a conflict, so another client + * already created the design doc for us. This is fine. + */ + if ($e->getCode() != 409) + return false; + } + return true; +} +error_reporting(0); +require_once('sag/src/SagException.php'); +require_once('sag/src/SagCouchException.php'); +require_once('sag/src/SagConfigurationCheck.php'); +require_once('sag/src/httpAdapters/SagHTTPAdapter.php'); +require_once('sag/src/httpAdapters/SagNativeHTTPAdapter.php'); +require_once('sag/src/httpAdapters/SagCURLHTTPAdapter.php'); +require_once 'sag/src/Sag.php'; +error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE); +$sag = new Sag(); + +// createAgencyDesignDoc(); + +function include_header() { + ?> +<!DOCTYPE html> + +<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> +<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> +<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> +<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> +<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> +<head> + <meta charset="utf-8" /> + + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + + <title>Welcome to Foundation</title> + + <!-- Included CSS Files --> + <link rel="stylesheet" href="stylesheets/foundation.css"> + <link rel="stylesheet" href="stylesheets/app.css"> + + <!--[if lt IE 9]> + <link rel="stylesheet" href="stylesheets/ie.css"> + <![endif]--> + + + <!-- IE Fix for HTML5 Tags --> + <!--[if lt IE 9]> + <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + +</head> +<body> + + <!-- navBar --> + <div id="navBar" class="container"> + <div class="row"> + <div class="four columns"> + <h1><a href="/">Disclosr</a></h1> + </div> + <div class="eight columns hide-on-phones"> + <strong class="right"> + <a href="../grid.php">Features</a> + <a href="../case-soapbox.php">Case Studies</a> + <a href="index.php">Documentation</a> + <a href="http://github.com/navb/foundation">Github</a> + <a href="../files/foundation-download-2.1.4.zip" class="small blue nice button src-download">Download</a> + + </strong> + </div> + </div> + </div> + <!-- /navBar --> + + <!-- container --> + <div class="container"> +<?php } + +function include_footer() { ?> +</div> + <!-- container --> + + + + + <!-- Included JS Files --> + <script src="javascripts/foundation.js"></script> + <script src="javascripts/app.js"></script> + +</body> +</html> + +<?php } ?> + + +
--- /dev/null +++ b/exportAgencies.csv.php @@ -1,1 +1,65 @@ +<?php +include_once("./lib/common.inc.php"); +setlocale(LC_CTYPE, 'C'); +// source: http://stackoverflow.com/questions/81934/easy-way-to-export-a-sql-table-without-access-to-the-server-or-phpmyadmin#81951 + +$unspsc = Array(); +$unspscresult = $conn->prepare('select * from "UNSPSCcategories" where "UNSPSC"::text like \'%00000\';'); +$unspscresult->execute(); +foreach ($unspscresult->fetchAll() as $row) { + $unspsc[$row['UNSPSC']] = $row['Title']; +} + +$query = $conn->prepare(' +SELECT "CNID",contractnotice."agencyName",agency_nametoabn.abn as "agencyABN", +EXTRACT(EPOCH FROM "publishDate") as "publishDate", +EXTRACT(EPOCH FROM "contractStart") as "contractStart", +EXTRACT(EPOCH FROM "contractEnd") as "contractEnd", +value,description,category, +"supplierName",(case when "supplierABN" != 0 THEN "supplierABN"::text ELSE "supplierName" END) as supplierID, +(\'https://www.tenders.gov.au/?event=public.advancedsearch.keyword&keyword=CN\'::text || "CNID"::text) as sourceURL +FROM contractnotice join agency_nametoabn on contractnotice."agencyName"=agency_nametoabn."agencyName" +where "childCN" is null' + , array(PDO::ATTR_CURSOR => PDO::FETCH_ORI_NEXT)); +$query->execute(); +$errors = $conn->errorInfo(); +if ($errors[2] != "") { + die("Export terminated, db error" . print_r($errors, true)); +} + +$num_fields = $query->columnCount(); +$headers = Array(); +for ($i = 0; $i < $num_fields; $i++) { // for each column in query, make a CSV header + $meta = $query->getColumnMeta($i); + $headers[] = $meta['name']; +} +$fp = fopen('php://output', 'w'); +if ($fp && $query) { + header('Content-Type: text/csv'); + header('Content-Disposition: attachment; filename="export.' . date("c") . '.csv"'); + header('Pragma: no-cache'); + header('Expires: 0'); + fputcsv($fp, $headers); + while ($row = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) { + foreach ($row as $key => &$colvalue) { + + $colvalue = preg_replace('/[^[:print:]]/', '', utf8_encode($colvalue)); + if ($headers[$key] == "publishDate" || $headers[$key] == "contractStart" + || $headers[$key] == "contractEnd") { + $colvalue = date("Y-m-d", $colvalue); + } + /* if ($headers[$key] == "CNID") { + $colvalue = str_replace("A","", $colvalue); +}*/ + if ($headers[$key] == "cat1" || $headers[$key] == "cat2" + || $headers[$key] == "cat3") { + $colvalue = $unspsc[$colvalue]; + } + } + fputcsv($fp, array_values($row)); + } + die; +} +?> +
--- /dev/null +++ b/foundation.html @@ -1,1 +1,137 @@ +<!DOCTYPE html> +<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> +<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> +<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> +<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> +<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> +<head> + <meta charset="utf-8" /> + + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + + <title>Welcome to Foundation</title> + + <!-- Included CSS Files --> + <link rel="stylesheet" href="stylesheets/foundation.css"> + <link rel="stylesheet" href="stylesheets/app.css"> + + <!--[if lt IE 9]> + <link rel="stylesheet" href="stylesheets/ie.css"> + <![endif]--> + + + <!-- IE Fix for HTML5 Tags --> + <!--[if lt IE 9]> + <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + +</head> +<body> + + <!-- container --> + <div class="container"> + + <div class="row"> + <div class="twelve columns"> + <h2>Welcome to Foundation</h2> + <p>This is version 2.1.4 released on December 19, 2011</p> + <hr /> + </div> + </div> + + <div class="row"> + <div class="eight columns"> + <h3>The Grid</h3> + + <!-- Grid Example --> + <div class="row"> + <div class="twelve columns"> + <div class="panel"> + <p>This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.</p> + </div> + </div> + </div> + <div class="row"> + <div class="six columns"> + <div class="panel"> + <p>Six columns</p> + </div> + </div> + <div class="six columns"> + <div class="panel"> + <p>Six columns</p> + </div> + </div> + </div> + <div class="row"> + <div class="four columns"> + <div class="panel"> + <p>Four columns</p> + </div> + </div> + <div class="four columns"> + <div class="panel"> + <p>Four columns</p> + </div> + </div> + <div class="four columns"> + <div class="panel"> + <p>Four columns</p> + </div> + </div> + </div> + + <h3>Tabs</h3> + <dl class="tabs"> + <dd><a href="#simple1" class="active">Simple Tab 1</a></dd> + <dd><a href="#simple2">Simple Tab 2</a></dd> + <dd><a href="#simple3">Simple Tab 3</a></dd> + </dl> + + <ul class="tabs-content"> + <li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li> + <li id="simple2Tab">This is simple tab 2's content. Now you see it!</li> + <li id="simple3Tab">This is simple tab 3's content. It's, you know...okay.</li> + </ul> + + <h3>Buttons</h3> + + <p><a href="#" class="small blue button">Small Blue Button</a></p> + <p><a href="#" class="blue button">Medium Blue Button</a></p> + <p><a href="#" class="large blue button">Large Blue Button</a></p> + + <p><a href="#" class="nice radius small blue button">Nice Blue Button</a></p> + <p><a href="#" class="nice radius blue button">Nice Blue Button</a></p> + <p><a href="#" class="nice radius large blue button">Nice Blue Button</a></p> + + </div> + + <div class="four columns"> + <h4>Getting Started</h4> + <p>We're stoked you want to try Foundation! To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p> + + <h4>Other Resources</h4> + <p>Once you've exhausted the fun in this document, you should check out:</p> + <ul class="disc"> + <li><a href="http://foundation.zurb.com/docs">Foundation Documentation</a><br />Everything you need to know about using the framework.</li> + <li><a href="http://github.com/zurb/foundation">Foundation on Github</a><br />Latest code, issue reports, feature requests and more.</li> + <li><a href="http://twitter.com/foundationzurb">@foundationzurb</a><br />Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker).</li> + </ul> + </div> + </div> + + </div> + <!-- container --> + + + + + <!-- Included JS Files --> + <script src="javascripts/foundation.js"></script> + <script src="javascripts/app.js"></script> + +</body> +</html> +
--- a/getAgency.php +++ b/getAgency.php @@ -1,57 +1,24 @@ <?php -function createAgencyDesignDoc() -{ - global $sag; - //See if the design doc exists, creating it if it doesn't - try { - //it does exist, so finish early - if ($sag->head('_design/app')->headers->_HTTP->status != "404") return true; - } - catch(Exception $e) { - //database issue - return false; - } - $ddoc = new StdClass(); - $ddoc->_id = '_design/app'; - $ddoc->views = new StdClass(); - // by abn, by name - $ddoc->views->byABN = new StdClass(); - $ddoc->views->byABN->map = "function(doc) { emit(doc.ABN, doc); };"; - $ddoc->views->byName = new StdClass(); - $ddoc->views->byName->map = "function(doc) { emit(doc.name, doc); };"; - $ddoc->views->getActive = new StdClass(); - $ddoc->views->getActive->map = 'function(doc) { if (doc.status == "active") { emit(doc._id, doc); } };'; - $ddoc->views->getSuspended = new StdClass(); - $ddoc->views->getSuspended->map = 'function(doc) { if (doc.status == "suspended") { emit(doc._id, doc); } };'; - $ddoc->views->getScrapeRequired = new StdClass(); - $ddoc->views->getScrapeRequired->map = "function(doc) { emit(doc.ABN, doc); };"; - try { - $sag->put('_design/app', $ddoc); - } - catch(Exception $e) { - /* - * A 409 status code means there was a conflict, so another client - * already created the design doc for us. This is fine. - */ - if ($e->getCode() != 409) return false; - } - return true; -} -require_once 'sag/src/Sag.php'; -$sag = new Sag(); + +include_once('common.inc.php'); +include_header(); + $sag->setDatabase("disclosr-agencies", true); //get an agency record as json/html, search by name/abn/id // by name = startkey="Ham"&endkey="Ham\ufff0" // edit? -createAgencyDesignDoc(); $rows = $sag->get('/_design/app/_view/byABN?include_docs=true')->body->rows; // &endkey='.$searchVar foreach ($rows as $row) { - echo "<table>"; - echo '<tr> <td colspan="2"><h3>' . $row->doc->agencyName. "</h3></td></tr>"; - echo "<tr><th>Field Name</th><th>Field Value</th></tr>"; - foreach ($row->doc as $key => $value) { - echo "<tr><td>$key</td><td>$value</td></tr>"; + echo "<table>"; + echo '<tr> <td colspan="2"><h3>' . $row->doc->agencyName . "</h3></td></tr>"; + echo "<tr><th>Field Name</th><th>Field Value</th></tr>"; +foreach ($row->doc as $key => $value) { + if (is_a($value, 'stdClass')) { + echo "<tr><td>$key</td><td>".var_dump($value,true)."</td></tr>"; + } else echo "<tr><td>$key</td><td>$value</td></tr>"; } // also show documents/URLs available - echo "</table>"; + + echo "</table>"; } +include_footer();
--- /dev/null +++ b/humans.txt @@ -1,1 +1,8 @@ +/* Foundation was made by ZURB, an interaction design and design strategy firm in Campbell, CA */ +/* zurb.com */ +/* humanstxt.org */ +/* SITE */ + Standards: HTML5, CSS3 + Components: jQuery, Orbit, Reveal + Software: Coda, Textmate, Git
Binary files /dev/null and b/images/misc/button-gloss.png differ
Binary files /dev/null and b/images/misc/button-overlay.png differ
Binary files /dev/null and b/images/misc/custom-form-sprites.png differ
Binary files /dev/null and b/images/misc/input-bg.png differ
Binary files /dev/null and b/images/misc/modal-gloss.png differ
Binary files /dev/null and b/images/misc/table-sorter.png differ
Binary files /dev/null and b/images/orbit/bullets.jpg differ
Binary files /dev/null and b/images/orbit/left-arrow.png differ
Binary files /dev/null and b/images/orbit/loading.gif differ
Binary files /dev/null and b/images/orbit/mask-black.png differ
Binary files /dev/null and b/images/orbit/pause-black.png differ
Binary files /dev/null and b/images/orbit/right-arrow.png differ
Binary files /dev/null and b/images/orbit/rotator-black.png differ
Binary files /dev/null and b/images/orbit/timer-black.png differ
--- /dev/null +++ b/javascripts/app.js @@ -1,1 +1,95 @@ +/* Foundation v2.1.4 http://foundation.zurb.com */ +$(document).ready(function () { + /* Use this js doc for all application specific JS */ + + /* TABS --------------------------------- */ + /* Remove if you don't need :) */ + + function activateTab($tab) { + var $activeTab = $tab.closest('dl').find('a.active'), + contentLocation = $tab.attr("href") + 'Tab'; + + //Make Tab Active + $activeTab.removeClass('active'); + $tab.addClass('active'); + + //Show Tab Content + $(contentLocation).closest('.tabs-content').children('li').hide(); + $(contentLocation).show(); + } + + $('dl.tabs').each(function () { + //Get all tabs + var tabs = $(this).children('dd').children('a'); + tabs.click(function (e) { + activateTab($(this)); + }); + }); + + if (window.location.hash) { + activateTab($('a[href="' + window.location.hash + '"]')); + } + + /* ALERT BOXES ------------ */ + $(".alert-box").delegate("a.close", "click", function(event) { + event.preventDefault(); + $(this).closest(".alert-box").fadeOut(function(event){ + $(this).remove(); + }); + }); + + + /* PLACEHOLDER FOR FORMS ------------- */ + /* Remove this and jquery.placeholder.min.js if you don't need :) */ + + $('input, textarea').placeholder(); + + + + /* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */ +// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'}); +// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'}); +// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'}); +// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'}); + + + + /* DROPDOWN NAV ------------- */ + + var currentFoundationDropdown = null; + $('.nav-bar li a, .nav-bar li a:after').each(function() { + $(this).data('clicks', 0); + }); + $('.nav-bar li a, .nav-bar li a:after').live('click', function(e) { + e.preventDefault(); + if (currentFoundationDropdown !== $(this).index() || currentFoundationDropdown === null) { + $(this).data('clicks', 0); + currentFoundationDropdown = $(this).index(); + } + $(this).data('clicks', ($(this).data('clicks') + 1)); + var f = $(this).siblings('.flyout'); + if (!f.is(':visible') && $(this).parent('.has-flyout').length > 1) { + $('.nav-bar li .flyout').hide(); + f.show(); + } else if (($(this).data('clicks') > 1) || ($(this).parent('.has-flyout').length < 1)) { + window.location = $(this).attr('href'); + } + }); + $('.nav-bar').live('click', function(e) { + e.stopPropagation(); + if ($(e.target).parents().is('.flyout') || $(e.target).is('.flyout')) { + e.preventDefault(); + } + }); + // $('body').bind('touchend', function(e) { + // if (!$(e.target).parents().is('.nav-bar') || !$(e.target).is('.nav-bar')) { + // $('.nav-bar li .flyout').is(':visible').hide(); + // } + // }); + + /* DISABLED BUTTONS ------------- */ + /* Gives elements with a class of 'disabled' a return: false; */ + +}); +
--- /dev/null +++ b/javascripts/foundation.js @@ -1,1 +1,14 @@ +/* Foundation v2.1.4 http://foundation.zurb.com */ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement){cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close()}d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1){for(h in a.converters){typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h])}}l=k,k=d[g];if(k==="*"){k=l}else{if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g){i in d&&(c[g[i]]=d[i])}while(f[0]==="*"){f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"))}if(h){for(i in e){if(e[i]&&e[i].test(h)){f.unshift(i);break}}}if(f[0] in d){j=f[0]}else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b)){f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)})}else{if(!c&&b!=null&&typeof b=="object"){for(var e in b){ca(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c){c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d])}e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++){l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)))}(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++){h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border"){for(;g<h;g++){c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0}}return d+"px"}d=bz(a,b,b);if(d<0||d==null){d=a.style[b]||0}d=parseFloat(d)||0;if(c){for(;g<h;g++){d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0)}}return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio"){a.defaultChecked=a.checked}}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object"){b.outerHTML=a.outerHTML}else{if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option"){b.selected=a.defaultSelected}else{if(c==="input"||c==="textarea"){b.defaultValue=a.defaultValue}}}else{a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)}}b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i){for(d=0,e=i[c].length;d<e;d++){f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}}}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement){while(b.length){c.createElement(b.pop())}}return c}function T(a,b,c){b=b||0;if(f.isFunction(b)){return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c})}if(b.nodeType){return f.grep(a,function(a,d){return a===b===c})}if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b)){return f.filter(b,d,!c)}b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return !a||!a.parentNode||a.parentNode.nodeType===11}function K(){return !0}function J(){return !1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b])){continue}if(b!=="toJSON"){return !1}}return !0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else{d=b}}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++){b[a[c]]=!0}return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a){return this}if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2]){return f.find(a)}this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return !d||d.jquery?(d||f).find(