" ).parent();
-
- $.each(copyAttrs,function(i){
- if( newPage.attr( copyAttrs[ i ] ) ){
- wrapper.attr( copyAttrs[ i ], newPage.attr( copyAttrs[ i ] ) );
- newPage.removeAttr( copyAttrs[ i ] );
- }
- });
- return wrapper;
- }
-
- //remove active classes after page transition or error
- function removeActiveLinkClass(forceRemoval){
- if( !!$activeClickedLink && (!$activeClickedLink.closest( '.ui-page-active' ).length || forceRemoval )){
- $activeClickedLink.removeClass( $.mobile.activeBtnClass );
- }
- $activeClickedLink = null;
- }
-
-
- //for getting or creating a new page
- function changePage( to, transition, back, changeHash){
-
- //from is always the currently viewed page
- var toIsArray = $.type(to) === "array",
- from = toIsArray ? to[0] : $.mobile.activePage,
- to = toIsArray ? to[1] : to,
- url = fileUrl = $.type(to) === "string" ? to.replace( /^#/, "" ) : null,
- data = undefined,
- type = 'get',
- isFormRequest = false,
- duplicateCachedPage = null,
- back = (back !== undefined) ? back : ( urlStack.length > 1 && urlStack[ urlStack.length - 2 ].url === url ),
- transition = (transition !== undefined) ? transition : $.mobile.defaultTransition;
-
- if( $.type(to) === "object" && to.url ){
- url = to.url,
- data = to.data,
- type = to.type,
- isFormRequest = true;
- //make get requests bookmarkable
- if( data && type == 'get' ){
- url += "?" + data;
- data = undefined;
- }
- }
-
- //reset base to pathname for new request
- resetBaseURL();
-
- // if the new href is the same as the previous one
- if ( back ) {
- transition = urlStack.pop().transition;
- } else {
- urlStack.push({ url: url, transition: transition });
- }
-
- //function for transitioning between two existing pages
- function transitionPages() {
-
- //kill the keyboard
- $( window.document.activeElement ).blur();
-
- //get current scroll distance
- var currScroll = $window.scrollTop();
-
- //set as data for returning to that spot
- from.data('lastScroll', currScroll);
-
- //trigger before show/hide events
- from.data("page")._trigger("beforehide", {nextPage: to});
- to.data("page")._trigger("beforeshow", {prevPage: from});
-
- function loadComplete(){
- pageLoading( true );
- //trigger show/hide events, allow preventing focus change through return false
- if( from.data("page")._trigger("hide", null, {nextPage: to}) !== false && to.data("page")._trigger("show", null, {prevPage: from}) !== false ){
- $.mobile.activePage = to;
- }
- reFocus( to );
- if( changeHash && url ){
- $.mobile.updateHash(url, true);
- }
- removeActiveLinkClass();
-
- //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
- if( duplicateCachedPage != null ){
- duplicateCachedPage.remove();
- }
-
- //jump to top or prev scroll, if set
- silentScroll( to.data( 'lastScroll' ) );
- }
-
- if(transition && (transition !== 'none')){
- $pageContainer.addClass('ui-mobile-viewport-transitioning');
- // animate in / out
- from.addClass( transition + " out " + ( back ? "reverse" : "" ) );
- to.addClass( $.mobile.activePageClass + " " + transition +
- " in " + ( back ? "reverse" : "" ) );
-
- // callback - remove classes, etc
- to.animationComplete(function() {
- from.add( to ).removeClass(" out in reverse " + $.mobile.transitions.join(' ') );
- from.removeClass( $.mobile.activePageClass );
- loadComplete();
- $pageContainer.removeClass('ui-mobile-viewport-transitioning');
- });
- }
- else{
- from.removeClass( $.mobile.activePageClass );
- to.addClass( $.mobile.activePageClass );
- loadComplete();
- }
- };
-
- //shared page enhancements
- function enhancePage(){
- setPageRole( to );
- to.page();
- }
-
- //get the actual file in a jq-mobile nested url
- function getFileURL( url ){
- return url.match( '&' + $.mobile.subPageUrlKey ) ? url.split( '&' + $.mobile.subPageUrlKey )[0] : url;
- }
-
- //if url is a string
- if( url ){
- to = $( "[id='" + url + "']" ),
- fileUrl = getFileURL(url);
- }
- else{ //find base url of element, if avail
- var toID = to.attr('id'),
- toIDfileurl = getFileURL(toID);
-
- if(toID != toIDfileurl){
- fileUrl = toIDfileurl;
- }
- }
-
- // find the "to" page, either locally existing in the dom or by creating it through ajax
- if ( to.length && !isFormRequest ) {
- if( fileUrl ){
- setBaseURL(fileUrl);
- }
- enhancePage();
- transitionPages();
- } else {
-
- //if to exists in DOM, save a reference to it in duplicateCachedPage for removal after page change
- if( to.length ){
- duplicateCachedPage = to;
- }
-
- pageLoading();
-
- $.ajax({
- url: fileUrl,
- type: type,
- data: data,
- success: function( html ) {
- setBaseURL(fileUrl);
- var all = $("
");
- //workaround to allow scripts to execute when included in page divs
- all.get(0).innerHTML = html;
- to = all.find('[data-role="page"]');
-
- //rewrite src and href attrs to use a base url
- if( !$.support.dynamicBaseTag ){
- var baseUrl = getBaseURL(fileUrl);
- to.find('[src],link[href]').each(function(){
- var thisAttr = $(this).is('[href]') ? 'href' : 'src',
- thisUrl = $(this).attr(thisAttr);
-
- //if full path exists and is same, chop it - helps IE out
- thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );
-
- if( !/^(\w+:|#|\/)/.test(thisUrl) ){
- $(this).attr(thisAttr, baseUrl + thisUrl);
- }
- });
- }
-
- //preserve ID on a retrieved page
- if ( to.attr('id') ) {
- to = wrapNewPage( to );
- }
-
- to
- .attr( "id", fileUrl )
- .appendTo( $pageContainer );
-
- enhancePage();
- transitionPages();
- },
- error: function() {
- pageLoading( true );
- removeActiveLinkClass(true);
- $("
Error Loading Page
")
- .css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
- .appendTo( $pageContainer )
- .delay( 800 )
- .fadeOut( 400, function(){
- $(this).remove();
- });
- }
- });
- }
-
- };
-
-
- $(function() {
-
- $body = $( "body" );
- pageLoading();
-
- // needs to be bound at domready (for IE6)
- // find or load content, make it active
- $window.bind( "hashchange", function(e, triggered) {
- if( !hashListener ){
- hashListener = true;
- return;
- }
-
- if( $(".ui-page-active").is("[data-role=" + $.mobile.nonHistorySelectors + "]") ){
- return;
- }
-
- var to = location.hash,
- transition = triggered ? false : undefined;
-
- // either we've backed up to the root page url
- // or it's the first page load with no hash present
- //there's a hash and it wasn't manually triggered
- // > probably a new page, "back" will be figured out by changePage
- if ( to ){
- changePage( to, transition);
- }
- //there's no hash, the active page is not the start page, and it's not manually triggered hashchange
- // > probably backed out to the first page visited
- else if( $.mobile.activePage.length && $startPage[0] !== $.mobile.activePage[0] && !triggered ) {
- changePage( $startPage, transition, true );
- }
- else{
- $startPage.trigger("pagebeforeshow", {prevPage: $('')});
- $startPage.addClass( $.mobile.activePageClass );
- pageLoading( true );
-
- if( $startPage.trigger("pageshow", {prevPage: $('')}) !== false ){
- reFocus($startPage);
- }
- }
-
- });
- });
-
- //add orientation class on flip/resize.
- $window.bind( "orientationchange.htmlclass", function( event ) {
- $html.removeClass( "portrait landscape" ).addClass( event.orientation );
- });
-
- //add breakpoint classes for faux media-q support
- function detectResolutionBreakpoints(){
- var currWidth = $window.width(),
- minPrefix = "min-width-",
- maxPrefix = "max-width-",
- minBreakpoints = [],
- maxBreakpoints = [],
- unit = "px",
- breakpointClasses;
-
- $html.removeClass( minPrefix + resolutionBreakpoints.join(unit + " " + minPrefix) + unit + " " +
- maxPrefix + resolutionBreakpoints.join( unit + " " + maxPrefix) + unit );
-
- $.each(resolutionBreakpoints,function( i ){
- if( currWidth >= resolutionBreakpoints[ i ] ){
- minBreakpoints.push( minPrefix + resolutionBreakpoints[ i ] + unit );
- }
- if( currWidth <= resolutionBreakpoints[ i ] ){
- maxBreakpoints.push( maxPrefix + resolutionBreakpoints[ i ] + unit );
- }
- });
-
- if( minBreakpoints.length ){ breakpointClasses = minBreakpoints.join(" "); }
- if( maxBreakpoints.length ){ breakpointClasses += " " + maxBreakpoints.join(" "); }
-
- $html.addClass( breakpointClasses );
- };
-
- //add breakpoints now and on oc/resize events
- $window.bind( "orientationchange resize", detectResolutionBreakpoints);
- detectResolutionBreakpoints();
-
- //common breakpoints, overrideable, changeable
- $.mobile.addResolutionBreakpoints = function( newbps ){
- if( $.type( newbps ) === "array" ){
- resolutionBreakpoints = resolutionBreakpoints.concat( newbps );
- }
- else {
- resolutionBreakpoints.push( newbps );
- }
- detectResolutionBreakpoints();
- }
-
- //animation complete callback
- //TODO - update support test and create special event for transitions
- //check out transitionEnd (opera per Paul's request)
- $.fn.animationComplete = function(callback){
- if($.support.cssTransitions){
- return $(this).one('webkitAnimationEnd', callback);
- }
- else{
- callback();
- }
- };
-
- //TODO - add to jQuery.mobile, not $
- $.extend($.mobile, {
- pageLoading: pageLoading,
- changePage: changePage,
- silentScroll: silentScroll
- });
-
- //dom-ready
- $(function(){
- var $pages = $("[data-role='page']");
- //set up active page
- $startPage = $.mobile.activePage = $pages.first();
-
- //set page container
- $pageContainer = $startPage.parent().addClass('ui-mobile-viewport');
-
- $.extend({
- pageContainer: $pageContainer
- });
-
- //initialize all pages present
- $pages.page();
-
- //trigger a new hashchange, hash or not
- $window.trigger( "hashchange", [ true ] );
-
- //update orientation
- $window.trigger( "orientationchange.htmlclass" );
-
- //remove rendering class
- $html.removeClass('ui-mobile-rendering');
- });
-
- $window.load(silentScroll);
-
-})( jQuery, this );
\ No newline at end of file
diff --git a/public/javascripts/vendor/jquery_mobile_a2.min.js b/public/javascripts/vendor/jquery_mobile_a2.min.js
deleted file mode 100644
index 73a902216..000000000
--- a/public/javascripts/vendor/jquery_mobile_a2.min.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*!
- * jQuery Mobile v1.0a2
- * http://jquerymobile.com/
- *
- * Copyright 2010, jQuery Project
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- */
-(function(a,e){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var f=0,h;(h=b[f])!=null;f++)a(h).triggerHandler("remove");c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,f){return this.each(function(){if(!f)if(!b||a.filter(b,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return d.call(a(this),b,f)})}}a.widget=function(b,f,h){var l=b.split(".")[0],j;b=b.split(".")[1];j=l+"-"+b;if(!h){h=f;f=a.Widget}a.expr[":"][j]=function(n){return!!a.data(n,
-b)};a[l]=a[l]||{};a[l][b]=function(n,g){arguments.length&&this._createWidget(n,g)};f=new f;f.options=a.extend(true,{},f.options);a[l][b].prototype=a.extend(true,f,{namespace:l,widgetName:b,widgetEventPrefix:a[l][b].prototype.widgetEventPrefix||b,widgetBaseClass:j},h);a.widget.bridge(b,a[l][b])};a.widget.bridge=function(b,f){a.fn[b]=function(h){var l=typeof h==="string",j=Array.prototype.slice.call(arguments,1),n=this;h=!l&&j.length?a.extend.apply(null,[true,h].concat(j)):h;if(l&&h.charAt(0)==="_")return n;
-l?this.each(function(){var g=a.data(this,b);if(!g)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+h+"'";if(!a.isFunction(g[h]))throw"no such method '"+h+"' for "+b+" widget instance";var i=g[h].apply(g,j);if(i!==g&&i!==e){n=i;return false}}):this.each(function(){var g=a.data(this,b);g?g.option(h||{})._init():a.data(this,b,new f(h,this))});return n}};a.Widget=function(b,f){arguments.length&&this._createWidget(b,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
-options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var h=this;this.element.bind("remove."+this.widgetName,function(){h.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata)b=a.metadata.get(element)[this.widgetName];return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
-this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,f){var h=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(f===e)return this.options[b];h={};h[b]=f}this._setOptions(h);return this},_setOptions:function(b){var f=this;a.each(b,function(h,l){f._setOption(h,l)});return this},_setOption:function(b,f){this.options[b]=f;if(b===
-"disabled")this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,f,h){var l=this.options[b];f=a.Event(f);f.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();h=h||{};if(f.originalEvent){b=a.event.props.length;for(var j;b;){j=a.event.props[--b];f[j]=f.originalEvent[j]}}this.element.trigger(f,
-h);return!(a.isFunction(l)&&l.call(this.element[0],f,h)===false||f.isDefaultPrevented())}}})(jQuery);(function(a,e){a.widget("mobile.widget",{_getCreateOptions:function(){var c=this.element,d={};a.each(this.options,function(b){var f=c.data(b.replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()}));if(f!==e)d[b]=f});return d}})})(jQuery);
-(function(a,e){function c(j){var n=j.charAt(0).toUpperCase()+j.substr(1);j=(j+" "+f.join(n+" ")+n).split(" ");for(var g in j)if(b[g]!==e)return true}a.media=function(){var j={},n=a("html"),g=a("
"),i=a("").append(g);return function(m){if(!(m in j)){var o=a("");n.prepend(i).prepend(o);j[m]=g.css("position")==="absolute";i.add(o).remove()}return j[m]}}();var d=a("").prependTo("html"),
-b=d[0].style,f=["webkit","moz","o"],h=window.palmGetResource||window.PalmServiceBridge,l=window.blackberry;a.extend(a.support,{orientation:"orientation"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:!!history.pushState,mediaquery:a.media("only all"),cssPseudoElement:!!c("content"),boxShadow:!!c("boxShadow")&&!l,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in d[0])&&!h,dynamicBaseTag:function(){var j=location.protocol+
-"//"+location.host+location.pathname+"ui-dir/",n=a("
",{href:j}).appendTo("head"),g=a("
").prependTo(d)[0].href;n.remove();return g.indexOf(j)===0}()});d.remove();a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
-(function(a,e){a.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(h,l){a.fn[l]=function(j){return j?this.bind(l,j):this.trigger(l)};a.attrFn[l]=true});var c=a.support.touch,d=c?"touchstart":"mousedown",b=c?"touchend":"mouseup",f=c?"touchmove":"mousemove";a.event.special.scrollstart={enabled:true,setup:function(){function h(g,i){j=i;var m=g.type;g.type=j?"scrollstart":"scrollstop";a.event.handle.call(l,g);g.type=
-m}var l=this,j,n;a(l).bind("touchmove scroll",function(g){if(a.event.special.scrollstart.enabled){j||h(g,true);clearTimeout(n);n=setTimeout(function(){h(g,false)},50)}})}};a.event.special.tap={setup:function(){var h=this,l=a(h);l.bind(d,function(j){function n(){if(Math.abs(m[0]-j.pageX)>10||Math.abs(m[1]-j.pageY)>10)g=true}if(!(j.which&&j.which!==1)){var g=false,i=true,m=[j.pageX,j.pageY],o,t;t=setTimeout(function(){if(i&&!g){o=j.type;j.type="taphold";a.event.handle.call(h,j);j.type=o}},750);l.one(f,
-n).one(b,function(w){l.unbind(f,n);clearTimeout(t);i=false;if(!g){o=w.type;w.type="tap";a.event.handle.call(h,w);w.type=o}})}})}};a.event.special.swipe={setup:function(){var h=a(this);h.bind(d,function(l){function j(m){if(g){var o=m.originalEvent.touches?m.originalEvent.touches[0]:m;i={time:(new Date).getTime(),coords:[o.pageX,o.pageY]};Math.abs(g.coords[0]-i.coords[0])>10&&m.preventDefault()}}var n=l.originalEvent.touches?l.originalEvent.touches[0]:l,g={time:(new Date).getTime(),coords:[n.pageX,
-n.pageY],origin:a(l.target)},i;h.bind(f,j).one(b,function(){h.unbind(f,j);if(g&&i)if(i.time-g.time<1E3&&Math.abs(g.coords[0]-i.coords[0])>30&&Math.abs(g.coords[1]-i.coords[1])<75)g.origin.trigger("swipe").trigger(g.coords[0]>i.coords[0]?"swipeleft":"swiperight");g=i=e})})}};(function(h){function l(){var i=n();if(i!==g){g=i;j.trigger("orientationchange")}}var j=h(window),n,g;h.event.special.orientationchange={setup:function(){if(h.support.orientation)return false;g=n();j.bind("resize",l)},teardown:function(){if(h.support.orientation)return false;
-j.unbind("resize",l)},add:function(i){var m=i.handler;i.handler=function(o){o.orientation=n();return m.apply(this,arguments)}}};n=function(){var i=document.documentElement;return i&&i.clientWidth/i.clientHeight<1.1?"portrait":"landscape"}})(jQuery);a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(h,l){a.event.special[h]={setup:function(){a(this).bind(l,a.noop)}}})})(jQuery);
-(function(a,e,c){function d(g){g=g||location.href;return"#"+g.replace(/^[^#]*#?(.*)$/,"$1")}var b="hashchange",f=document,h,l=a.event.special,j=f.documentMode,n="on"+b in e&&(j===c||j>7);a.fn[b]=function(g){return g?this.bind(b,g):this.trigger(b)};a.fn[b].delay=50;l[b]=a.extend(l[b],{setup:function(){if(n)return false;a(h.start)},teardown:function(){if(n)return false;a(h.stop)}});h=function(){function g(){var x=d(),v=u(o);if(x!==o){w(o=x,v);a(e).trigger(b)}else if(v!==o)location.href=location.href.replace(/#.*/,
-"")+v;m=setTimeout(g,a.fn[b].delay)}var i={},m,o=d(),t=function(x){return x},w=t,u=t;i.start=function(){m||g()};i.stop=function(){m&&clearTimeout(m);m=c};a.browser.msie&&!n&&function(){var x,v;i.start=function(){if(!x){v=(v=a.fn[b].src)&&v+d();x=a('
').hide().one("load",function(){v||w(d());g()}).attr("src",v||"javascript:0").insertAfter("body")[0].contentWindow;f.onpropertychange=function(){try{if(event.propertyName==="title")x.document.title=f.title}catch(s){}}}};
-i.stop=t;u=function(){return d(x.location.href)};w=function(s,z){var q=x.document,G=a.fn[b].domain;if(s!==z){q.title=f.title;q.open();G&&q.write('