scala-news-reader

rss/atom news reader in scala

git clone https://9o.is/git/scala-news-reader.git

commit 3ae953e1dbfbd17ce013800641c0e3ba23b81994
parent 0519dd8b705d77ddfe98a534544b7dab65c49738
Author: Jul <jul@9o.is>
Date:   Mon, 15 Jul 2013 17:41:19 -0400

second

Diffstat:
M.gitignore | 7+++++++
Mproject/plugins.sbt | 10+++++++---
Msbt | 2+-
Msbt-debug | 2+-
Msrc/main/javascript/customs/other.js | 42+++++++++++++++++++++++++++++++++++++++---
Dsrc/main/javascript/libs/bootstrap-2.2.2.min.js | 7-------
Asrc/main/javascript/libs/bootstrap/bootstrap-affix.js | 118+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-alert.js | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-button.js | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-carousel.js | 208+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-collapse.js | 168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-dropdown.js | 169+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-modal.js | 247+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-popover.js | 114+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-scrollspy.js | 163+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-tab.js | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-tooltip.js | 361+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-transition.js | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap-typeahead.js | 335+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/bootstrap/bootstrap.min.js | 7+++++++
Dsrc/main/javascript/libs/jquery-1.8.3.min.js | 3---
Asrc/main/javascript/libs/jquery-1.9.1.min.js | 6++++++
Asrc/main/javascript/libs/jquery.keynav.js | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/javascript/libs/jquery.tinyscrollbar.js | 204+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsrc/main/javascript/libs/mediaelement-and-player.min.js | 172-------------------------------------------------------------------------------
Msrc/main/javascript/script.jsm | 18+++++++++++++-----
Dsrc/main/less/bootstrap/bootstrap.less | 63---------------------------------------------------------------
Msrc/main/less/bootstrap/button-groups.less | 6++++--
Msrc/main/less/bootstrap/buttons.less | 18++++++++----------
Msrc/main/less/bootstrap/carousel.less | 41++++++++++++++++++++++++++++++++++-------
Msrc/main/less/bootstrap/close.less | 3++-
Msrc/main/less/bootstrap/dropdowns.less | 39+++++++++++++++++++++++++++------------
Msrc/main/less/bootstrap/forms.less | 13++++++++-----
Msrc/main/less/bootstrap/labels-badges.less | 6++++--
Msrc/main/less/bootstrap/media.less | 4++--
Msrc/main/less/bootstrap/mixins.less | 3++-
Msrc/main/less/bootstrap/navbar.less | 55++++++++++++++++++++++++++++++++-----------------------
Msrc/main/less/bootstrap/navs.less | 60+++++++++++++++++++++++++++++++++++++++---------------------
Msrc/main/less/bootstrap/pager.less | 4+++-
Msrc/main/less/bootstrap/pagination.less | 4+++-
Msrc/main/less/bootstrap/popovers.less | 6+++++-
Msrc/main/less/bootstrap/reset.less | 3+--
Msrc/main/less/bootstrap/responsive-1200px-min.less | 1-
Msrc/main/less/bootstrap/responsive-767px-max.less | 18++++++++++++++++--
Msrc/main/less/bootstrap/responsive-768px-979px.less | 12++++++++++++
Msrc/main/less/bootstrap/responsive-navbar.less | 15++++++++++-----
Msrc/main/less/bootstrap/responsive-utilities.less | 16++++++++++++++++
Dsrc/main/less/bootstrap/responsive.less | 57---------------------------------------------------------
Msrc/main/less/bootstrap/scaffolding.less | 3++-
Msrc/main/less/bootstrap/sprites.less | 10+++++++---
Msrc/main/less/bootstrap/tables.less | 41++++++++++++++++++++++++-----------------
Msrc/main/less/bootstrap/thumbnails.less | 20++++++++++++++++++--
Msrc/main/less/bootstrap/tooltip.less | 12++++++------
Msrc/main/less/bootstrap/type.less | 28+++++++++++++++++++++-------
Msrc/main/less/bootstrap/variables.less | 27++++++++++++++++-----------
Dsrc/main/less/custom.less | 122-------------------------------------------------------------------------------
Dsrc/main/less/mediaelementplayer.less | 865-------------------------------------------------------------------------------
Msrc/main/less/styles.less | 850++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
Msrc/main/less/variables.less | 57+++++++++++++++++++++++++++++++++++++--------------------
Msrc/main/resources/props/default.props | 7+++++--
Msrc/main/scala/bootstrap/liftweb/Boot.scala | 4++--
Msrc/main/scala/com/joereader/config/Site.scala | 65+++++++++++++++++++++++++++++++++++++++++++++++++----------------
Msrc/main/scala/com/joereader/lib/Helper.scala | 14++++++++++++++
Msrc/main/scala/com/joereader/lib/ImageUpload.scala | 16++++------------
Asrc/main/scala/com/joereader/lib/Wordpress.scala | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/main/scala/com/joereader/lib/rss/Rss.scala | 113++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Msrc/main/scala/com/joereader/model/Blog.scala | 11+++++++++--
Msrc/main/scala/com/joereader/model/User.scala | 78+++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Msrc/main/scala/com/joereader/snippet/BlogSnips.scala | 247++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
Msrc/main/scala/com/joereader/snippet/LiftExtras.scala | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
Msrc/main/scala/com/joereader/snippet/SignUp.scala | 38+++++++++++++++++++++++++-------------
Msrc/main/scala/com/joereader/snippet/UserSnips.scala | 203++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
Msrc/main/scala/com/joereader/snippet/Verification.scala | 164+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
Asrc/main/webapp/_/img/large/image1.jpg | 0
Asrc/main/webapp/_/img/large/image10.jpg | 0
Asrc/main/webapp/_/img/large/image2.jpg | 0
Asrc/main/webapp/_/img/large/image3.jpg | 0
Asrc/main/webapp/_/img/large/image4.jpg | 0
Asrc/main/webapp/_/img/large/image5.jpg | 0
Asrc/main/webapp/_/img/large/image6.jpg | 0
Asrc/main/webapp/_/img/large/image7.jpg | 0
Asrc/main/webapp/_/img/large/image8.jpg | 0
Asrc/main/webapp/_/img/large/image9.jpg | 0
Asrc/main/webapp/_/img/small/image1.jpg | 0
Asrc/main/webapp/_/img/small/image10.jpg | 0
Asrc/main/webapp/_/img/small/image2.jpg | 0
Asrc/main/webapp/_/img/small/image3.jpg | 0
Asrc/main/webapp/_/img/small/image4.jpg | 0
Asrc/main/webapp/_/img/small/image5.jpg | 0
Asrc/main/webapp/_/img/small/image6.jpg | 0
Asrc/main/webapp/_/img/small/image7.jpg | 0
Asrc/main/webapp/_/img/small/image8.jpg | 0
Asrc/main/webapp/_/img/small/image9.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb1.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb10.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb2.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb3.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb4.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb5.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb6.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb7.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb8.jpg | 0
Asrc/main/webapp/_/img/thumbs/thumb9.jpg | 0
Dsrc/main/webapp/about.html | 18------------------
Msrc/main/webapp/blog.html | 2+-
Asrc/main/webapp/blogwriter.html | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/main/webapp/following.html | 11+++++++++++
Msrc/main/webapp/help/recovery.html | 1-
Asrc/main/webapp/help/verify/blogger.html | 18++++++++++++++++++
Asrc/main/webapp/help/verify/tumblr.html | 30++++++++++++++++++++++++++++++
Dsrc/main/webapp/img/controls.png | 0
Asrc/main/webapp/img/favicon.ico | 0
Asrc/main/webapp/img/help/blogger_1.jpg | 0
Asrc/main/webapp/img/help/blogger_2.jpg | 0
Asrc/main/webapp/img/help/blogger_3.jpg | 0
Asrc/main/webapp/img/help/tumblr_1.jpg | 0
Asrc/main/webapp/img/help/tumblr_2.jpg | 0
Asrc/main/webapp/img/help/tumblr_3.jpg | 0
Asrc/main/webapp/img/help/tumblr_4.jpg | 0
Asrc/main/webapp/img/help/tumblr_5.jpg | 0
Asrc/main/webapp/img/help/tumblr_6.jpg | 0
Asrc/main/webapp/img/icon/apple-touch-icon-114-precomposed.png | 0
Asrc/main/webapp/img/icon/apple-touch-icon-144-precomposed.png | 0
Asrc/main/webapp/img/icon/apple-touch-icon-16-precomposed.png | 0
Asrc/main/webapp/img/icon/apple-touch-icon-57-precomposed.png | 0
Asrc/main/webapp/img/icon/apple-touch-icon-72-precomposed.png | 0
Asrc/main/webapp/img/media/bigplay.svg | 2++
Msrc/main/webapp/img/spinner.gif | 0
Asrc/main/webapp/img/wp.png | 0
Asrc/main/webapp/img/yt95x40.png | 0
Msrc/main/webapp/index.html | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Msrc/main/webapp/login.html | 13++++++++-----
Asrc/main/webapp/preview.html | 41+++++++++++++++++++++++++++++++++++++++++
Asrc/main/webapp/purpose.html | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/main/webapp/reader.html | 1-
Dsrc/main/webapp/register.html | 4----
Msrc/main/webapp/settings/account.html | 99++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
Dsrc/main/webapp/settings/blog.html | 9---------
Asrc/main/webapp/settings/following.html | 11+++++++++++
Msrc/main/webapp/settings/verify.html | 2+-
Msrc/main/webapp/signup/blog.html | 26+++++++++++++++++---------
Msrc/main/webapp/signup/categories.html | 22++++++++++++----------
Msrc/main/webapp/signup/password.html | 29+++++++++++++++--------------
Msrc/main/webapp/signup/user.html | 27++++++++++++++++++---------
Msrc/main/webapp/signup/verify.html | 15++++-----------
Msrc/main/webapp/signup/writer.html | 27+++++++++++----------------
Msrc/main/webapp/templates-hidden/base-wrap.html | 90+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
Asrc/main/webapp/templates-hidden/default-wide.html | 15+++++++++++++++
Msrc/main/webapp/templates-hidden/default.html | 33+++++++++++++++++++--------------
Msrc/main/webapp/templates-hidden/parts/blog-profile.html | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
Msrc/main/webapp/templates-hidden/parts/categories.html | 27+++++++++++++++------------
Msrc/main/webapp/templates-hidden/parts/footer.html | 3++-
Msrc/main/webapp/templates-hidden/parts/user-profile.html | 103++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
Msrc/main/webapp/templates-hidden/parts/verification.html | 71++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Asrc/main/webapp/templates-hidden/parts/writers-gallery.html | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/main/webapp/templates-hidden/settings-wrap.html | 7++-----
Msrc/main/webapp/user.html | 5++++-
157 files changed, 5489 insertions(+), 2139 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -3,6 +3,13 @@ .cache/ Thumbs.db +#ensime +*ensime* + +#sublime +*.sublime-project +*.sublime-workspace + # backups and nohup *~ *.out diff --git a/project/plugins.sbt b/project/plugins.sbt @@ -1,9 +1,13 @@ +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.2") + +addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.4.0") + addSbtPlugin("org.scala-sbt" % "sbt-closure" % "0.1.3") addSbtPlugin("me.lessis" % "less-sbt" % "0.1.10") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.2") +libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % ("0.12.0-0.2.11.1")) -addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.4.0") +addSbtPlugin("org.ensime" % "ensime-sbt-cmd" % "0.1.0") -libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % ("0.12.0-0.2.11.1")) +addSbtPlugin("com.orrsella" % "sbt-sublime" % "1.0.5") diff --git a/sbt b/sbt @@ -1 +1 @@ -java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/project/sbt-launch.jar "$@" +java -Xms512M -Xmx2048M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512M -jar `dirname $0`/project/sbt-launch.jar "$@" diff --git a/sbt-debug b/sbt-debug @@ -1 +1 @@ -java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar project/sbt-launch.jar "$@" +java -Xms512M -Xmx2048M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar project/sbt-launch.jar "$@" diff --git a/src/main/javascript/customs/other.js b/src/main/javascript/customs/other.js @@ -1,12 +1,48 @@ $(function () { - $('#intro-player').mediaelementplayer({ - pluginPath: '/img/media/', - features: ['progress','fullscreen'] + $(document).ready(function(){ + $('#blog-writers').tinyscrollbar({ axis: 'x' }); + + $(document).on("click","#writer-list label",function() { + $(this).addClass('selected').siblings().removeClass('selected') + }); + + $('#following-search').on("input", function(e) { + var qry = $(this).val().toLowerCase(); + $('#writers-container .writer').each(function() { + var isFound = $(this).find(".name").text().toLowerCase().indexOf(qry) >= 0 || + $(this).find(".categories").text().toLowerCase().indexOf(qry) >= 0; + + if(!isFound) $(this).hide(); else $(this).show(); + }); + }); }); /* <time datetime="2008-01-28T20:24:17Z">January 1, 2008 20:24:17 GMT</time> */ jQuery("time.timeago").timeago(); jQuery.timeago.settings.allowFuture = true; + + $("[rel='popover']").popover(); + + $('.article').keynav(); + + $('#nav-buttons a').click(function (e) { + e.preventDefault(); + $(this).tab('show'); + $(this).removeClass('inactive').siblings().addClass('inactive'); + }); + + + var maxL = 170; + var about = $('#user-about.short-ver'); + if(about.find('textarea:first').length == 0) { + about.each(function (i, div) { + var text = $(div).text(); + if(text.length > maxL) { + var begin = text.substr(0, maxL); + $(div).html(begin).append($('<span/>').html('...')); + } + }); + } }); diff --git a/src/main/javascript/libs/bootstrap-2.2.2.min.js b/src/main/javascript/libs/bootstrap-2.2.2.min.js @@ -1,6 +0,0 @@ -/*! -* Bootstrap.js by @fat & @mdo -* Copyright 2012 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt -*/ -!function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]');$parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger("slid")},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle(),this}}};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data("carousel"),options=$.extend({},$.fn.carousel.defaults,"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.cycle()})},$.fn.carousel.defaults={interval:5e3,pause:"hover"},$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this},$(document).on("click.carousel.data-api","[data-slide]",function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),options=$.extend({},$target.data(),$this.data());$target.carousel(options),e.preventDefault()})}(window.jQuery),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},show:function(){var dimension,scroll,actives,hasData;if(!this.transitioning){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),hasData&&hasData.transitioning)return;actives.collapse("hide"),hasData||actives.data("collapse",null)}this.$element[dimension](0),this.transition("addClass",$.Event("show"),"shown"),$.support.transition&&this.$element[dimension](this.$element[0][scroll])}},hide:function(){var dimension;this.transitioning||(dimension=this.dimension(),this.reset(this.$element[dimension]()),this.transition("removeClass",$.Event("hide"),"hidden"),this.$element[dimension](0))},reset:function(size){var dimension=this.dimension();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(this.transitioning=1,this.$element[method]("in"),$.support.transition&&this.$element.hasClass("collapse")?this.$element.one($.support.transition.end,complete):complete())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options="object"==typeof option&&option;data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)})}(window.jQuery),!function($){"use strict";function clearMenus(){$(toggle).each(function(){getParent($(this)).removeClass("open")})}function getParent($this){var $parent,selector=$this.attr("data-target");return selector||(selector=$this.attr("href"),selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),$parent.length||($parent=$this.parent()),$parent}var toggle="[data-toggle=dropdown]",Dropdown=function(element){var $el=$(element).on("click.dropdown.data-api",this.toggle);$("html").on("click.dropdown.data-api",function(){$el.parent().removeClass("open")})};Dropdown.prototype={constructor:Dropdown,toggle:function(){var $parent,isActive,$this=$(this);if(!$this.is(".disabled, :disabled"))return $parent=getParent($this),isActive=$parent.hasClass("open"),clearMenus(),isActive||$parent.toggleClass("open"),$this.focus(),!1},keydown:function(e){var $this,$items,$parent,isActive,index;if(/(38|40|27)/.test(e.keyCode)&&($this=$(this),e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled"))){if($parent=getParent($this),isActive=$parent.hasClass("open"),!isActive||isActive&&27==e.keyCode)return $this.click();$items=$("[role=menu] li:not(.divider):visible a",$parent),$items.length&&(index=$items.index($items.filter(":focus")),38==e.keyCode&&index>0&&index--,40==e.keyCode&&$items.length-1>index&&index++,~index||(index=0),$items.eq(index).focus())}}};var old=$.fn.dropdown;$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");data||$this.data("dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on("click.dropdown.data-api touchstart.dropdown.data-api",clearMenus).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",toggle+", [role=menu]",Dropdown.prototype.keydown)}(window.jQuery),!function($){"use strict";var Modal=function(element,options){this.options=options,this.$element=$(element).delegate('[data-dismiss="modal"]',"click.dismiss.modal",$.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};Modal.prototype={constructor:Modal,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1),that.enforceFocus(),transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger("shown")}):that.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end),that.hideModal()},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout),that.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one($.support.transition.end,$.proxy(this.removeBackdrop,this)):this.removeBackdrop()):callback&&callback()}};var old=$.fn.modal;$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data("modal"),options=$.extend({},$.fn.modal.defaults,$this.data(),"object"==typeof option&&option);data||$this.data("modal",data=new Modal(this,options)),"string"==typeof option?data[option]():options.show&&data.show()})},$.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());e.preventDefault(),$target.modal(option).one("hide",function(){$this.focus()})})}(window.jQuery),!function($){"use strict";var Tooltip=function(element,options){this.init("tooltip",element,options)};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut;this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(eventIn="hover"==this.options.trigger?"mouseenter":"focus",eventOut="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))),this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(options){return options=$.extend({},$.fn[this.type].defaults,options,this.$element.data()),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return self.options.delay&&self.options.delay.show?(clearTimeout(this.timeout),self.hoverState="in",this.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show),void 0):self.show()},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),self.options.delay&&self.options.delay.hide?(self.hoverState="out",this.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide),void 0):self.hide()},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp;if(this.hasContent()&&this.enabled){switch($tip=this.tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,inside=/in/.test(placement),$tip.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),pos=this.getPosition(inside),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,inside?placement.split(" ")[1]:placement){case"bottom":tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};break;case"top":tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};break;case"left":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};break;case"right":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}$tip.offset(tp).addClass(placement).addClass("in")}},setContent:function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},hide:function(){function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout),$tip.detach()})}var $tip=this.tip();return $tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?removeWithAnimation():$tip.detach(),this},fixTitle:function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},inside?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},tip:function(){return this.$tip=this.$tip||$(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);self[self.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options="object"==typeof option&&option;data||$this.data("tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(window.jQuery),!function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content")[this.options.html?"html":"text"](content),$tip.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var content,$e=this.$element,o=this.options;return content=$e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},tip:function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options="object"==typeof option&&option;data||$this.data("popover",data=new Popover(this,options)),"string"==typeof option&&data[option]()})},$.fn.popover.Constructor=Popover,$.fn.popover.defaults=$.extend({},$.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'}),$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(window.jQuery),!function($){"use strict";function ScrollSpy(element,options){var href,process=$.proxy(this.process,this),$element=$(element).is("body")?$(window):$(element);this.options=$.extend({},$.fn.scrollspy.defaults,options),this.$scrollElement=$element.on("scroll.scroll-spy.data-api",process),this.selector=(this.options.target||(href=$(element).attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=$("body"),this.refresh(),this.process()}ScrollSpy.prototype={constructor:ScrollSpy,refresh:function(){var $targets,self=this;this.offsets=$([]),this.targets=$([]),$targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data("target")||$el.attr("href"),$href=/^#\w/.test(href)&&$(href);return $href&&$href.length&&[[$href.position().top+self.$scrollElement.scrollTop(),href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]),self.targets.push(this[1])})},process:function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;if(scrollTop>=maxScroll)return activeTarget!=(i=targets.last()[0])&&this.activate(i);for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||offsets[i+1]>=scrollTop)&&this.activate(targets[i])},activate:function(target){var active,selector;this.activeTarget=target,$(this.selector).parent(".active").removeClass("active"),selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]',active=$(selector).parent("li").addClass("active"),active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate")}};var old=$.fn.scrollspy;$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data("scrollspy"),options="object"==typeof option&&option;data||$this.data("scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})},$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.defaults={offset:10},$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on("load",function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this);$spy.scrollspy($spy.data())})})}(window.jQuery),!function($){"use strict";var Tab=function(element){this.element=$(element)};Tab.prototype={constructor:Tab,show:function(){var previous,$target,e,$this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$this.parent("li").hasClass("active")||(previous=$ul.find(".active:last a")[0],e=$.Event("show",{relatedTarget:previous}),$this.trigger(e),e.isDefaultPrevented()||($target=$(selector),this.activate($this.parent("li"),$ul),this.activate($target,$target.parent(),function(){$this.trigger({type:"shown",relatedTarget:previous})})))},activate:function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),element.addClass("active"),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu")&&element.closest("li.dropdown").addClass("active"),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&$active.hasClass("fade");transition?$active.one($.support.transition.end,next):next(),$active.removeClass("in")}};var old=$.fn.tab;$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data("tab");data||$this.data("tab",data=new Tab(this)),"string"==typeof option&&data[option]()})},$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this},$(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),$(this).tab("show")})}(window.jQuery),!function($){"use strict";var Typeahead=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.typeahead.defaults,options),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=$(this.options.menu),this.shown=!1,this.listen()};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(val)).change(),this.hide()},updater:function(item){return item},show:function(){var pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:pos.top+pos.height,left:pos.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var items;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,items?this.process(items):this)},process:function(items){var that=this;return items=$.grep(items,function(item){return that.matcher(item)}),items=this.sorter(items),items.length?this.render(items.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(item){return~item.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){for(var item,beginswith=[],caseSensitive=[],caseInsensitive=[];item=items.shift();)item.toLowerCase().indexOf(this.query.toLowerCase())?~item.indexOf(this.query)?caseSensitive.push(item):caseInsensitive.push(item):beginswith.push(item);return beginswith.concat(caseSensitive,caseInsensitive)},highlighter:function(item){var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return item.replace(RegExp("("+query+")","ig"),function($1,match){return"<strong>"+match+"</strong>"})},render:function(items){var that=this;return items=$(items).map(function(i,item){return i=$(that.options.item).attr("data-value",item),i.find("a").html(that.highlighter(item)),i[0]}),items.first().addClass("active"),this.$menu.html(items),this},next:function(){var active=this.$menu.find(".active").removeClass("active"),next=active.next();next.length||(next=$(this.$menu.find("li")[0])),next.addClass("active")},prev:function(){var active=this.$menu.find(".active").removeClass("active"),prev=active.prev();prev.length||(prev=this.$menu.find("li").last()),prev.addClass("active")},listen:function(){this.$element.on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("keyup",$.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",$.proxy(this.keydown,this)),this.$menu.on("click",$.proxy(this.click,this)).on("mouseenter","li",$.proxy(this.mouseenter,this))},eventSupported:function(eventName){var isSupported=eventName in this.$element;return isSupported||(this.$element.setAttribute(eventName,"return;"),isSupported="function"==typeof this.$element[eventName]),isSupported},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(){var that=this;setTimeout(function(){that.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),$(e.currentTarget).addClass("active")}};var old=$.fn.typeahead;$.fn.typeahead=function(option){return this.each(function(){var $this=$(this),data=$this.data("typeahead"),options="object"==typeof option&&option;data||$this.data("typeahead",data=new Typeahead(this,options)),"string"==typeof option&&data[option]()})},$.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},$.fn.typeahead.Constructor=Typeahead,$.fn.typeahead.noConflict=function(){return $.fn.typeahead=old,this},$(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var $this=$(this);$this.data("typeahead")||(e.preventDefault(),$this.typeahead($this.data()))})}(window.jQuery),!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options),this.$window=$(window).on("scroll.affix.data-api",$.proxy(this.checkPosition,this)).on("click.affix.data-api",$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this)),this.$element=$(element),this.checkPosition()};Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var affix,scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetBottom=offset.bottom,offsetTop=offset.top,reset="affix affix-top affix-bottom";"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top()),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom()),affix=null!=this.unpin&&scrollTop+this.unpin<=position.top?!1:null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":null!=offsetTop&&offsetTop>=scrollTop?"top":!1,this.affixed!==affix&&(this.affixed=affix,this.unpin="bottom"==affix?position.top-scrollTop:null,this.$element.removeClass(reset).addClass("affix"+(affix?"-"+affix:"")))}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data("affix"),options="object"==typeof option&&option;data||$this.data("affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.defaults={offset:0},$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},data.offsetBottom&&(data.offset.bottom=data.offsetBottom),data.offsetTop&&(data.offset.top=data.offsetTop),$spy.affix(data)})})}(window.jQuery); -\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-affix.js b/src/main/javascript/libs/bootstrap/bootstrap-affix.js @@ -0,0 +1,117 @@ +/* ========================================================== + * bootstrap-affix.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#affix + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* AFFIX CLASS DEFINITION + * ====================== */ + + var Affix = function (element, options) { + this.options = $.extend({}, $.fn.affix.defaults, options) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) + this.$element = $(element) + this.checkPosition() + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + , scrollTop = this.$window.scrollTop() + , position = this.$element.offset() + , offset = this.options.offset + , offsetBottom = offset.bottom + , offsetTop = offset.top + , reset = 'affix affix-top affix-bottom' + , affix + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top() + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() + + affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? + false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? + 'bottom' : offsetTop != null && scrollTop <= offsetTop ? + 'top' : false + + if (this.affixed === affix) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? position.top - scrollTop : null + + this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) + } + + + /* AFFIX PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.affix + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('affix') + , options = typeof option == 'object' && option + if (!data) $this.data('affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + $.fn.affix.defaults = { + offset: 0 + } + + + /* AFFIX NO CONFLICT + * ================= */ + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + /* AFFIX DATA-API + * ============== */ + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + , data = $spy.data() + + data.offset = data.offset || {} + + data.offsetBottom && (data.offset.bottom = data.offsetBottom) + data.offsetTop && (data.offset.top = data.offsetTop) + + $spy.affix(data) + }) + }) + + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-alert.js b/src/main/javascript/libs/bootstrap/bootstrap-alert.js @@ -0,0 +1,99 @@ +/* ========================================================== + * bootstrap-alert.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-button.js b/src/main/javascript/libs/bootstrap/bootstrap-button.js @@ -0,0 +1,105 @@ +/* ============================================================ + * bootstrap-button.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-carousel.js b/src/main/javascript/libs/bootstrap/bootstrap-carousel.js @@ -0,0 +1,207 @@ +/* ========================================================== + * bootstrap-carousel.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-collapse.js b/src/main/javascript/libs/bootstrap/bootstrap-collapse.js @@ -0,0 +1,167 @@ +/* ============================================================= + * bootstrap-collapse.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-dropdown.js b/src/main/javascript/libs/bootstrap/bootstrap-dropdown.js @@ -0,0 +1,169 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement) { + // if mobile we we use a backdrop because click events don't delegate + $('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus) + } + $parent.toggleClass('open') + } + + $this.focus() + + return false + } + + , keydown: function (e) { + var $this + , $items + , $active + , $parent + , isActive + , index + + if (!/(38|40|27)/.test(e.keyCode)) return + + $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) { + if (e.which == 27) $parent.find(toggle).focus() + return $this.click() + } + + $items = $('[role=menu] li:not(.divider):visible a', $parent) + + if (!$items.length) return + + index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items + .eq(index) + .focus() + } + + } + + function clearMenus() { + $('.dropdown-backdrop').remove() + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() + + return $parent + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* DROPDOWN NO CONFLICT + * ==================== */ + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(document) + .on('click.dropdown.data-api', clearMenus) + .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + +}(window.jQuery); diff --git a/src/main/javascript/libs/bootstrap/bootstrap-modal.js b/src/main/javascript/libs/bootstrap/bootstrap-modal.js @@ -0,0 +1,247 @@ +/* ========================================================= + * bootstrap-modal.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.escape() + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element.show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + + that.enforceFocus() + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal() + } + + , enforceFocus: function () { + var that = this + $(document).on('focusin.modal', function (e) { + if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { + that.$element.focus() + } + }) + } + + , escape: function () { + var that = this + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.modal', function ( e ) { + e.which == 27 && that.hide() + }) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.modal') + } + } + + , hideWithTransition: function () { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + that.hideModal() + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + that.hideModal() + }) + } + + , hideModal: function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden') + }) + } + + , removeBackdrop: function () { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } + + , backdrop: function (callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') + .appendTo(document.body) + + this.$backdrop.click( + this.options.backdrop == 'static' ? + $.proxy(this.$element[0].focus, this.$element[0]) + : $.proxy(this.hide, this) + ) + + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow + + this.$backdrop.addClass('in') + + if (!callback) return + + doAnimate ? + this.$backdrop.one($.support.transition.end, callback) : + callback() + + } else if (!this.isShown && this.$backdrop) { + this.$backdrop.removeClass('in') + + $.support.transition && this.$element.hasClass('fade')? + this.$backdrop.one($.support.transition.end, callback) : + callback() + + } else if (callback) { + callback() + } + } + } + + + /* MODAL PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.modal + + $.fn.modal = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('modal') + , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option]() + else if (options.show) data.show() + }) + } + + $.fn.modal.defaults = { + backdrop: true + , keyboard: true + , show: true + } + + $.fn.modal.Constructor = Modal + + + /* MODAL NO CONFLICT + * ================= */ + + $.fn.modal.noConflict = function () { + $.fn.modal = old + return this + } + + + /* MODAL DATA-API + * ============== */ + + $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) { + var $this = $(this) + , href = $this.attr('href') + , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 + , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data()) + + e.preventDefault() + + $target + .modal(option) + .one('hide', function () { + $this.focus() + }) + }) + +}(window.jQuery); diff --git a/src/main/javascript/libs/bootstrap/bootstrap-popover.js b/src/main/javascript/libs/bootstrap/bootstrap-popover.js @@ -0,0 +1,114 @@ +/* =========================================================== + * bootstrap-popover.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#popovers + * =========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * =========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* POPOVER PUBLIC CLASS DEFINITION + * =============================== */ + + var Popover = function (element, options) { + this.init('popover', element, options) + } + + + /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js + ========================================== */ + + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { + + constructor: Popover + + , setContent: function () { + var $tip = this.tip() + , title = this.getTitle() + , content = this.getContent() + + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) + $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) + + $tip.removeClass('fade top bottom left right in') + } + + , hasContent: function () { + return this.getTitle() || this.getContent() + } + + , getContent: function () { + var content + , $e = this.$element + , o = this.options + + content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) + || $e.attr('data-content') + + return content + } + + , tip: function () { + if (!this.$tip) { + this.$tip = $(this.options.template) + } + return this.$tip + } + + , destroy: function () { + this.hide().$element.off('.' + this.type).removeData(this.type) + } + + }) + + + /* POPOVER PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.popover + + $.fn.popover = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('popover') + , options = typeof option == 'object' && option + if (!data) $this.data('popover', (data = new Popover(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.popover.Constructor = Popover + + $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { + placement: 'right' + , trigger: 'click' + , content: '' + , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' + }) + + + /* POPOVER NO CONFLICT + * =================== */ + + $.fn.popover.noConflict = function () { + $.fn.popover = old + return this + } + +}(window.jQuery); diff --git a/src/main/javascript/libs/bootstrap/bootstrap-scrollspy.js b/src/main/javascript/libs/bootstrap/bootstrap-scrollspy.js @@ -0,0 +1,162 @@ +/* ============================================================= + * bootstrap-scrollspy.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#scrollspy + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* SCROLLSPY CLASS DEFINITION + * ========================== */ + + function ScrollSpy(element, options) { + var process = $.proxy(this.process, this) + , $element = $(element).is('body') ? $(window) : $(element) + , href + this.options = $.extend({}, $.fn.scrollspy.defaults, options) + this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process) + this.selector = (this.options.target + || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + || '') + ' .nav li > a' + this.$body = $('body') + this.refresh() + this.process() + } + + ScrollSpy.prototype = { + + constructor: ScrollSpy + + , refresh: function () { + var self = this + , $targets + + this.offsets = $([]) + this.targets = $([]) + + $targets = this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + , href = $el.data('target') || $el.attr('href') + , $href = /^#\w/.test(href) && $(href) + return ( $href + && $href.length + && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + self.offsets.push(this[0]) + self.targets.push(this[1]) + }) + } + + , process: function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight + , maxScroll = scrollHeight - this.$scrollElement.height() + , offsets = this.offsets + , targets = this.targets + , activeTarget = this.activeTarget + , i + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets.last()[0]) + && this.activate ( i ) + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) + && this.activate( targets[i] ) + } + } + + , activate: function (target) { + var active + , selector + + this.activeTarget = target + + $(this.selector) + .parent('.active') + .removeClass('active') + + selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + active = $(selector) + .parent('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active.closest('li.dropdown').addClass('active') + } + + active.trigger('activate') + } + + } + + + /* SCROLLSPY PLUGIN DEFINITION + * =========================== */ + + var old = $.fn.scrollspy + + $.fn.scrollspy = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('scrollspy') + , options = typeof option == 'object' && option + if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.scrollspy.Constructor = ScrollSpy + + $.fn.scrollspy.defaults = { + offset: 10 + } + + + /* SCROLLSPY NO CONFLICT + * ===================== */ + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + /* SCROLLSPY DATA-API + * ================== */ + + $(window).on('load', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + $spy.scrollspy($spy.data()) + }) + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-tab.js b/src/main/javascript/libs/bootstrap/bootstrap-tab.js @@ -0,0 +1,144 @@ +/* ======================================================== + * bootstrap-tab.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#tabs + * ======================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TAB CLASS DEFINITION + * ==================== */ + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype = { + + constructor: Tab + + , show: function () { + var $this = this.element + , $ul = $this.closest('ul:not(.dropdown-menu)') + , selector = $this.attr('data-target') + , previous + , $target + , e + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ( $this.parent('li').hasClass('active') ) return + + previous = $ul.find('.active:last a')[0] + + e = $.Event('show', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown' + , relatedTarget: previous + }) + }) + } + + , activate: function ( element, container, callback) { + var $active = container.find('> .active') + , transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if ( element.parent('.dropdown-menu') ) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active.one($.support.transition.end, next) : + next() + + $active.removeClass('in') + } + } + + + /* TAB PLUGIN DEFINITION + * ===================== */ + + var old = $.fn.tab + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tab') + if (!data) $this.data('tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + /* TAB NO CONFLICT + * =============== */ + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + /* TAB DATA-API + * ============ */ + + $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-tooltip.js b/src/main/javascript/libs/bootstrap/bootstrap-tooltip.js @@ -0,0 +1,361 @@ +/* =========================================================== + * bootstrap-tooltip.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#tooltips + * Inspired by the original jQuery.tipsy by Jason Frame + * =========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TOOLTIP PUBLIC CLASS DEFINITION + * =============================== */ + + var Tooltip = function (element, options) { + this.init('tooltip', element, options) + } + + Tooltip.prototype = { + + constructor: Tooltip + + , init: function (type, element, options) { + var eventIn + , eventOut + , triggers + , trigger + , i + + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + this.enabled = true + + triggers = this.options.trigger.split(' ') + + for (i = triggers.length; i--;) { + trigger = triggers[i] + if (trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (trigger != 'manual') { + eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' + eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + , getOptions: function (options) { + options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay + , hide: options.delay + } + } + + return options + } + + , enter: function (e) { + var defaults = $.fn[this.type].defaults + , options = {} + , self + + this._options && $.each(this._options, function (key, value) { + if (defaults[key] != value) options[key] = value + }, this) + + self = $(e.currentTarget)[this.type](options).data(this.type) + + if (!self.options.delay || !self.options.delay.show) return self.show() + + clearTimeout(this.timeout) + self.hoverState = 'in' + this.timeout = setTimeout(function() { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + , leave: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + + if (this.timeout) clearTimeout(this.timeout) + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.hoverState = 'out' + this.timeout = setTimeout(function() { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + , show: function () { + var $tip + , pos + , actualWidth + , actualHeight + , placement + , tp + , e = $.Event('show') + + if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $tip = this.tip() + this.setContent() + + if (this.options.animation) { + $tip.addClass('fade') + } + + placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + pos = this.getPosition() + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + switch (placement) { + case 'bottom': + tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'top': + tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'left': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} + break + case 'right': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} + break + } + + this.applyPlacement(tp, placement) + this.$element.trigger('shown') + } + } + + , applyPlacement: function(offset, placement){ + var $tip = this.tip() + , width = $tip[0].offsetWidth + , height = $tip[0].offsetHeight + , actualWidth + , actualHeight + , delta + , replace + + $tip + .offset(offset) + .addClass(placement) + .addClass('in') + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + offset.top = offset.top + height - actualHeight + replace = true + } + + if (placement == 'bottom' || placement == 'top') { + delta = 0 + + if (offset.left < 0){ + delta = offset.left * -2 + offset.left = 0 + $tip.offset(offset) + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top') + } + + if (replace) $tip.offset(offset) + } + + , replaceArrow: function(delta, dimension, position){ + this + .arrow() + .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') + } + + , setContent: function () { + var $tip = this.tip() + , title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + , hide: function () { + var that = this + , $tip = this.tip() + , e = $.Event('hide') + + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + + $tip.removeClass('in') + + function removeWithAnimation() { + var timeout = setTimeout(function () { + $tip.off($.support.transition.end).detach() + }, 500) + + $tip.one($.support.transition.end, function () { + clearTimeout(timeout) + $tip.detach() + }) + } + + $.support.transition && this.$tip.hasClass('fade') ? + removeWithAnimation() : + $tip.detach() + + this.$element.trigger('hidden') + + return this + } + + , fixTitle: function () { + var $e = this.$element + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') + } + } + + , hasContent: function () { + return this.getTitle() + } + + , getPosition: function () { + var el = this.$element[0] + return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) + } + + , getTitle: function () { + var title + , $e = this.$element + , o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + , tip: function () { + return this.$tip = this.$tip || $(this.options.template) + } + + , arrow: function(){ + return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") + } + + , validate: function () { + if (!this.$element[0].parentNode) { + this.hide() + this.$element = null + this.options = null + } + } + + , enable: function () { + this.enabled = true + } + + , disable: function () { + this.enabled = false + } + + , toggleEnabled: function () { + this.enabled = !this.enabled + } + + , toggle: function (e) { + var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this + self.tip().hasClass('in') ? self.hide() : self.show() + } + + , destroy: function () { + this.hide().$element.off('.' + this.type).removeData(this.type) + } + + } + + + /* TOOLTIP PLUGIN DEFINITION + * ========================= */ + + var old = $.fn.tooltip + + $.fn.tooltip = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tooltip') + , options = typeof option == 'object' && option + if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tooltip.Constructor = Tooltip + + $.fn.tooltip.defaults = { + animation: true + , placement: 'top' + , selector: false + , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' + , trigger: 'hover focus' + , title: '' + , delay: 0 + , html: false + , container: false + } + + + /* TOOLTIP NO CONFLICT + * =================== */ + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(window.jQuery); diff --git a/src/main/javascript/libs/bootstrap/bootstrap-transition.js b/src/main/javascript/libs/bootstrap/bootstrap-transition.js @@ -0,0 +1,60 @@ +/* =================================================== + * bootstrap-transition.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/bootstrap/bootstrap-typeahead.js b/src/main/javascript/libs/bootstrap/bootstrap-typeahead.js @@ -0,0 +1,335 @@ +/* ============================================================= + * bootstrap-typeahead.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#typeahead + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function($){ + + "use strict"; // jshint ;_; + + + /* TYPEAHEAD PUBLIC CLASS DEFINITION + * ================================= */ + + var Typeahead = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.typeahead.defaults, options) + this.matcher = this.options.matcher || this.matcher + this.sorter = this.options.sorter || this.sorter + this.highlighter = this.options.highlighter || this.highlighter + this.updater = this.options.updater || this.updater + this.source = this.options.source + this.$menu = $(this.options.menu) + this.shown = false + this.listen() + } + + Typeahead.prototype = { + + constructor: Typeahead + + , select: function () { + var val = this.$menu.find('.active').attr('data-value') + this.$element + .val(this.updater(val)) + .change() + return this.hide() + } + + , updater: function (item) { + return item + } + + , show: function () { + var pos = $.extend({}, this.$element.position(), { + height: this.$element[0].offsetHeight + }) + + this.$menu + .insertAfter(this.$element) + .css({ + top: pos.top + pos.height + , left: pos.left + }) + .show() + + this.shown = true + return this + } + + , hide: function () { + this.$menu.hide() + this.shown = false + return this + } + + , lookup: function (event) { + var items + + this.query = this.$element.val() + + if (!this.query || this.query.length < this.options.minLength) { + return this.shown ? this.hide() : this + } + + items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source + + return items ? this.process(items) : this + } + + , process: function (items) { + var that = this + + items = $.grep(items, function (item) { + return that.matcher(item) + }) + + items = this.sorter(items) + + if (!items.length) { + return this.shown ? this.hide() : this + } + + return this.render(items.slice(0, this.options.items)).show() + } + + , matcher: function (item) { + return ~item.toLowerCase().indexOf(this.query.toLowerCase()) + } + + , sorter: function (items) { + var beginswith = [] + , caseSensitive = [] + , caseInsensitive = [] + , item + + while (item = items.shift()) { + if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) + else if (~item.indexOf(this.query)) caseSensitive.push(item) + else caseInsensitive.push(item) + } + + return beginswith.concat(caseSensitive, caseInsensitive) + } + + , highlighter: function (item) { + var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&') + return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) { + return '<strong>' + match + '</strong>' + }) + } + + , render: function (items) { + var that = this + + items = $(items).map(function (i, item) { + i = $(that.options.item).attr('data-value', item) + i.find('a').html(that.highlighter(item)) + return i[0] + }) + + items.first().addClass('active') + this.$menu.html(items) + return this + } + + , next: function (event) { + var active = this.$menu.find('.active').removeClass('active') + , next = active.next() + + if (!next.length) { + next = $(this.$menu.find('li')[0]) + } + + next.addClass('active') + } + + , prev: function (event) { + var active = this.$menu.find('.active').removeClass('active') + , prev = active.prev() + + if (!prev.length) { + prev = this.$menu.find('li').last() + } + + prev.addClass('active') + } + + , listen: function () { + this.$element + .on('focus', $.proxy(this.focus, this)) + .on('blur', $.proxy(this.blur, this)) + .on('keypress', $.proxy(this.keypress, this)) + .on('keyup', $.proxy(this.keyup, this)) + + if (this.eventSupported('keydown')) { + this.$element.on('keydown', $.proxy(this.keydown, this)) + } + + this.$menu + .on('click', $.proxy(this.click, this)) + .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) + .on('mouseleave', 'li', $.proxy(this.mouseleave, this)) + } + + , eventSupported: function(eventName) { + var isSupported = eventName in this.$element + if (!isSupported) { + this.$element.setAttribute(eventName, 'return;') + isSupported = typeof this.$element[eventName] === 'function' + } + return isSupported + } + + , move: function (e) { + if (!this.shown) return + + switch(e.keyCode) { + case 9: // tab + case 13: // enter + case 27: // escape + e.preventDefault() + break + + case 38: // up arrow + e.preventDefault() + this.prev() + break + + case 40: // down arrow + e.preventDefault() + this.next() + break + } + + e.stopPropagation() + } + + , keydown: function (e) { + this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]) + this.move(e) + } + + , keypress: function (e) { + if (this.suppressKeyPressRepeat) return + this.move(e) + } + + , keyup: function (e) { + switch(e.keyCode) { + case 40: // down arrow + case 38: // up arrow + case 16: // shift + case 17: // ctrl + case 18: // alt + break + + case 9: // tab + case 13: // enter + if (!this.shown) return + this.select() + break + + case 27: // escape + if (!this.shown) return + this.hide() + break + + default: + this.lookup() + } + + e.stopPropagation() + e.preventDefault() + } + + , focus: function (e) { + this.focused = true + } + + , blur: function (e) { + this.focused = false + if (!this.mousedover && this.shown) this.hide() + } + + , click: function (e) { + e.stopPropagation() + e.preventDefault() + this.select() + this.$element.focus() + } + + , mouseenter: function (e) { + this.mousedover = true + this.$menu.find('.active').removeClass('active') + $(e.currentTarget).addClass('active') + } + + , mouseleave: function (e) { + this.mousedover = false + if (!this.focused && this.shown) this.hide() + } + + } + + + /* TYPEAHEAD PLUGIN DEFINITION + * =========================== */ + + var old = $.fn.typeahead + + $.fn.typeahead = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('typeahead') + , options = typeof option == 'object' && option + if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.typeahead.defaults = { + source: [] + , items: 8 + , menu: '<ul class="typeahead dropdown-menu"></ul>' + , item: '<li><a href="#"></a></li>' + , minLength: 1 + } + + $.fn.typeahead.Constructor = Typeahead + + + /* TYPEAHEAD NO CONFLICT + * =================== */ + + $.fn.typeahead.noConflict = function () { + $.fn.typeahead = old + return this + } + + + /* TYPEAHEAD DATA-API + * ================== */ + + $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { + var $this = $(this) + if ($this.data('typeahead')) return + $this.typeahead($this.data()) + }) + +}(window.jQuery); diff --git a/src/main/javascript/libs/bootstrap/bootstrap.min.js b/src/main/javascript/libs/bootstrap/bootstrap.min.js @@ -0,0 +1,6 @@ +/** +* Bootstrap.js v2.3.2 by @fat & @mdo +* Copyright 2012 Twitter, Inc. +* http://www.apache.org/licenses/LICENSE-2.0.txt +*/ +!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); +\ No newline at end of file diff --git a/src/main/javascript/libs/jquery-1.8.3.min.js b/src/main/javascript/libs/jquery-1.8.3.min.js @@ -1,2 +0,0 @@ -/*! jQuery v1.8.3 jquery.com | jquery.org/license */ -(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); -\ No newline at end of file diff --git a/src/main/javascript/libs/jquery-1.9.1.min.js b/src/main/javascript/libs/jquery-1.9.1.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; +return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) +}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window); +\ No newline at end of file diff --git a/src/main/javascript/libs/jquery.keynav.js b/src/main/javascript/libs/jquery.keynav.js @@ -0,0 +1,55 @@ +$.fn.keynav = (function () { + //a couple of global things for the plugin + var nodes = $(), positions = [], recalculate_positions, params; + params = { + keynext: 40, + keyprev: 38 + }; + //we're watching keypresses globally as well. + $(document).keydown(function(e) { + var st, prev, next, desired, i; + if (!nodes.length) {return true;} + if (e.target && e.target.tagName == 'TEXTAREA' || e.target.tagName == 'INPUT') { + return true; + } + if(e.keyCode == params.keynext || e.keyCode == params.keyprev) { + st = $(window).scrollTop(); + //we're checking if our positions are still correct. it may not be necessary all the time, but just to be safe + if(positions[positions.length-1].top !== $(positions[positions.length-1].obj).offset().top) { + recalculate_positions(); + } + + if(e.keyCode === params.keynext) { + for(i = positions.length-1; i > -1; i--) { + if(positions[i].top > st + 1) {desired = i;} + } + } else if(e.keyCode === params.keyprev) { + for(i = 0; i < positions.length; i++) { + if(positions[i].top < st - 1) {desired = i;} + } + } + + if(positions[desired]) { + $('html,body').scrollTop(positions[desired].top); + } else { + $('html,body').scrollTop(e.keyCode === params.keynext ? ($('body').height() - $(window).height()) : 0); + } + } + }); + + recalculate_positions = function () { + //this recalculates the positions of nodes + positions = []; + nodes.each(function() { + positions.push({top: Math.floor($(this).offset().top - 80),obj: this}); + }); + }; + + return function(newparams) { + //all we do in the actual plugin is we take the parameters and add the new nodes where we want to navigate. + params = $.extend(params,newparams || {}); + nodes = nodes.add(this); + recalculate_positions(); + }; + +})(); +\ No newline at end of file diff --git a/src/main/javascript/libs/jquery.tinyscrollbar.js b/src/main/javascript/libs/jquery.tinyscrollbar.js @@ -0,0 +1,203 @@ +( function( $ ) +{ + $.tiny = $.tiny || { }; + + $.tiny.scrollbar = { + options: { + axis : 'y' // vertical or horizontal scrollbar? ( x || y ). + , wheel : 40 // how many pixels must the mouswheel scroll at a time. + , scroll : true // enable or disable the mousewheel. + , lockscroll : true // return scrollwheel to browser if there is no more content. + , size : 'auto' // set the size of the scrollbar to auto or a fixed number. + , sizethumb : 'auto' // set the size of the thumb to auto or a fixed number. + , invertscroll : false // Enable mobile invert style scrolling + } + }; + + $.fn.tinyscrollbar = function( params ) + { + var options = $.extend( {}, $.tiny.scrollbar.options, params ); + + this.each( function() + { + $( this ).data('tsb', new Scrollbar( $( this ), options ) ); + }); + + return this; + }; + + $.fn.tinyscrollbar_update = function(sScroll) + { + return $( this ).data( 'tsb' ).update( sScroll ); + }; + + function Scrollbar( root, options ) + { + var oSelf = this + , oWrapper = root + , oViewport = { obj: $( '.viewport', root ) } + , oContent = { obj: $( '.overview', root ) } + , oScrollbar = { obj: $( '.scrollbar', root ) } + , oTrack = { obj: $( '.track', oScrollbar.obj ) } + , oThumb = { obj: $( '.thumb', oScrollbar.obj ) } + , sAxis = options.axis === 'x' + , sDirection = sAxis ? 'left' : 'top' + , sSize = sAxis ? 'Width' : 'Height' + , iScroll = 0 + , iPosition = { start: 0, now: 0 } + , iMouse = {} + , touchEvents = 'ontouchstart' in document.documentElement + ; + + function initialize() + { + oSelf.update(); + setEvents(); + + return oSelf; + } + + this.update = function( sScroll ) + { + oViewport[ options.axis ] = oViewport.obj[0][ 'offset'+ sSize ]; + oContent[ options.axis ] = oContent.obj[0][ 'scroll'+ sSize ]; + oContent.ratio = oViewport[ options.axis ] / oContent[ options.axis ]; + + oScrollbar.obj.toggleClass( 'disable', oContent.ratio >= 1 ); + + oTrack[ options.axis ] = options.size === 'auto' ? oViewport[ options.axis ] : options.size; + oThumb[ options.axis ] = Math.min( oTrack[ options.axis ], Math.max( 0, ( options.sizethumb === 'auto' ? ( oTrack[ options.axis ] * oContent.ratio ) : options.sizethumb ) ) ); + + oScrollbar.ratio = options.sizethumb === 'auto' ? ( oContent[ options.axis ] / oTrack[ options.axis ] ) : ( oContent[ options.axis ] - oViewport[ options.axis ] ) / ( oTrack[ options.axis ] - oThumb[ options.axis ] ); + + iScroll = ( sScroll === 'relative' && oContent.ratio <= 1 ) ? Math.min( ( oContent[ options.axis ] - oViewport[ options.axis ] ), Math.max( 0, iScroll )) : 0; + iScroll = ( sScroll === 'bottom' && oContent.ratio <= 1 ) ? ( oContent[ options.axis ] - oViewport[ options.axis ] ) : isNaN( parseInt( sScroll, 10 ) ) ? iScroll : parseInt( sScroll, 10 ); + + setSize(); + }; + + function setSize() + { + var sCssSize = sSize.toLowerCase(); + + oThumb.obj.css( sDirection, iScroll / oScrollbar.ratio ); + oContent.obj.css( sDirection, -iScroll ); + iMouse.start = oThumb.obj.offset()[ sDirection ]; + + oScrollbar.obj.css( sCssSize, oTrack[ options.axis ] ); + oTrack.obj.css( sCssSize, oTrack[ options.axis ] ); + oThumb.obj.css( sCssSize, oThumb[ options.axis ] ); + } + + function setEvents() + { + if( ! touchEvents ) + { + oThumb.obj.bind( 'mousedown', start ); + oTrack.obj.bind( 'mouseup', drag ); + } + else + { + oViewport.obj[0].ontouchstart = function( event ) + { + if( 1 === event.touches.length ) + { + start( event.touches[ 0 ] ); + event.stopPropagation(); + } + }; + } + + if( options.scroll && window.addEventListener ) + { + oWrapper[0].addEventListener( 'DOMMouseScroll', wheel, false ); + oWrapper[0].addEventListener( 'mousewheel', wheel, false ); + oWrapper[0].addEventListener( 'MozMousePixelScroll', function( event ){ + event.preventDefault(); + }, false); + } + else if( options.scroll ) + { + oWrapper[0].onmousewheel = wheel; + } + } + + function start( event ) + { + $( "body" ).addClass( "noSelect" ); + + var oThumbDir = parseInt( oThumb.obj.css( sDirection ), 10 ); + iMouse.start = sAxis ? event.pageX : event.pageY; + iPosition.start = oThumbDir == 'auto' ? 0 : oThumbDir; + + if( ! touchEvents ) + { + $( document ).bind( 'mousemove', drag ); + $( document ).bind( 'mouseup', end ); + oThumb.obj.bind( 'mouseup', end ); + } + else + { + document.ontouchmove = function( event ) + { + event.preventDefault(); + drag( event.touches[ 0 ] ); + }; + document.ontouchend = end; + } + } + + function wheel( event ) + { + if( oContent.ratio < 1 ) + { + var oEvent = event || window.event + , iDelta = oEvent.wheelDelta ? oEvent.wheelDelta / 120 : -oEvent.detail / 3 + ; + + iScroll -= iDelta * options.wheel; + iScroll = Math.min( ( oContent[ options.axis ] - oViewport[ options.axis ] ), Math.max( 0, iScroll )); + + oThumb.obj.css( sDirection, iScroll / oScrollbar.ratio ); + oContent.obj.css( sDirection, -iScroll ); + + if( options.lockscroll || ( iScroll !== ( oContent[ options.axis ] - oViewport[ options.axis ] ) && iScroll !== 0 ) ) + { + oEvent = $.event.fix( oEvent ); + oEvent.preventDefault(); + } + } + } + + function drag( event ) + { + if( oContent.ratio < 1 ) + { + if( options.invertscroll && touchEvents ) + { + iPosition.now = Math.min( ( oTrack[ options.axis ] - oThumb[ options.axis ] ), Math.max( 0, ( iPosition.start + ( iMouse.start - ( sAxis ? event.pageX : event.pageY ) )))); + } + else + { + iPosition.now = Math.min( ( oTrack[ options.axis ] - oThumb[ options.axis ] ), Math.max( 0, ( iPosition.start + ( ( sAxis ? event.pageX : event.pageY ) - iMouse.start)))); + } + + iScroll = iPosition.now * oScrollbar.ratio; + oContent.obj.css( sDirection, -iScroll ); + oThumb.obj.css( sDirection, iPosition.now ); + } + } + + function end() + { + $( "body" ).removeClass( "noSelect" ); + $( document ).unbind( 'mousemove', drag ); + $( document ).unbind( 'mouseup', end ); + oThumb.obj.unbind( 'mouseup', end ); + document.ontouchmove = document.ontouchend = null; + } + + return initialize(); + } + +}(jQuery)); +\ No newline at end of file diff --git a/src/main/javascript/libs/mediaelement-and-player.min.js b/src/main/javascript/libs/mediaelement-and-player.min.js @@ -1,172 +0,0 @@ -/*! -* MediaElement.js -* HTML5 <video> and <audio> shim and player -* http://mediaelementjs.com/ -* -* Creates a JavaScript object that mimics HTML5 MediaElement API -* for browsers that don't understand HTML5 or can't play the provided codec -* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3 -* -* Copyright 2010-2013, John Dyer (http://j.hn) -* License: MIT -* -*/var mejs=mejs||{};mejs.version="2.12.0";mejs.meIndex=0; -mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo", -"video/x-vimeo"]}]}; -mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+ -1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d== -"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display= -"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}}; -mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&& -!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}}; -mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b}); -mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b}); -mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!= --1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;try{e.canPlayType("video/mp4")}catch(g){a.supportsMediaTag= -false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName= -a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&h.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&& -d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init(); -mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}}; -mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}}; -mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused= -false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""}, -positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)); -this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a); -this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&& -this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in -this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}}; -mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id); -b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}; -mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270, -pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)}; -mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"? -"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}}, -determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src"); -l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!mejs.MediaFeatures.isBustedNativeHTTPS){if(!d){g= -document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=0;g<f.length;g++){l=f[g].type;for(a=0;a< -b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0]; -a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+ -"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),m;j.tagName=c.tagName; -for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight: -c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+g,"startvolume="+ -b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML= -'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a= -document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML= -'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l, -videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";return j},updateNative:function(a,b){var c=a.htmlMediaElement, -d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}}; -mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId, -{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused; -c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]= -a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+ -c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c= -document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false; -c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; -(function(a,b){var c={locale:{strings:{}},methods:{}};c.locale.getLanguage=function(){return c.locale||{language:navigator.language}};c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]= -'<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g.language};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}; -};b.i18n=c})(document,mejs);(function(a){if(mejs.i18n.locale.language&&mejs.i18n.locale.strings)a[mejs.i18n.locale.language]=mejs.i18n.locale.strings})(mejs.i18n.locale.strings);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings); - -/*! - * MediaElementPlayer - * http://mediaelementjs.com/ - * - * Creates a controller bar for HTML5 <video> add <audio> tags - * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper) - * - * Copyright 2010-2013, John Dyer (http://j.hn/) - * License: MIT - * - */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender; -(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,hideVideoControlsOnLoad:false, -clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-0.1,0))}},{keys:[37,227],action:function(a, -b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!="undefined")a.isFullScreen? -a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;mejs.players[this.id]= -this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls", -"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media); -a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0, -1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!== -null?a.$media.attr("height"):a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.container.find(".mejs-control").css("visibility", -"visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(b.controlsAreVisible)if(a){b.controls.stop(true,true).fadeOut(50,function(){f(this).css("visibility","hidden").css("display", -"block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(50,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"? -a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a,b){var c=this, -e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features){e=c.options.features[g]; -if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){console.log("media clicked",c.media,c.media.paused);if(c.options.clickToPlayPause)c.media.paused? -c.media.play():c.media.pause()};c.media.addEventListener("click",c.clickToPlayPauseCallback);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(1000)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(1000)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&& -c.startControlsTimer(400)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m= -mejs.players[j];m.id!=c.id&&c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&& -c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(d&&a.pluginType=="native"){a.load(); -a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c= -this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()==="body"){d=f(window).width();c= -f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");d.height(this.container.height()- -this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)}); -b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"), -c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(d.options.clickToPlayPause)e.paused? -e.play():e.pause()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()}, -false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown", -function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")? -e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){this.media.pause()},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime}, -setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}this.media.pluginType==="native"?this.$media.prop("controls",true):this.media.remove();this.isDynamic||this.$node.insertBefore(this.container);delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}}; -(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind= -function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer= -mejs.MediaElementPlayer})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")}, -false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left", -"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); -(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d= -this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n)); -m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false); -e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1, -Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" <span> / </span> "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a, -b,c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); -f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()}, -false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration: -this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+ -'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b), -j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute"); -if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true): -e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0); -k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen= -false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&& -mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events", -"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l, -left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show(); -t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover", -function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()}, -containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!== -screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id, -"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(), -f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen(); -document.documentElement.style.overflow=docStyleOverflow;this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"); -this.setControlsSize();this.isFullScreen=false}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText= -a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(b= -c=0;b<a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&c++;this.options.toggleCaptionsButtonWhenOnlyOne&&c==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls? -a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(b=0;b<a.tracks.length;b++)a.tracks[b].kind=="subtitles"&&a.addTrackButton(a.tracks[b].srclang, -a.tracks[b].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility","visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&& -!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang", -this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true; -b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()}, -addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+ -this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&& -this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]= -e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else if(!e.is(":visible")&&!e.is(":animated")){console.log("showing existing slide");e.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}}, -displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+ -'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&& -b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean", -lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, -parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), -stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin")); -if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, -"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")}, -click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, -isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, -b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!= -"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended", -function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$); - diff --git a/src/main/javascript/script.jsm b/src/main/javascript/script.jsm @@ -1,5 +1,5 @@ -# jquery. -libs/jquery-1.8.3.min.js +# je +libs/jquery-1.9.1.min.js # eltimn libs/jquery.bsAlerts.min.js @@ -7,15 +7,23 @@ libs/jquery.bsFormAlerts.min.js libs/liftAjax.js # bootstrap -libs/bootstrap-2.2.2.min.js +libs/bootstrap/bootstrap-transition.js +libs/bootstrap/bootstrap-alert.js +libs/bootstrap/bootstrap-modal.js +libs/bootstrap/bootstrap-dropdown.js +libs/bootstrap/bootstrap-tab.js +libs/bootstrap/bootstrap-tooltip.js +libs/bootstrap/bootstrap-popover.js +libs/bootstrap/bootstrap-collapse.js +libs/bootstrap/bootstrap-affix.js # jquery plugins libs/jquery.ui.widget.js libs/jquery.iframe-transport.js libs/jquery.fileupload.js libs/jquery.timeago.js - -libs/mediaelement-and-player.min.js +libs/jquery.tinyscrollbar.js +libs/jquery.keynav.js # customs customs/fileupload.js diff --git a/src/main/less/bootstrap/bootstrap.less b/src/main/less/bootstrap/bootstrap.less @@ -1,63 +0,0 @@ -/*! - * Bootstrap v2.2.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - -// CSS Reset -@import "reset.less"; - -// Core variables and mixins -@import "variables.less"; // Modify this for custom colors, font-sizes, etc -@import "mixins.less"; - -// Grid system and page structure -@import "scaffolding.less"; -@import "grid.less"; -@import "layouts.less"; - -// Base CSS -@import "type.less"; -@import "code.less"; -@import "forms.less"; -@import "tables.less"; - -// Components: common -@import "sprites.less"; -@import "dropdowns.less"; -@import "wells.less"; -@import "component-animations.less"; -@import "close.less"; - -// Components: Buttons & Alerts -@import "buttons.less"; -@import "button-groups.less"; -@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less - -// Components: Nav -@import "navs.less"; -@import "navbar.less"; -@import "breadcrumbs.less"; -@import "pagination.less"; -@import "pager.less"; - -// Components: Popovers -@import "modals.less"; -@import "tooltip.less"; -@import "popovers.less"; - -// Components: Misc -@import "thumbnails.less"; -@import "media.less"; -@import "labels-badges.less"; -@import "progress-bars.less"; -@import "accordion.less"; -@import "carousel.less"; -@import "hero-unit.less"; - -// Utility classes -@import "utilities.less"; // Has to be last to override when necessary diff --git a/src/main/less/bootstrap/button-groups.less b/src/main/less/bootstrap/button-groups.less @@ -164,8 +164,6 @@ margin-left: 0; } // Carets in other button sizes -.btn-mini .caret, -.btn-small .caret, .btn-large .caret { margin-top: 6px; } @@ -174,6 +172,10 @@ border-right-width: 5px; border-top-width: 5px; } +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} // Upside down carets for .dropup .dropup .btn-large .caret { border-bottom-width: 5px; diff --git a/src/main/less/bootstrap/buttons.less b/src/main/less/bootstrap/buttons.less @@ -25,13 +25,14 @@ .ie7-restore-left-whitespace(); // Give IE7 some love .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); - // Hover state - &:hover { + // Hover/focus state + &:hover, + &:focus { color: @grayDark; text-decoration: none; background-position: 0 -15px; - // transition is only when going to hover, otherwise the background + // transition is only when going to hover/focus, otherwise the background // behind the gradient (there for IE<=9 fallback) gets mismatched .transition(background-position .1s linear); } @@ -141,11 +142,6 @@ input[type="button"] { // Set the backgrounds // ------------------------- -.btn { - // reset here as of 2.0.3 due to Recess property order - border-color: #c5c5c5; - border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25); -} .btn-primary { .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); } @@ -219,12 +215,14 @@ input[type="submit"].btn { color: @linkColor; .border-radius(0); } -.btn-link:hover { +.btn-link:hover, +.btn-link:focus { color: @linkColorHover; text-decoration: underline; background-color: transparent; } -.btn-link[disabled]:hover { +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { color: @grayDark; text-decoration: none; } diff --git a/src/main/less/bootstrap/carousel.less b/src/main/less/bootstrap/carousel.less @@ -21,12 +21,13 @@ display: none; position: relative; .transition(.6s ease-in-out left); - } - // Account for jankitude on images - > .item > img { - display: block; - line-height: 1; + // Account for jankitude on images + > img, + > a > img { + display: block; + line-height: 1; + } } > .active, @@ -97,14 +98,40 @@ right: 15px; } - // Hover state - &:hover { + // Hover/focus state + &:hover, + &:focus { color: @white; text-decoration: none; .opacity(90); } } +// Carousel indicator pips +// ----------------------------- +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; + + li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255,255,255,.25); + border-radius: 5px; + } + .active { + background-color: #fff; + } +} // Caption for text below images // ----------------------------- diff --git a/src/main/less/bootstrap/close.less b/src/main/less/bootstrap/close.less @@ -11,7 +11,8 @@ color: @black; text-shadow: 0 1px 0 rgba(255,255,255,1); .opacity(20); - &:hover { + &:hover, + &:focus { color: @black; text-decoration: none; cursor: pointer; diff --git a/src/main/less/bootstrap/dropdowns.less b/src/main/less/bootstrap/dropdowns.less @@ -72,7 +72,7 @@ } // Links within the dropdown menu - li > a { + > li > a { display: block; padding: 3px 20px; clear: both; @@ -83,11 +83,12 @@ } } -// Hover state +// Hover/Focus state // ----------- -.dropdown-menu li > a:hover, -.dropdown-menu li > a:focus, -.dropdown-submenu:hover > a { +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { text-decoration: none; color: @dropdownLinkColorHover; #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%)); @@ -95,8 +96,9 @@ // Active state // ------------ -.dropdown-menu .active > a, -.dropdown-menu .active > a:hover { +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { color: @dropdownLinkColorActive; text-decoration: none; outline: 0; @@ -105,13 +107,15 @@ // Disabled state // -------------- -// Gray out text and ensure the hover state remains gray -.dropdown-menu .disabled > a, -.dropdown-menu .disabled > a:hover { +// Gray out text and ensure the hover/focus state remains gray +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { color: @grayLight; } -// Nuke hover effects -.dropdown-menu .disabled > a:hover { +// Nuke hover/focus effects +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { text-decoration: none; background-color: transparent; background-image: none; // Remove CSS gradient @@ -131,6 +135,17 @@ } } +// Backdrop to catch body clicks on mobile, etc. +// --------------------------- +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: @zindexDropdown - 10; +} + // Right aligned dropdowns // --------------------------- .pull-right > .dropdown-menu { diff --git a/src/main/less/bootstrap/forms.less b/src/main/less/bootstrap/forms.less @@ -127,7 +127,7 @@ input[type="color"], border-color: rgba(82,168,236,.8); outline: 0; outline: thin dotted \9; /* IE6-9 */ - .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)"); + .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 3px rgba(82,168,236,.6) inset"); } } @@ -191,13 +191,13 @@ input[type="checkbox"]:focus { background-color: darken(@inputBackground, 1%); border-color: @inputBorder; .box-shadow(inset 0 1px 2px rgba(0,0,0,.025)); - cursor: not-allowed; + //cursor: not-allowed; } // For text that needs to appear as an input but should not be an input .uneditable-input { overflow: hidden; // prevent text from wrapping, but still cut it off like an input does - white-space: nowrap; + //white-space: nowrap; } // Make uneditable textareas behave like a textarea @@ -422,7 +422,9 @@ select:focus:invalid { // Allow us to put symbols and text within the input field for a cleaner look .input-append, .input-prepend { - margin-bottom: 5px; + display: inline-block; + margin-bottom: @baseLineHeight / 2; + vertical-align: middle; font-size: 0; // white space collapse hack white-space: nowrap; // Prevent span and input from separating @@ -430,7 +432,8 @@ select:focus:invalid { input, select, .uneditable-input, - .dropdown-menu { + .dropdown-menu, + .popover { font-size: @baseFontSize; } diff --git a/src/main/less/bootstrap/labels-badges.less b/src/main/less/bootstrap/labels-badges.less @@ -35,10 +35,12 @@ } } -// Hover state, but only for links +// Hover/focus state, but only for links a { &.label:hover, - &.badge:hover { + &.label:focus, + &.badge:hover, + &.badge:focus { color: @white; text-decoration: none; cursor: pointer; diff --git a/src/main/less/bootstrap/media.less b/src/main/less/bootstrap/media.less @@ -37,10 +37,10 @@ // Media image alignment // ------------------------- -.media .pull-left { +.media > .pull-left { margin-right: 10px; } -.media .pull-right { +.media > .pull-right { margin-left: 10px; } diff --git a/src/main/less/bootstrap/mixins.less b/src/main/less/bootstrap/mixins.less @@ -683,4 +683,4 @@ } -} +} +\ No newline at end of file diff --git a/src/main/less/bootstrap/navbar.less b/src/main/less/bootstrap/navbar.less @@ -48,19 +48,22 @@ // ------------------------- .navbar .brand { position: absolute; - width: 100%; - left: 0; + width: 75%; + left: 50%; + margin: 0 0 0 -37.5%; text-align: center; - margin: auto; - padding: ((@navbarHeight - @baseLineHeight) / 2) 20px ((@navbarHeight - @baseLineHeight) / 2); + padding: ((@navbarHeight - @baseLineHeight) / 2) 0 ((@navbarHeight - @baseLineHeight) / 2); + a { - font-size: 20px; - font-weight: 200; - color: @navbarBrandColor; - text-shadow: 0 1px 0 @navbarBackgroundHighlight; - &:hover, &:focus { - text-decoration: none; - } + img { .square(37px); padding-right: 10px; } + font-family: @actaFontFamily; + font-size: 25px; + font-weight: 400; + color: @navbarBrandColor; + text-shadow: 0 1px 0 @navbarBackgroundHighlight; + &:hover, &:focus { + text-decoration: none; + } } } @@ -76,7 +79,8 @@ // ------------------------- .navbar-link { color: @navbarLinkColor; - &:hover { + &:hover, + &:focus { color: @navbarLinkColorHover; } } @@ -98,7 +102,9 @@ } .navbar .btn-group .btn, .navbar .input-prepend .btn, -.navbar .input-append .btn { +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { margin-top: 0; // then undo the margin here so we don't accidentally double it } @@ -248,13 +254,12 @@ } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; - } -// Hover +// Hover/focus .navbar .nav > li > a:focus, .navbar .nav > li > a:hover { - background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active + background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active color: @navbarLinkColorHover; text-decoration: none; } @@ -338,10 +343,11 @@ } } -// Caret should match text color on hover -.navbar .nav li.dropdown > a:hover .caret { - border-top-color: @navbarLinkColorActive; - border-bottom-color: @navbarLinkColorActive; +// Caret should match text color on hover/focus +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: @navbarLinkColorHover; + border-bottom-color: @navbarLinkColorHover; } // Remove background color from open dropdown @@ -399,7 +405,8 @@ .nav > li > a { color: @navbarInverseLinkColor; text-shadow: 0 -1px 0 rgba(0,0,0,.25); - &:hover { + &:hover, + &:focus { color: @navbarInverseLinkColorHover; } } @@ -428,7 +435,8 @@ // Inline text links .navbar-link { color: @navbarInverseLinkColor; - &:hover { + &:hover, + &:focus { color: @navbarInverseLinkColorHover; } } @@ -446,7 +454,8 @@ background-color: @navbarInverseLinkBackgroundActive; color: @navbarInverseLinkColorActive; } - .nav li.dropdown > a:hover .caret { + .nav li.dropdown > a:hover .caret, + .nav li.dropdown > a:focus .caret { border-top-color: @navbarInverseLinkColorActive; border-bottom-color: @navbarInverseLinkColorActive; } diff --git a/src/main/less/bootstrap/navs.less b/src/main/less/bootstrap/navs.less @@ -16,7 +16,8 @@ .nav > li > a { display: block; } -.nav > li > a:hover { +.nav > li > a:hover, +.nav > li > a:focus { text-decoration: none; background-color: @grayLighter; } @@ -68,7 +69,8 @@ padding: 3px 15px; } .nav-list > .active > a, -.nav-list > .active > a:hover { +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { color: @white; text-shadow: 0 -1px 0 rgba(0,0,0,.2); background-color: @linkColor; @@ -122,13 +124,15 @@ line-height: @baseLineHeight; border: 1px solid transparent; .border-radius(4px 4px 0 0); - &:hover { + &:hover, + &:focus { border-color: @grayLighter @grayLighter #ddd; } } -// Active state, and it's :hover to override normal :hover +// Active state, and it's :hover/:focus to override normal :hover/:focus .nav-tabs > .active > a, -.nav-tabs > .active > a:hover { +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { color: @gray; background-color: @bodyBackground; border: 1px solid #ddd; @@ -151,7 +155,8 @@ // Active state .nav-pills > .active > a, -.nav-pills > .active > a:hover { +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { color: @white; background-color: @linkColor; } @@ -183,7 +188,8 @@ .nav-tabs.nav-stacked > li:last-child > a { .border-bottom-radius(4px); } -.nav-tabs.nav-stacked > li > a:hover { +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { border-color: #ddd; z-index: 2; } @@ -216,7 +222,8 @@ border-bottom-color: @linkColor; margin-top: 6px; } -.nav .dropdown-toggle:hover .caret { +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { border-top-color: @linkColorHover; border-bottom-color: @linkColorHover; } @@ -236,9 +243,10 @@ border-bottom-color: @gray; } -// Active:hover dropdown links +// Active:hover/:focus dropdown links // ------------------------- -.nav > .dropdown.active > a:hover { +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { cursor: pointer; } @@ -246,21 +254,24 @@ // ------------------------- .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, -.nav > li.dropdown.open.active > a:hover { +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { color: @white; background-color: @grayLight; border-color: @grayLight; } .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, -.nav li.dropdown.open a:hover .caret { +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { border-top-color: @white; border-bottom-color: @white; .opacity(100); } // Dropdowns in stacked tabs -.tabs-stacked .open > a:hover { +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { border-color: @grayLight; } @@ -311,13 +322,15 @@ } .tabs-below > .nav-tabs > li > a { .border-radius(0 0 4px 4px); - &:hover { + &:hover, + &:focus { border-bottom-color: transparent; border-top-color: #ddd; } } .tabs-below > .nav-tabs > .active > a, -.tabs-below > .nav-tabs > .active > a:hover { +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { border-color: transparent #ddd #ddd #ddd; } @@ -346,11 +359,13 @@ margin-right: -1px; .border-radius(4px 0 0 4px); } -.tabs-left > .nav-tabs > li > a:hover { +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { border-color: @grayLighter #ddd @grayLighter @grayLighter; } .tabs-left > .nav-tabs .active > a, -.tabs-left > .nav-tabs .active > a:hover { +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { border-color: #ddd transparent #ddd #ddd; *border-right-color: @white; } @@ -365,11 +380,13 @@ margin-left: -1px; .border-radius(0 4px 4px 0); } -.tabs-right > .nav-tabs > li > a:hover { +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { border-color: @grayLighter @grayLighter @grayLighter #ddd; } .tabs-right > .nav-tabs .active > a, -.tabs-right > .nav-tabs .active > a:hover { +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { border-color: #ddd #ddd #ddd transparent; *border-left-color: @white; } @@ -383,8 +400,9 @@ .nav > .disabled > a { color: @grayLight; } -// Nuke hover effects -.nav > .disabled > a:hover { +// Nuke hover/focus effects +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { text-decoration: none; background-color: transparent; cursor: default; diff --git a/src/main/less/bootstrap/pager.less b/src/main/less/bootstrap/pager.less @@ -20,7 +20,8 @@ border: 1px solid #ddd; .border-radius(15px); } -.pager li > a:hover { +.pager li > a:hover, +.pager li > a:focus { text-decoration: none; background-color: #f5f5f5; } @@ -34,6 +35,7 @@ } .pager .disabled > a, .pager .disabled > a:hover, +.pager .disabled > a:focus, .pager .disabled > span { color: @grayLight; background-color: #fff; diff --git a/src/main/less/bootstrap/pagination.less b/src/main/less/bootstrap/pagination.less @@ -32,6 +32,7 @@ border-left-width: 0; } .pagination ul > li > a:hover, +.pagination ul > li > a:focus, .pagination ul > .active > a, .pagination ul > .active > span { background-color: @paginationActiveBackground; @@ -43,7 +44,8 @@ } .pagination ul > .disabled > span, .pagination ul > .disabled > a, -.pagination ul > .disabled > a:hover { +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { color: @grayLight; background-color: transparent; cursor: default; diff --git a/src/main/less/bootstrap/popovers.less b/src/main/less/bootstrap/popovers.less @@ -9,7 +9,7 @@ left: 0; z-index: @zindexPopover; display: none; - width: 236px; + max-width: 276px; padding: 1px; text-align: left; // Reset given new insertion method background-color: @popoverBackground; @@ -40,6 +40,10 @@ background-color: @popoverTitleBackground; border-bottom: 1px solid darken(@popoverTitleBackground, 5%); .border-radius(5px 5px 0 0); + + &:empty { + display: none; + } } .popover-content { diff --git a/src/main/less/bootstrap/reset.less b/src/main/less/bootstrap/reset.less @@ -213,4 +213,4 @@ textarea { h3 { page-break-after: avoid; } -} -\ No newline at end of file +} diff --git a/src/main/less/bootstrap/responsive-1200px-min.less b/src/main/less/bootstrap/responsive-1200px-min.less @@ -24,5 +24,4 @@ .row-fluid .thumbnails { margin-left: 0; } - } diff --git a/src/main/less/bootstrap/responsive-767px-max.less b/src/main/less/bootstrap/responsive-767px-max.less @@ -5,11 +5,25 @@ @media (max-width: 767px) { + // editted by julio + + // Padding to set content in a bit body { padding-left: 20px; padding-right: 20px; + + // editted by julio + font-size: @baseFontSize * 0.9; + line-height: @baseLineHeight * 0.9; } + + .marketing { + font-size: @marketingFontSize * 0.6; + line-height: @marketingLineHeight * 0.6; + .small { font-size: @marketingFontSize * 0.4 } + } + // Negative indent the now static "fixed" navbar .navbar-fixed-top, .navbar-fixed-bottom, @@ -72,8 +86,8 @@ .box-sizing(border-box); } .row-fluid [class*="offset"]:first-child { - margin-left: 0; - } + margin-left: 0; + } // FORM FIELDS // ----------- diff --git a/src/main/less/bootstrap/responsive-768px-979px.less b/src/main/less/bootstrap/responsive-768px-979px.less @@ -16,4 +16,16 @@ // No need to reset .thumbnails here since it's the same @gridGutterWidth + + body { + // editted by julio + font-size: @baseFontSize * 0.95; + line-height: @baseLineHeight * 0.95; + } + + .marketing { + font-size: @marketingFontSize * 0.95; + line-height: @marketingLineHeight * 0.95; + } + } diff --git a/src/main/less/bootstrap/responsive-navbar.less b/src/main/less/bootstrap/responsive-navbar.less @@ -34,9 +34,10 @@ } // Account for brand name .navbar .brand { - padding-left: 10px; - padding-right: 10px; - margin: 0 0 0 -5px; + // commented out by julio + //padding-left: 10px; + //padding-right: 10px; + //margin: 0 0 0 -5px; } // COLLAPSIBLE NAVBAR @@ -81,7 +82,9 @@ margin-bottom: 2px; } .nav-collapse .nav > li > a:hover, - .nav-collapse .dropdown-menu a:hover { + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { background-color: @navbarBackground; } .navbar-inverse .nav-collapse .nav > li > a, @@ -89,7 +92,9 @@ color: @navbarInverseLinkColor; } .navbar-inverse .nav-collapse .nav > li > a:hover, - .navbar-inverse .nav-collapse .dropdown-menu a:hover { + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { background-color: @navbarInverseBackground; } // Buttons in the navbar diff --git a/src/main/less/bootstrap/responsive-utilities.less b/src/main/less/bootstrap/responsive-utilities.less @@ -3,6 +3,13 @@ // -------------------------------------------------- +// IE10 Metro responsive +// Required for Windows 8 Metro split-screen snapping with IE10 +// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ +@-ms-viewport{ + width: device-width; +} + // Hide from screenreaders and browsers // Credit: HTML5 Boilerplate .hidden { @@ -41,3 +48,12 @@ // Hide .hidden-phone { display: none !important; } } + +// Print utilities +.visible-print { display: none !important; } +.hidden-print { } + +@media print { + .visible-print { display: inherit !important; } + .hidden-print { display: none !important; } +} diff --git a/src/main/less/bootstrap/responsive.less b/src/main/less/bootstrap/responsive.less @@ -1,57 +0,0 @@ -/*! - * Bootstrap Responsive v2.2.2 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */ - - -// Responsive.less -// For phone and tablet devices -// ------------------------------------------------------------- - - -// IE10 Metro responsive -// Required for Windows 8 Metro split-screen snapping with IE10 -// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ - -@-ms-viewport{ - width: device-width; -} - - -// REPEAT VARIABLES & MIXINS -// ------------------------- -// Required since we compile the responsive stuff separately - -@import "variables.less"; // Modify this for custom colors, font-sizes, etc -@import "mixins.less"; - - -// RESPONSIVE CLASSES -// ------------------ - -@import "responsive-utilities.less"; - - -// MEDIA QUERIES -// ------------------ - -// Large desktops -@import "responsive-1200px-min.less"; - -// Tablets to regular desktops -@import "responsive-768px-979px.less"; - -// Phones to portrait tablets and narrow desktops -@import "responsive-767px-max.less"; - - -// RESPONSIVE NAVBAR -// ------------------ - -// From 979px and below, show a button to toggle navbar contents -@import "responsive-navbar.less"; diff --git a/src/main/less/bootstrap/scaffolding.less b/src/main/less/bootstrap/scaffolding.less @@ -23,7 +23,8 @@ a { color: @linkColor; text-decoration: none; } -a:hover { +a:hover, +a:focus { color: @linkColorHover; text-decoration: underline; } diff --git a/src/main/less/bootstrap/sprites.less b/src/main/less/bootstrap/sprites.less @@ -28,7 +28,7 @@ margin-top: 1px; } -/* White icons with optional class, or on hover/active states of certain elements */ +/* White icons with optional class, or on hover/focus/active states of certain elements */ .icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], @@ -37,11 +37,15 @@ .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], -.dropdown-submenu:hover > a > [class*=" icon-"] { +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { background-image: url("@{iconWhiteSpritePath}"); } @@ -166,7 +170,7 @@ .icon-chevron-down { background-position: -313px -119px; } // 1px, 1px off .icon-retweet { background-position: -336px -120px; } .icon-shopping-cart { background-position: -360px -120px; } -.icon-folder-close { background-position: -384px -120px; } +.icon-folder-close { background-position: -384px -120px; width: 16px; } .icon-folder-open { background-position: -408px -120px; width: 16px; } .icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off .icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off diff --git a/src/main/less/bootstrap/tables.less b/src/main/less/bootstrap/tables.less @@ -93,24 +93,32 @@ table { tbody:first-child tr:first-child td { border-top: 0; } - // For first th or td in the first row in the first thead or tbody + // For first th/td in the first row in the first thead or tbody thead:first-child tr:first-child > th:first-child, - tbody:first-child tr:first-child > td:first-child { + tbody:first-child tr:first-child > td:first-child, + tbody:first-child tr:first-child > th:first-child { .border-top-left-radius(@baseBorderRadius); } + // For last th/td in the first row in the first thead or tbody thead:first-child tr:first-child > th:last-child, - tbody:first-child tr:first-child > td:last-child { + tbody:first-child tr:first-child > td:last-child, + tbody:first-child tr:first-child > th:last-child { .border-top-right-radius(@baseBorderRadius); } - // For first th or td in the last row in the last thead or tbody + // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot thead:last-child tr:last-child > th:first-child, tbody:last-child tr:last-child > td:first-child, - tfoot:last-child tr:last-child > td:first-child { + tbody:last-child tr:last-child > th:first-child, + tfoot:last-child tr:last-child > td:first-child, + tfoot:last-child tr:last-child > th:first-child { .border-bottom-left-radius(@baseBorderRadius); } + // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot thead:last-child tr:last-child > th:last-child, tbody:last-child tr:last-child > td:last-child, - tfoot:last-child tr:last-child > td:last-child { + tbody:last-child tr:last-child > th:last-child, + tfoot:last-child tr:last-child > td:last-child, + tfoot:last-child tr:last-child > th:last-child { .border-bottom-right-radius(@baseBorderRadius); } @@ -122,7 +130,6 @@ table { .border-bottom-right-radius(0); } - // Special fixes to round the left border on the first td/th caption + thead tr:first-child th:first-child, caption + tbody tr:first-child td:first-child, @@ -161,8 +168,8 @@ table { // Placed here since it has to come after the potential zebra striping .table-hover { tbody { - tr:hover td, - tr:hover th { + tr:hover > td, + tr:hover > th { background-color: @tableBackgroundHover; } } @@ -206,32 +213,32 @@ table th[class*="span"], // Exact selectors below required to override .table-striped .table tbody tr { - &.success td { + &.success > td { background-color: @successBackground; } - &.error td { + &.error > td { background-color: @errorBackground; } - &.warning td { + &.warning > td { background-color: @warningBackground; } - &.info td { + &.info > td { background-color: @infoBackground; } } // Hover states for .table-hover .table-hover tbody tr { - &.success:hover td { + &.success:hover > td { background-color: darken(@successBackground, 5%); } - &.error:hover td { + &.error:hover > td { background-color: darken(@errorBackground, 5%); } - &.warning:hover td { + &.warning:hover > td { background-color: darken(@warningBackground, 5%); } - &.info:hover td { + &.info:hover > td { background-color: darken(@infoBackground, 5%); } } diff --git a/src/main/less/bootstrap/thumbnails.less b/src/main/less/bootstrap/thumbnails.less @@ -33,8 +33,9 @@ .box-shadow(0 1px 3px rgba(0,0,0,.055)); .transition(all .2s ease-in-out); } -// Add a hover state for linked versions only -a.thumbnail:hover { +// Add a hover/focus state for linked versions only +a.thumbnail:hover, +a.thumbnail:focus { border-color: @linkColor; .box-shadow(0 1px 4px rgba(0,105,214,.25)); } @@ -50,3 +51,17 @@ a.thumbnail:hover { padding: 9px; color: @gray; } + + +// The actual thumbnail (can be `a` or `div`) +.thumbnail.writer { + padding: 0; + border: 4px solid @gold; +} + +// Add a hover/focus state for linked versions only +a.thumbnail.writer:hover, +a.thumbnail.writer:focus { + border-color: @gold; + .box-shadow(4px 6px 8px rgba(255, 215, 0,.25)); // gold +} +\ No newline at end of file diff --git a/src/main/less/bootstrap/tooltip.less b/src/main/less/bootstrap/tooltip.less @@ -9,20 +9,20 @@ z-index: @zindexTooltip; display: block; visibility: visible; - padding: 5px; font-size: 11px; + line-height: 1.4; .opacity(0); &.in { .opacity(80); } - &.top { margin-top: -3px; } - &.right { margin-left: 3px; } - &.bottom { margin-top: 3px; } - &.left { margin-left: -3px; } + &.top { margin-top: -3px; padding: 5px 0; } + &.right { margin-left: 3px; padding: 0 5px; } + &.bottom { margin-top: 3px; padding: 5px 0; } + &.left { margin-left: -3px; padding: 0 5px; } } // Wrapper for the tooltip content .tooltip-inner { max-width: 200px; - padding: 3px 8px; + padding: 8px; color: @tooltipColor; text-align: center; text-decoration: none; diff --git a/src/main/less/bootstrap/type.less b/src/main/less/bootstrap/type.less @@ -29,19 +29,28 @@ cite { font-style: normal; } // Utility classes .muted { color: @grayLight; } -a.muted:hover { color: darken(@grayLight, 10%); } +a.muted:hover, +a.muted:focus { color: darken(@grayLight, 10%); } .text-warning { color: @warningText; } -a.text-warning:hover { color: darken(@warningText, 10%); } +a.text-warning:hover, +a.text-warning:focus { color: darken(@warningText, 10%); } .text-error { color: @errorText; } -a.text-error:hover { color: darken(@errorText, 10%); } +a.text-error:hover, +a.text-error:focus { color: darken(@errorText, 10%); } .text-info { color: @infoText; } -a.text-info:hover { color: darken(@infoText, 10%); } +a.text-info:hover, +a.text-info:focus { color: darken(@infoText, 10%); } .text-success { color: @successText; } -a.text-success:hover { color: darken(@successText, 10%); } +a.text-success:hover, +a.text-success:focus { color: darken(@successText, 10%); } + +.text-left { text-align: left; } +.text-right { text-align: right; } +.text-center { text-align: center; } // Headings @@ -119,8 +128,9 @@ ul.inline, ol.inline { margin-left: 0; list-style: none; - & > li { + > li { display: inline-block; + .ie7-inline-block(); padding-left: 5px; padding-right: 5px; } @@ -185,7 +195,11 @@ blockquote { border-left: 5px solid @grayLighter; p { margin-bottom: 0; - #font > .shorthand(16px,300,@baseLineHeight * 1.25); + font-weight: 300; + + // editted by Julio + //line-height: 1.25; + //font-size: @baseFontSize * 1.25; } small { display: block; diff --git a/src/main/less/bootstrap/variables.less b/src/main/less/bootstrap/variables.less @@ -2,7 +2,6 @@ // Variables // -------------------------------------------------- - // Global values // -------------------------------------------------- @@ -28,7 +27,7 @@ @orange: #f89406; @pink: #c3325f; @purple: #7a43b6; - +@gold: #ffd700; // Scaffolding // ------------------------- @@ -44,13 +43,16 @@ // Typography // ------------------------- +@fftisaFontFamily: "ff-tisa-web-pro"; // typekit (or use tk-ff-tisa-web-pro class) +@actaFontFamily: "acta-poster-swashes"; // typekit (or use tk-acta-poster-swashes class) +@baskFontFamily: "Open Baskerville 0.0.53"; // openFontDb @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; @serifFontFamily: Georgia, "Times New Roman", Times, serif; @monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace; -@baseFontSize: 14px; -@baseFontFamily: @sansFontFamily; -@baseLineHeight: 20px; +@baseFontSize: 18px; // 100% +@baseFontFamily: @baskFontFamily; +@baseLineHeight: 30px; @altFontFamily: @serifFontFamily; @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily @@ -60,11 +62,10 @@ // Component sizing // ------------------------- -// Based on 14px font-size and 20px line-height -@fontSizeLarge: @baseFontSize * 1.25; // ~18px -@fontSizeSmall: @baseFontSize * 0.85; // ~12px -@fontSizeMini: @baseFontSize * 0.75; // ~11px +@fontSizeLarge: @baseFontSize * 1.25; +@fontSizeSmall: @baseFontSize * 0.85; +@fontSizeMini: @baseFontSize * 0.75; @paddingLarge: 11px 19px; // 44px @paddingSmall: 2px 10px; // 26px @@ -86,7 +87,7 @@ // ------------------------- @btnBackground: @white; @btnBackgroundHighlight: darken(@white, 10%); -@btnBorder: #bbb; +@btnBorder: #ccc; @btnPrimaryBackground: @linkColor; @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%); @@ -180,7 +181,7 @@ @navbarCollapseWidth: 979px; @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; -@navbarHeight: 40px; +@navbarHeight: 50px; @navbarBackgroundHighlight: #ffffff; @navbarBackground: darken(@navbarBackgroundHighlight, 5%); @navbarBorder: darken(@navbarBackground, 12%); @@ -213,6 +214,10 @@ @navbarInverseBrandColor: @navbarInverseLinkColor; +// Email Sign up +// ------------------------- +@emailSignupHeight: 80px; + // Pagination // ------------------------- diff --git a/src/main/less/custom.less b/src/main/less/custom.less @@ -1,122 +0,0 @@ -// Override some defaults -html, body { - padding-bottom: 40px; -} - -.main-content { - background-color: @white; - padding: 20px; - margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */ - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); - -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); - box-shadow: 0 1px 2px rgba(0,0,0,.15); -} - -.hero-unit { - h2 { - font-size: 36px; - } -} - -// FORM FIELD FEEDBACK STATES -// -------------------------- - -/** - * Default is to change the color of the help text to the same as the alert. - * This returns help text to original color. - */ -.customFormFieldState(@groupColor) { - .help-block, - .help-inline { - color: lighten(@textColor, 15%); // lighten the text some for contrast - } -} - -// Warning -.control-group.warning { - .customFormFieldState(@warningText); -} -// Error -.control-group.error { - .customFormFieldState(@errorText); -} -// Success -.control-group.success { - .customFormFieldState(@successText); -} -// Info -.control-group.info { - .customFormFieldState(@infoText); -} - -/** - * For coloring id notices - */ -.alert-block { - .warning { - color: @warningText; - } - .error { - color: @errorText; - } - .success { - color: @successText; - } - .info { - color: @infoText; - } -} - -#user img { - display: inline-block; - width: 20px; - height: 20px; - vertical-align: top; - margin-right: 6px; - border: none; - cursor: pointer; -} - -#user-header { - line-height: 4em; - - img { - display: inline-block; - vertical-align: middle; - margin-right: 6px; - border: none; - cursor: pointer; - } - - h3 { - display: inline-block; - } -} - -div.gravatar { - float:left; - margin-left:10px; - max-width: 320px; - - img { - padding-top:10px; - } -} - -// fixes gap between navbar and section below it -@media (max-width: @navbarCollapseWidth) { - .navbar-fixed-top { - margin-bottom: 0px; - } -} - -.signup-overlay { - position: absolute; - left: 0; - top: @navbarHeight + 40; - z-index: 1010; - background-color:#fff; -} diff --git a/src/main/less/mediaelementplayer.less b/src/main/less/mediaelementplayer.less @@ -1,864 +0,0 @@ -.mejs-container { - position: relative; - background: #000; - font-family: Helvetica, Arial; - text-align: left; - vertical-align: top; - text-indent: 0; -} - -.me-plugin { - position: absolute; -} - -.mejs-embed, .mejs-embed body { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - background: #000; - overflow: hidden; -} - -.mejs-container-fullscreen { - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - overflow: hidden; - z-index: 1000; -} -.mejs-container-fullscreen .mejs-mediaelement, -.mejs-container-fullscreen video { - width: 100%; - height: 100%; -} - -.mejs-clear { - clear: both; -} - -/* Start: LAYERS */ -.mejs-background { - position: absolute; - top: 0; - left: 0; -} - -.mejs-mediaelement { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.mejs-poster { - position: absolute; - top: 0; - left: 0; - background-size: contain ; - background-position: 50% 50% ; - background-repeat: no-repeat ; -} -:root .mejs-poster img { - display: none ; -} - -.mejs-poster img { - border: 0; - padding: 0; - border: 0; -} - -.mejs-overlay { - position: absolute; - top: 0; - left: 0; -} - -.mejs-overlay-play { - cursor: pointer; -} - -.mejs-overlay-button { - position: absolute; - top: 50%; - left: 50%; - width: 100px; - height: 100px; - margin: -50px 0 0 -50px; - background: url(/img/media/bigplay.svg) no-repeat; -} - -.no-svg .mejs-overlay-button { - background-image: url(/img/media/bigplay.png); -} - -.mejs-overlay:hover .mejs-overlay-button { - background-position: 0 -100px ; -} - -.mejs-overlay-loading { - position: absolute; - top: 50%; - left: 50%; - width: 80px; - height: 80px; - margin: -40px 0 0 -40px; - background: #333; - background: url(/img/media/background.png); - background: rgba(0, 0, 0, 0.9); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.9)), to(rgba(0,0,0,0.9))); - background: -webkit-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9)); - background: -moz-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9)); - background: -o-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9)); - background: -ms-linear-gradient(top, rgba(50,50,50,0.9), rgba(0,0,0,0.9)); - background: linear-gradient(rgba(50,50,50,0.9), rgba(0,0,0,0.9)); -} - -.mejs-overlay-loading span { - display: block; - width: 80px; - height: 80px; - background: transparent url(/img/media/loading.gif) 50% 50% no-repeat; -} - -/* End: LAYERS */ - -/* Start: CONTROL BAR */ -.mejs-container .mejs-controls { - position: absolute; - list-style-type: none; - margin: 0; - padding: 0; - bottom: 0; - left: 0; - background: url(/img/media/background.png); - background: rgba(0, 0, 0, 0.7); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7))); - background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - height: 30px; - width: 100%; -} -.mejs-container .mejs-controls div { - list-style-type: none; - background-image: none; - display: block; - float: left; - margin: 0; - padding: 0; - width: 26px; - height: 26px; - font-size: 11px; - line-height: 11px; - font-family: Helvetica, Arial; - border: 0; -} - -.mejs-controls .mejs-button button { - cursor: pointer; - display: block; - font-size: 0; - line-height: 0; - text-decoration: none; - margin: 7px 5px; - padding: 0; - position: absolute; - height: 16px; - width: 16px; - border: 0; - background: transparent url(/img/media/controls.svg) no-repeat; -} - -.no-svg .mejs-controls .mejs-button button { - background-image: url(/img/media/controls.png); -} - -/* :focus for accessibility */ -.mejs-controls .mejs-button button:focus { - outline: solid 1px yellow; -} - -/* End: CONTROL BAR */ - -/* Start: Time (Current / Duration) */ -.mejs-container .mejs-controls .mejs-time { - color: #fff; - display: block; - height: 17px; - width: auto; - padding: 8px 3px 0 3px ; - overflow: hidden; - text-align: center; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - box-sizing: content-box; -} - -.mejs-container .mejs-controls .mejs-time span { - color: #fff; - font-size: 11px; - line-height: 12px; - display: block; - float: left; - margin: 1px 2px 0 0; - width: auto; -} -/* End: Time (Current / Duration) */ - -/* Start: Play/Pause/Stop */ -.mejs-controls .mejs-play button { - background-position: 0 0; -} - -.mejs-controls .mejs-pause button { - background-position: 0 -16px; -} - -.mejs-controls .mejs-stop button { - background-position: -112px 0; -} -/* Start: Play/Pause/Stop */ - -/* Start: Progress Bar */ -.mejs-controls div.mejs-time-rail { - width: 200px; - padding-top: 5px; -} - -.mejs-controls .mejs-time-rail span { - display: block; - position: absolute; - width: 180px; - height: 10px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - cursor: pointer; -} - -.mejs-controls .mejs-time-rail .mejs-time-total { - margin: 5px; - background: #333; - background: rgba(50,50,50,0.8); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8))); - background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8)); -} - -.mejs-controls .mejs-time-rail .mejs-time-buffering { - width: 100%; - background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - -webkit-background-size: 15px 15px; - -moz-background-size: 15px 15px; - -o-background-size: 15px 15px; - background-size: 15px 15px; - -webkit-animation: buffering-stripes 2s linear infinite; - -moz-animation: buffering-stripes 2s linear infinite; - -ms-animation: buffering-stripes 2s linear infinite; - -o-animation: buffering-stripes 2s linear infinite; - animation: buffering-stripes 2s linear infinite; -} - -@-webkit-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} } -@-moz-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} } -@-ms-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} } -@-o-keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} } -@keyframes buffering-stripes { from {background-position: 0 0;} to {background-position: 30px 0;} } - -.mejs-controls .mejs-time-rail .mejs-time-loaded { - background: #3caac8; - background: rgba(60,170,200,0.8); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(44,124,145,0.8)), to(rgba(78,183,212,0.8))); - background: -webkit-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8)); - background: -moz-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8)); - background: -o-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8)); - background: -ms-linear-gradient(top, rgba(44,124,145,0.8), rgba(78,183,212,0.8)); - background: linear-gradient(rgba(44,124,145,0.8), rgba(78,183,212,0.8)); - width: 0; -} - -.mejs-controls .mejs-time-rail .mejs-time-current { - background: #fff; - background: rgba(255,255,255,0.8); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8))); - background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - width: 0; -} - -.mejs-controls .mejs-time-rail .mejs-time-handle { - display: none; - position: absolute; - margin: 0; - width: 10px; - background: #fff; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - cursor: pointer; - border: solid 2px #333; - top: -2px; - text-align: center; -} - -.mejs-controls .mejs-time-rail .mejs-time-float { - position: absolute; - display: none; - background: #eee; - width: 36px; - height: 17px; - border: solid 1px #333; - top: -26px; - margin-left: -18px; - text-align: center; - color: #111; -} - -.mejs-controls .mejs-time-rail .mejs-time-float-current { - margin: 2px; - width: 30px; - display: block; - text-align: center; - left: 0; -} - -.mejs-controls .mejs-time-rail .mejs-time-float-corner { - position: absolute; - display: block; - width: 0; - height: 0; - line-height: 0; - border: solid 5px #eee; - border-color: #eee transparent transparent transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - top: 15px; - left: 13px; -} - -.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float { - width: 48px; -} - -.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current { - width: 44px; -} - -.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner { - left: 18px; -} - -/* -.mejs-controls .mejs-time-rail:hover .mejs-time-handle { - visibility:visible; -} -*/ -/* End: Progress Bar */ - -/* Start: Fullscreen */ -.mejs-controls .mejs-fullscreen-button button { - background-position: -32px 0; -} - -.mejs-controls .mejs-unfullscreen button { - background-position: -32px -16px; -} -/* End: Fullscreen */ - - -/* Start: Mute/Volume */ -.mejs-controls .mejs-volume-button { -} - -.mejs-controls .mejs-mute button { - background-position: -16px -16px; -} - -.mejs-controls .mejs-unmute button { - background-position: -16px 0; -} - -.mejs-controls .mejs-volume-button { - position: relative; -} - -.mejs-controls .mejs-volume-button .mejs-volume-slider { - display: none; - height: 115px; - width: 25px; - background: url(/img/media/background.png); - background: rgba(50, 50, 50, 0.7); - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - top: -115px; - left: 0; - z-index: 1; - position: absolute; - margin: 0; -} - -.mejs-controls .mejs-volume-button:hover { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -/* -.mejs-controls .mejs-volume-button:hover .mejs-volume-slider { - display: block; -} -*/ - -.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total { - position: absolute; - left: 11px; - top: 8px; - width: 2px; - height: 100px; - background: #ddd; - background: rgba(255, 255, 255, 0.5); - margin: 0; -} - -.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current { - position: absolute; - left: 11px; - top: 8px; - width: 2px; - height: 100px; - background: #ddd; - background: rgba(255, 255, 255, 0.9); - margin: 0; -} - -.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle { - position: absolute; - left: 4px; - top: -3px; - width: 16px; - height: 6px; - background: #ddd; - background: rgba(255, 255, 255, 0.9); - cursor: N-resize; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - margin: 0; -} - -/* horizontal version */ -.mejs-controls div.mejs-horizontal-volume-slider { - height: 26px; - width: 60px; - position: relative; -} - -.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total { - position: absolute; - left: 0; - top: 11px; - width: 50px; - height: 8px; - margin: 0; - padding: 0; - font-size: 1px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #333; - background: rgba(50,50,50,0.8); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(30,30,30,0.8)), to(rgba(60,60,60,0.8))); - background: -webkit-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -moz-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -o-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: -ms-linear-gradient(top, rgba(30,30,30,0.8), rgba(60,60,60,0.8)); - background: linear-gradient(rgba(30,30,30,0.8), rgba(60,60,60,0.8)); -} - -.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current { - position: absolute; - left: 0; - top: 11px; - width: 50px; - height: 8px; - margin: 0; - padding: 0; - font-size: 1px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - background: #fff; - background: rgba(255,255,255,0.8); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,255,255,0.9)), to(rgba(200,200,200,0.8))); - background: -webkit-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -moz-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -o-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: -ms-linear-gradient(top, rgba(255,255,255,0.9), rgba(200,200,200,0.8)); - background: linear-gradient(rgba(255,255,255,0.9), rgba(200,200,200,0.8)); -} - -.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle { - display: none; -} - -/* End: Mute/Volume */ - -/* Start: Track (Captions and Chapters) */ -.mejs-controls .mejs-captions-button { - position: relative; -} - -.mejs-controls .mejs-captions-button button { - background-position: -48px 0; -} -.mejs-controls .mejs-captions-button .mejs-captions-selector { - visibility: hidden; - position: absolute; - bottom: 26px; - right: -10px; - width: 130px; - height: 100px; - background: url(/img/media/background.png); - background: rgba(50,50,50,0.7); - border: solid 1px transparent; - padding: 10px; - overflow: hidden; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -/* -.mejs-controls .mejs-captions-button:hover .mejs-captions-selector { - visibility: visible; -} -*/ - -.mejs-controls .mejs-captions-button .mejs-captions-selector ul { - margin: 0; - padding: 0; - display: block; - list-style-type: none !important; - overflow: hidden; -} - -.mejs-controls .mejs-captions-button .mejs-captions-selector ul li { - margin: 0 0 6px 0; - padding: 0; - list-style-type: none !important; - display: block; - color: #fff; - overflow: hidden; -} - -.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input { - clear: both; - float: left; - margin: 3px 3px 0 5px; -} - -.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label { - width: 100px; - float: left; - padding: 4px 0 0 0; - line-height: 15px; - font-family: helvetica, arial; - font-size: 10px; -} - -.mejs-controls .mejs-captions-button .mejs-captions-translations { - font-size: 10px; - margin: 0 0 5px 0; -} - -.mejs-chapters { - position: absolute; - top: 0; - left: 0; - -xborder-right: solid 1px #fff; - width: 10000px; - z-index: 1; -} - -.mejs-chapters .mejs-chapter { - position: absolute; - float: left; - background: #222; - background: rgba(0, 0, 0, 0.7); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(50,50,50,0.7)), to(rgba(0,0,0,0.7))); - background: -webkit-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -moz-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -o-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: -ms-linear-gradient(top, rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - background: linear-gradient(rgba(50,50,50,0.7), rgba(0,0,0,0.7)); - filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232,endColorstr=#000000); - overflow: hidden; - border: 0; -} - -.mejs-chapters .mejs-chapter .mejs-chapter-block { - font-size: 11px; - color: #fff; - padding: 5px; - display: block; - border-right: solid 1px #333; - border-bottom: solid 1px #333; - cursor: pointer; -} - -.mejs-chapters .mejs-chapter .mejs-chapter-block-last { - border-right: none; -} - -.mejs-chapters .mejs-chapter .mejs-chapter-block:hover { - background: #666; - background: rgba(102,102,102, 0.7); - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(102,102,102,0.7)), to(rgba(50,50,50,0.6))); - background: -webkit-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6)); - background: -moz-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6)); - background: -o-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6)); - background: -ms-linear-gradient(top, rgba(102,102,102,0.7), rgba(50,50,50,0.6)); - background: linear-gradient(rgba(102,102,102,0.7), rgba(50,50,50,0.6)); - filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666,endColorstr=#323232); -} - -.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title { - font-size: 12px; - font-weight: bold; - display: block; - white-space: nowrap; - text-overflow: ellipsis; - margin: 0 0 3px 0; - line-height: 12px; -} - -.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan { - font-size: 12px; - line-height: 12px; - margin: 3px 0 4px 0; - display: block; - white-space: nowrap; - text-overflow: ellipsis; -} - -.mejs-captions-layer { - position: absolute; - bottom: 0; - left: 0; - text-align:center; - line-height: 22px; - font-size: 12px; - color: #fff; -} - -.mejs-captions-layer a { - color: #fff; - text-decoration: underline; -} - -.mejs-captions-layer[lang=ar] { - font-size: 20px; - font-weight: normal; -} - -.mejs-captions-position { - position: absolute; - width: 100%; - bottom: 15px; - left: 0; -} - -.mejs-captions-position-hover { - bottom: 45px; -} - -.mejs-captions-text { - padding: 3px 5px; - background: url(/img/media/background.png); - background: rgba(20, 20, 20, 0.8); - -} -/* End: Track (Captions and Chapters) */ - -/* Start: Error */ -.me-cannotplay { -} - -.me-cannotplay a { - color: #fff; - font-weight: bold; -} - -.me-cannotplay span { - padding: 15px; - display: block; -} -/* End: Error */ - - -/* Start: Loop */ -.mejs-controls .mejs-loop-off button { - background-position: -64px -16px; -} - -.mejs-controls .mejs-loop-on button { - background-position: -64px 0; -} - -/* End: Loop */ - -/* Start: backlight */ -.mejs-controls .mejs-backlight-off button { - background-position: -80px -16px; -} - -.mejs-controls .mejs-backlight-on button { - background-position: -80px 0; -} -/* End: backlight */ - -/* Start: Picture Controls */ -.mejs-controls .mejs-picturecontrols-button { - background-position: -96px 0; -} -/* End: Picture Controls */ - - -/* context menu */ -.mejs-contextmenu { - position: absolute; - width: 150px; - padding: 10px; - border-radius: 4px; - top: 0; - left: 0; - background: #fff; - border: solid 1px #999; - z-index: 1001; /* make sure it shows on fullscreen */ -} -.mejs-contextmenu .mejs-contextmenu-separator { - height: 1px; - font-size: 0; - margin: 5px 6px; - background: #333; -} - -.mejs-contextmenu .mejs-contextmenu-item { - font-family: Helvetica, Arial; - font-size: 12px; - padding: 4px 6px; - cursor: pointer; - color: #333; -} -.mejs-contextmenu .mejs-contextmenu-item:hover { - background: #2C7C91; - color: #fff; -} - -/* Start: Source Chooser */ -.mejs-controls .mejs-sourcechooser-button { - position: relative; -} - -.mejs-controls .mejs-sourcechooser-button button { - background-position: -128px 0; -} - -.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector { - visibility: hidden; - position: absolute; - bottom: 26px; - right: -10px; - width: 130px; - height: 100px; - background: url(/img/media/background.png); - background: rgba(50,50,50,0.7); - border: solid 1px transparent; - padding: 10px; - overflow: hidden; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul { - margin: 0; - padding: 0; - display: block; - list-style-type: none !important; - overflow: hidden; -} - -.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li { - margin: 0 0 6px 0; - padding: 0; - list-style-type: none !important; - display: block; - color: #fff; - overflow: hidden; -} - -.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input { - clear: both; - float: left; - margin: 3px 3px 0 5px; -} - -.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label { - width: 100px; - float: left; - padding: 4px 0 0 0; - line-height: 15px; - font-family: helvetica, arial; - font-size: 10px; -} -/* End: Source Chooser */ - -/* Start: Postroll */ -.mejs-postroll-layer { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - background: url(/img/media/background.png); - background: rgba(50,50,50,0.7); - z-index: 1000; - overflow: hidden; -} -.mejs-postroll-layer-content { - width: 100%; - height: 100%; -} -.mejs-postroll-close { - position: absolute; - right: 0; - top: 0; - background: url(/img/media/background.png); - background: rgba(50,50,50,0.7); - color: #fff; - padding: 4px; - z-index: 100; - cursor: pointer; -} -/* End: Postroll */ -\ No newline at end of file diff --git a/src/main/less/styles.less b/src/main/less/styles.less @@ -1,4 +1,4 @@ -/********************************************************** +/********************************************************* * Import the files you want to use. This is a custom * version of bootstrap.less with responsive * support included. @@ -38,9 +38,6 @@ // Components: Nav @import "bootstrap/navs.less"; @import "bootstrap/navbar.less"; -@import "bootstrap/breadcrumbs.less"; -@import "bootstrap/pagination.less"; -@import "bootstrap/pager.less"; // Components: Popovers @import "bootstrap/modals.less"; @@ -50,18 +47,11 @@ // Components: Misc @import "bootstrap/thumbnails.less"; @import "bootstrap/media.less"; -@import "bootstrap/labels-badges.less"; -@import "bootstrap/progress-bars.less"; -@import "bootstrap/accordion.less"; @import "bootstrap/carousel.less"; -@import "bootstrap/hero-unit.less"; - -// Media Element -@import "mediaelementplayer.less"; // This needs to be set before the responsive classes when using .navbar-fixed-top; body { - padding-top: 40px; + padding-top: @navbarHeight; // + @emailSignupHeight + 20; } // RESPONSIVE CLASSES @@ -93,152 +83,730 @@ body { // Utility classes @import "bootstrap/utilities.less"; // Has to be last to override when necessary -/*********************************************************** - * Custom styles - ********************************************************** - */ -// @import "custom.less"; -// Override some defaults -html, body { - padding-bottom: 40px; -} -body { overflow-y: scroll; } - -.main-content { - background-color: @white; - padding: 20px; - margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */ - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); - -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); - box-shadow: 0 1px 2px rgba(0,0,0,.15); -} -.hero-unit { - h2 { - font-size: 36px; - } -} +/********************************************* + CUSTOM GOES BELOW! + ***************************************************/ -// FORM FIELD FEEDBACK STATES -// -------------------------- -/** - * Default is to change the color of the help text to the same as the alert. - * This returns help text to original color. - */ -.customFormFieldState(@groupColor) { - .help-block, - .help-inline { - color: lighten(@textColor, 15%); // lighten the text some for contrast - } -} +/* INDEX + -----------------------------------------------------*/ -// Warning -.control-group.warning { - .customFormFieldState(@warningText); -} -// Error -.control-group.error { - .customFormFieldState(@errorText); -} -// Success -.control-group.success { - .customFormFieldState(@successText); -} -// Info -.control-group.info { - .customFormFieldState(@infoText); -} + .readBlue { + color: @readBlue; + font-family: @actaFontFamily; + } -/** - * For coloring id notices - */ -.alert-block { - .warning { - color: @warningText; - } - .error { - color: @errorText; - } - .success { - color: @successText; - } - .info { - color: @infoText; - } -} + .readOrange { + color: @readOrange; + font-family: @actaFontFamily; + } -#user img { - display: inline-block; - width: 20px; - height: 20px; - vertical-align: top; - margin-right: 6px; - border: none; - cursor: pointer; -} + .marketing { + margin-bottom: 100px; + padding: 20px; + text-align: center; + ul.inline > li { padding: 0 30px } + .logo { margin: 50px 0 } + } -#user-header { - line-height: 4em; + @media (min-width: 768px) { + .marketing { + font-size: @marketingFontSize; + line-height: @marketingLineHeight; + .small { font-size: @marketingFontSize * 0.6 } + } + } - img { - display: inline-block; - vertical-align: middle; - margin-right: 6px; - border: none; - cursor: pointer; - } + #email-signup { + text-align: center; + padding: 20px; + .border-radius(0px 0px 25px 25px); - h3 { - display: inline-block; + button, input { margin: 0 } + .box-shadow(0 1px 4px rgba(0, 0, 0, 0.065)); + border: 1px solid @navbarBorder; + border-top: 0; + background-color: @navbarBackground; + min-height: @emailSignupHeight; } -} -div.gravatar { - float:left; - margin-left:10px; - max-width: 320px; + @media (min-width: 768px) { + @sideBorderThickness: 13px; + div.b-left, div.b-right { width: @sideBorderThickness } + div.b-bottom { height: @sideBorderThickness } + } + @media (max-width: 767px) { + @sideBorderThickness: 4px; + div.b-left, div.b-right { width: @sideBorderThickness } + div.b-bottom { height: @sideBorderThickness } + } + + #border { + div { + position: fixed; + z-index: 1035; + } - img { - padding-top:10px; - } -} -// fixes gap between navbar and section below it -@media (max-width: @navbarCollapseWidth) { - .navbar-fixed-top { - margin-bottom: 0px; + .background-gradient() { + background: rgb(91,193,233); + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzViYzFlOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUlIiBzdG9wLWNvbG9yPSIjNTU1NTU1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==); + background: -moz-linear-gradient(top, rgba(91,193,233,1) 0%, rgba(85,85,85,1) 5%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(91,193,233,1)), color-stop(5%,rgba(85,85,85,1))); + background: -webkit-linear-gradient(top, rgba(91,193,233,1) 0%,rgba(85,85,85,1) 5%); + background: -o-linear-gradient(top, rgba(91,193,233,1) 0%,rgba(85,85,85,1) 5%); + background: -ms-linear-gradient(top, rgba(91,193,233,1) 0%,rgba(85,85,85,1) 5%); + background: linear-gradient(to bottom, rgba(91,193,233,1) 0%,rgba(85,85,85,1) 5%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5bc1e9', endColorstr='#555555',GradientType=0 ); + } + + div.b-left { + top: 0; + left: 0; + height: 100%; + .background-gradient(); + } + + div.b-right { + top: 0; + right: 0; + height: 100%; + .background-gradient(); + } + + div.b-top { + top: 0; + height: 4px; + width: 100%; + background-color: @readBlue; + } + + div.b-bottom { + bottom: 0; + width: 100%; + background-color: @gray; + } + + .navbar-fixed-top { top: 4px } } -} -.signup-overlay { - position: absolute; - left: 0; - top: @navbarHeight + 40; - z-index: 1010; - background-color:#fff; -} -#writer-list { - label { - display: inline-block; - cursor: pointer; - img { - width: 100px; - height: 100px; - padding: 3px; +/* BLOG PROFILE + -------------------------------------------------------*/ + @writersListImgSize: 200px; + @writersListHeight: 50 + @writersListImgSize; + + .writer-edit-area { + @padding: 30px; + width: @boxedArticlesWidth - (@padding * 2); + height: @writersListHeight; + background-color: @bodyBackground; + position: absolute; + padding: 0 @padding; + .header { + margin: 30px 0; + .name { + font-size: 35px; + margin-right: 30px; + } + } + } + + #blog-img { + img { + width:200px; + height:200px; + border-radius:5px; + } + } + #blog-url { font-size: 16px; line-height: 34px; } + + + @media (min-width: 450px) { + #blog-writers { + .viewport { height: @writersListHeight; } + .blog-writer img { width: @writersListImgSize; height: @writersListImgSize; } + } + } + @media (max-width: 449px) { + #blog-writers { + margin-bottom: 30px; + .viewport { height: @writersListHeight * 0.5; } + .blog-writer img { width: @writersListImgSize * 0.5; height: @writersListImgSize * 0.5; } + .blog-writer .name { font-size: 80% } + } + } + + #blog-writers { + a { cursor: pointer } + .blog-writer { + float: left; + .name { text-align: center } + } + .viewport { + overflow: hidden; + position: relative; + + .overview { + list-style: none; + // width is set in ajax call + padding: 0; + margin: 0; + position: absolute; + left: 0; + top: 0; + } + } + + + + .scrollbar { + position: relative; + clear: both; + height: 10px; + + .track { + width: 100%; + position: relative; + } + + .thumb { + background-color: @grayLight; + height: 10px; + cursor: pointer; + overflow: hidden; + position: absolute; + left: 0; + .border-radius(30px); + + .end { + overflow: hidden; + height: 25px; + width: 5px; + } + } + } + + + } + + +/* USER PROFILE + ------------------------------------------------------*/ + + #profile { + background-color: @bodyBackground; + #profile-inner { + padding: 0 30px 30px 30px; + } + #profile-img img { .border-radius(0 0 5px 5px); } + } + + #bg { + position: fixed; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + z-index: -2; + + img { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 50%; + height: 50%; + } + } + + #intro-vid { + img.yt { + width: 70px; + margin-left: 20px; + margin-bottom: 20px; + } + } + + .editable-page #profile-inner { + input, select, textarea{ + color: @textColor; + &:focus { color: @textColor } + } + input, textarea { + text-align: center; + background-color: transparent; + .border-radius(0); + .background-clip(padding-box); + .box-shadow(0 0 0 rgba(0, 0, 0, 0)); + border-top: none; + border-left: none; + border-right: none; + padding: 1px; + + &:focus { + .box-shadow(0px 0px 0px rgba(0, 0, 0, 0)); + } + } + input { + width: @boxedArticlesWidth - 200; // 200px fudge + height: auto; + } + textarea { + width: 100%; + height: 50px; + } + } + + + @media (min-width: 450px) { + #user-name, #blog-name { + font-size: 70px; + line-height: 80px; + input[type="text"] { + font-size: 70px; + line-height: 70px; + } + } + } + @media (max-width: 449px) { + #user-name, #blog-name { + font-size: 70px * 0.6; + line-height: 80px * 0.6; + input[type="text"] { + font-size: 70px * 0.6; + line-height: 70px * 0.6; + width: 300px; + } + } + } + + div#user-about, div#blog-description { + overflow: hidden; + padding: 0 100px; + background: transparent; + padding-top:0; + padding-bottom:0; + } + + #user-follow { + a { + text-decoration: none; + color: @textColor; + } + img { + margin-bottom: 5px; + } + } + #following-amount { font-size: @baseFontSize * 1.25; } + + @media (min-width: 370px) { & > div { padding: 30px; } } + @media (max-width: 369px) { & > div { padding: 0; } } + + @articlePadding: 100px; + @articleTitleFont: 35px; + @media (min-width: 980px) { + .boxed-articles .article, div#user-about, div#blog-description { padding-left: @articlePadding; padding-right: @articlePadding; } + } + @media (min-width: 768px) and (max-width: 979px) { + .boxed-articles .article, div#user-about, div#blog-description { padding-left: @articlePadding * 0.80; padding-right: @articlePadding * 0.80; } + } + @media (min-width: 450px) and (max-width: 767px) { + .boxed-articles .article, div#user-about, div#blog-description { padding-left: @articlePadding * 0.30; padding-right: @articlePadding * 0.30; } + } + @media (max-width: 449px) { + .boxed-articles .article, div#user-about, div#blog-description { padding-left: @articlePadding * 0.10; padding-right: @articlePadding * 0.10; } + } + @media (min-width: 700px) { + .article iframe { + width: @boxedArticlesWidth - (@articlePadding * 2); + height: (@boxedArticlesWidth - (@articlePadding * 2)) * 0.625; + } + } + @media (max-width: 699px) { + .article iframe { + width: (@boxedArticlesWidth - (@articlePadding * 2)) * 0.36; + height: ((@boxedArticlesWidth - (@articlePadding * 2)) * 0.625) * 0.36; + } + } + @media (min-width: 450px) { + .article { font-size: @fontSizeArticle; } + .article .title a { font-size: @articleTitleFont; } + } + @media (max-width: 449px) { + .article { font-size: @fontSizeArticle * 0.75; } + .article .title a { font-size: @articleTitleFont * 0.6; } + } + + .article { + font-weight: 400; + line-height: @lineHeightArticle; + + // content retrieved from rss is wrapped with content class + .content { + p, div { + margin-bottom: 40px; + } + & > img { + margin: 30px auto; + display: block; + } + a { + color: @textColor; + text-decoration: underline; + &:hover { color: @textColor } + } + li { line-height: @lineHeightArticle; } + iframe { display: block; margin: 0 auto; } + } + } + + .articles { + max-width: 660px; + margin-left: auto; + margin-right: auto; + } + + .boxed-articles { + max-width: @boxedArticlesWidth; + margin-left: auto; + margin-right: auto; + + .article { + padding-top: 50px; + padding-bottom: 50px; + margin-bottom: 70px; + background-color: @white; + + .header { + padding-bottom: 3px; + border-bottom: 3px solid @readBlue; + .writer-name { + font-size: 130%; + vertical-align: bottom; + margin-left: 10px; + } + time { + color: @grayLight; + font-size: @fontSizeSmall; + } + img { + width: 100px; + height: 100px; + } + } + + .title { + text-align: center; + padding-bottom: @lineHeightArticle * 16px; // line height is em + + a { + text-decoration: none; + font-weight: bold; + color: @textColor; + &:hover { + color: @textColor; + text-decoration: none; + } + } + } + } + } + + .userblog-snip { + a { + text-decoration: none; + font-weight: bold; + font-size: 200%; + color: @textColor; + .url { padding-left: 30px; } + &:hover { + color: @textColor; + text-decoration: none; + } + } + } + + #profile-articles-area { + .box-shadow(0px 0 66px rgba(50, 50, 50, 0.05)); + padding: 50px 0 0 0; + background-color: @bodyBackground; + z-index: 10; + } + + .up-separate { + margin-top: 50px; + } + + .writer .info { + padding: 20px 0; + } + + // golden frames for writers + img{ + &.writer { + border:10px ridge gold; + border-radius: 5%; + } + } + + #writers-container .writer { + margin: 20px 0; + .name { + font-size: 150%; + margin: 10px 0; + } + } + + +/* CATEGORIES + -------------------------------------------*/ + + .category.close { + font-size: @baseFontSize * 1.5; + vertical-align: middle; + margin: 0 10px; + } + + .category-add { + margin: 0 20px; + margin-bottom: 15px; + } + + #chosen-categories{ + margin-bottom: 30px; + span { + width: auto; + margin-right: 20px; + } + } + +/* VERIFICATION + ----------------------------------------------------*/ + + #writer-list { + label { + display: inline-block; + cursor: pointer; + min-width:150px; + padding: 20px; + text-align: center; + img { + width: 100px; + height: 100px; + } + input[type="radio"] { display: none; } + } + .selected { background-color: #ccc; } + } + + +/* GALLERY OF WRITERS + ----------------------------------------------------*/ + + #gallery { + @amountOfWriters: 8; + + margin-bottom: 30px; + + .container { + position: relative; + z-index: 9; + + } + + .tab-pane { + //height: 420px; + } + + .tab-content { + + } + + img.bg { + //position: absolute; + //top: @navbarHeight; + //left: 0; + min-width: 100%; + height: 800px; + margin-top: (@gridRowWidth1200 / @amountOfWriters) - 35px; + } + + .gallery-img { + //margin-top: 100px; + img { + width: 500px; + .rotate(10deg); + .box-shadow(0 0 25px rgba(0,0,0,0.6)); + } + } + + .gallery-caption { + .info { + background-color: rgba(0,0,0,0.4); + .border-radius(10px); + padding: 30px; + } + position: static; + //margin-top: 200px; + margin-top: -250px; + + h1, h3, h4, p, span, small, .lead { + margin: 0; + line-height: 1.25; + color: @white; + text-shadow: 0 1px 1px rgba(0,0,0,.4); + } + } + + + + #nav-buttons { + //margin-top: -35px; + position: absolute; + top: 0; + left: 0; + display: block; + box-shadow: 0px 0px 1px 4px @bodyBackground; + width: @gridRowWidth1200; + height: @gridRowWidth1200 / @amountOfWriters; + .box-shadow(0px 0px 1px 4px #fff); + a { + display: block; + float: left; + width: @gridRowWidth1200 / @amountOfWriters; + img { width: @gridRowWidth1200 / @amountOfWriters; } + } } - input[type="radio"] { display: none; } } - .selected { background-color: #ccc; } -} -.alert ul { - list-style: none; - margin-bottom: 0; -} -\ No newline at end of file + + + + +/* MY FIXES + -----------------------------------------------------------*/ + + #features, #myblog, #writerswelove { + margin-bottom: @navbarHeight + @emailSignupHeight + 5px; + } + + #notices-container { + position:fixed; + top: @navbarHeight * 2; + left: 0; + width: 10px; + min-height: 100px; + z-index: @zindexNotice; + + .alert { + min-width: 10%; + width: 200px; + min-height: 100px; + } + } + + #notices-container-top { + position:fixed; + top: @navbarHeight; + width: 50.5%; + left: 62.25%; + margin: 0 0 0 -37.5%; + height: 0; + z-index: @zindexNotice; + + .alert { + .border-radius(0px 0px 25px 25px); + button, input { margin: 0 } + .box-shadow(0 1px 4px rgba(0, 0, 0, 0.065)); + } + } + + .control-group { + margin: 0; + .controls > .notice-block { + font-size: 13px; + ul { + list-style: none; + margin: 0; + li { text-align: left } + } + } + } + + .alert ul { + list-style: none; + margin-bottom: 0; + } + + body { overflow-y: scroll; } + footer { + margin-top: 50px; + padding-bottom: 5%; + text-align: center; + background-color: @gray; + color: @white; + a { + color: @white; + &:hover{ color: @white } + } + } + + .navbar-form { + input, .btn { margin-bottom: 10px; } + } + + .btn-bold { font-weight: bold } + + .nolink-decoration * { + &, &:hover, &:focus { + color: @textColor; + text-decoration: none; + } + } + + + /****************** + BELOW IS BY ELTIMN + *******************/ + + // FORM FIELD FEEDBACK STATES + // -------------------------- + + /** + * Default is to change the color of the help text to the same as the alert. + * This returns help text to original color. + */ + .customFormFieldState(@groupColor) { + .help-block, + .help-inline { + color: lighten(@textColor, 15%); // lighten the text some for contrast + } + } + + .control-group.warning { + &.warning { .customFormFieldState(@warningText); } + &.error { .customFormFieldState(@errorText); } + &.success { .customFormFieldState(@successText); } + &.info { .customFormFieldState(@infoText); } + } + + .alert-block { + .warning { color: @warningText; } + .error { color: @errorText; } + .success { color: @successText; } + .info { color: @infoText; } + } + + + // fixes gap between navbar and section below it + @media (max-width: @navbarCollapseWidth) { + .navbar-fixed-top { + margin-bottom: 0px; + } + } +\ No newline at end of file diff --git a/src/main/less/variables.less b/src/main/less/variables.less @@ -2,10 +2,11 @@ // Variables // -------------------------------------------------- - // Global values // -------------------------------------------------- +@readBlue: #5bc1e9; +@readOrange: #fb850b; // Grays // ------------------------- @@ -15,6 +16,7 @@ @gray: #555; @grayLight: #999; @grayLighter: #eee; +@grayLightest: #f2f2f2; @white: #fff; @@ -28,29 +30,32 @@ @orange: #f89406; @pink: #c3325f; @purple: #7a43b6; - +@gold: #ffd700; // Scaffolding // ------------------------- -@bodyBackground: @white; +@bodyBackground: @grayLightest; @textColor: @grayDark; // Links // ------------------------- -@linkColor: #08c; +@linkColor: @readBlue; //#08c; @linkColorHover: darken(@linkColor, 15%); // Typography // ------------------------- +@fftisaFontFamily: "ff-tisa-web-pro"; // typekit (or use tk-ff-tisa-web-pro class) +@actaFontFamily: "acta-poster-swashes"; // typekit (or use tk-acta-poster-swashes class) +@baskFontFamily: "Open Baskerville 0.0.53"; // openFontDb @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; @serifFontFamily: Georgia, "Times New Roman", Times, serif; @monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace; -@baseFontSize: 14px; -@baseFontFamily: @sansFontFamily; -@baseLineHeight: 20px; +@baseFontSize: 18px; // 100% + 2px +@baseFontFamily: @fftisaFontFamily; //@sansFontFamily; //@baskFontFamily; +@baseLineHeight: 30px; @altFontFamily: @serifFontFamily; @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily @@ -60,15 +65,17 @@ // Component sizing // ------------------------- -// Based on 14px font-size and 20px line-height +@boxedArticlesWidth: 800px; +@fontSizeArticle: 22px; +@lineHeightArticle: 2; -@fontSizeLarge: @baseFontSize * 1.25; // ~18px -@fontSizeSmall: @baseFontSize * 0.85; // ~12px -@fontSizeMini: @baseFontSize * 0.75; // ~11px +@fontSizeLarge: @baseFontSize * 1.25; +@fontSizeSmall: @baseFontSize * 0.85; +@fontSizeMini: @baseFontSize * 0.75; @paddingLarge: 11px 19px; // 44px @paddingSmall: 2px 10px; // 26px -@paddingMini: 1px 6px; // 24px +@paddingMini: 0 6px; // 22px @baseBorderRadius: 4px; @borderRadiusLarge: 6px; @@ -86,13 +93,13 @@ // ------------------------- @btnBackground: @white; @btnBackgroundHighlight: darken(@white, 10%); -@btnBorder: #bbb; +@btnBorder: #ccc; @btnPrimaryBackground: @linkColor; @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%); -@btnInfoBackground: #5bc0de; -@btnInfoBackgroundHighlight: #2f96b4; +@btnInfoBackground: @readOrange; //#5bc0de; +@btnInfoBackgroundHighlight: spin(@btnInfoBackground, 10%); //#2f96b4; @btnSuccessBackground: #62c462; @btnSuccessBackgroundHighlight: #51a351; @@ -109,11 +116,11 @@ // Forms // ------------------------- -@inputBackground: @white; +@inputBackground: #F4F4F4; @inputBorder: #ccc; @inputBorderRadius: @baseBorderRadius; @inputDisabledBackground: @grayLighter; -@formActionsBackground: #f5f5f5; +@formActionsBackground: @bodyBackground; @inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border @@ -126,7 +133,7 @@ @dropdownLinkColor: @grayDark; @dropdownLinkColorHover: @white; -@dropdownLinkColorActive: @dropdownLinkColor; +@dropdownLinkColorActive: @white; @dropdownLinkBackgroundActive: @linkColor; @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive; @@ -143,6 +150,7 @@ // Try to avoid customizing these :) @zindexDropdown: 1000; @zindexPopover: 1010; +@zindexNotice: 1020; @zindexTooltip: 1030; @zindexFixedNavbar: 1030; @zindexModalBackdrop: 1040; @@ -177,10 +185,10 @@ // Navbar // ------------------------- -@navbarCollapseWidth: 768px; +@navbarCollapseWidth: 979px; @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; -@navbarHeight: 40px; +@navbarHeight: 50px; @navbarBackgroundHighlight: #ffffff; @navbarBackground: darken(@navbarBackgroundHighlight, 5%); @navbarBorder: darken(@navbarBackground, 12%); @@ -213,6 +221,15 @@ @navbarInverseBrandColor: @navbarInverseLinkColor; +// Email Sign up +// ------------------------- +@emailSignupHeight: 80px; + +// Marketing +// ------------------------- +@marketingFontSize: 55px; +@marketingLineHeight: 70px; + // Pagination // ------------------------- diff --git a/src/main/resources/props/default.props b/src/main/resources/props/default.props @@ -10,4 +10,8 @@ aws.s3.bucket= mongo.default.url= mongo.default.user= -mongo.default.pwd= -\ No newline at end of file +mongo.default.pwd= + +wordpress.baseurl= +wordpress.key= +wordpress.secret= diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala @@ -16,7 +16,7 @@ import net.liftmodules.extras.{Gravatar, LiftExtras} import net.liftmodules.mongoauth.MongoAuth import net.liftweb.http.SHtml.ChoiceHolder import net.liftweb.sitemap.SiteMap -import com.joereader.lib.ImageUpload +import net.liftweb.http.js.jquery.JqJsCmds.FadeIn /** * A class that's instantiated early and run. It allows the application @@ -32,7 +32,7 @@ class Boot extends Loggable { // init auth-mongo MongoAuth.authUserMeta.default.set(User) MongoAuth.loginTokenAfterUrl.default.set(Site.password.url) - MongoAuth.siteName.default.set("Joe Reader") + MongoAuth.siteName.default.set("Read Means") MongoAuth.systemEmail.default.set(SystemUser.user.email.is) MongoAuth.systemUsername.default.set(SystemUser.user.name.is) diff --git a/src/main/scala/com/joereader/config/Site.scala b/src/main/scala/com/joereader/config/Site.scala @@ -2,13 +2,15 @@ package com.joereader package config import model._ +import lib._ import net.liftweb._ import net.liftweb.http.{Templates, S} import sitemap._ import sitemap.Loc._ -import net.liftmodules.mongoauth.{MongoAuth, Locs} +import net.liftmodules.mongoauth.Locs +import net.liftweb.common.{Box, Full} object MenuGroups { val SettingsGroup = LocGroup("settings") @@ -32,20 +34,46 @@ object Site extends Locs { // locations (menu entries) val home = MenuLoc(Menu.i("Home") / "index" >> TopBarGroup) - val about = MenuLoc(Menu.i("About") / "about" >> TopBarGroup) + val purpose = MenuLoc(Menu.i("Purpose") / "purpose" >> TopBarGroup) val login = MenuLoc(Menu.i("Login") / "login" >> RequireNotLoggedIn) val loginToken = MenuLoc(buildLoginTokenMenu) val inviteToken = MenuLoc(buildInviteTokenMenu) val logout = MenuLoc(buildLogoutMenu) - private val userProfileParamMenu = Menu.param[User]("User", "Profile", - User.findByUsername _, _.username.is) / * >> TemplateBox(() => Templates("user" :: Nil)) + val wordpressSignIn = MenuLoc(Wordpress.buildWordpressSignInMenu) + val wordpressCallback = MenuLoc(Wordpress.buildWordpressCallbackMenu) + + private val userProfileParamMenu = Menu.param[User]("User", "User Profile", + User.findByUsername, _.username.is) / * >> TemplateBox(() => Templates("user" :: Nil)) lazy val userProfileLoc = userProfileParamMenu.toLoc - private val blogProfileParamMenu = Menu.param[Blog]("Blog", "Profile", - Blog.findByBlogName _, _.blogname.is) / "blog" + private val userPreviewParamMenu = Menu.param[User]("User Preview", "User Preview", + User.findByUsername, _.username.is) / * / "preview" >> TemplateBox(() => Templates("preview" :: Nil)) + lazy val userPreviewLoc = userPreviewParamMenu.toLoc + + private val userFollowingParamMenu = Menu.param[User]("User Following", "User Following", + User.findByUsername, _.username.is) / * / "following" >> TemplateBox(() => Templates("following" :: Nil)) + lazy val userFollowingLoc = userFollowingParamMenu.toLoc + + private val blogProfileParamMenu = Menu.param[Blog]("Blog", "Blog Profile", + Blog.findByBlogName, _.blogname.is) / "blog" lazy val blogProfileLoc = blogProfileParamMenu.toLoc + + case class BlogWriterContent(blog: Blog, writer: BlogWriter) + object BlogWriterContent { + def parse(p: List[String]): Box[BlogWriterContent] = + for{ + blog <- Blog.findByBlogName(p(0)) + blogWriter <- blog.writer(p(1).replace('+',' ')) + } yield BlogWriterContent(blog, blogWriter) + + def encode(bw: BlogWriterContent): List[String] = bw.blog.blogname.get :: bw.writer.name.get :: Nil + } + private val blogWriterProfileParamMenu = Menu.params[BlogWriterContent]("Blog Writer", "Blog Writer", + BlogWriterContent.parse, BlogWriterContent.encode) / "blog" / * / * >> TemplateBox(() => Templates("blogwriter" :: Nil)) + lazy val blogWriterProfileLoc = blogWriterProfileParamMenu.toLoc + val signUp1 = MenuLoc(Menu.i("Sign Up ⋅ Writer") / "signup" / "writer" >> RequireNotLoggedIn) val signUp2 = MenuLoc(Menu.i("Sign Up ⋅ Verify") / "signup" / "verify" >> RequireNotLoggedIn) val signUp3 = MenuLoc(Menu.i("Sign Up ⋅ Categories") / "signup" / "categories" >> RequireLoggedIn) @@ -58,29 +86,27 @@ object Site extends Locs { val password = MenuLoc(Menu.i("Password Reset") / "settings" / "password" >> RequireLoggedIn >> Hidden) val editAccount = MenuLoc(Menu.i("Account") / "settings" / "account" >> SettingsGroup >> RequireLoggedIn) val editBlogs = MenuLoc(Menu.i("Blogs") / "settings" / "blogs" >> SettingsGroup >> RequireLoggedIn) + val editFollowing = MenuLoc(Menu.i("Following") / "settings" / "following" >> SettingsGroup >> RequireLoggedIn) val blogVerify = MenuLoc(Menu.i("Blog Verification") / "settings" / "verify" >> RequireLoggedIn) - private val editBlogParamMenu = Menu.param[Blog]("Edit Blog", "Settings", - Blog.findByBlogName _, _.blogname.is) / "settings" / "blog" / * >> TemplateBox(() => Templates("settings" :: "blog" :: Nil)) >> RequireLoggedIn - lazy val editBlogLoc = editBlogParamMenu.toLoc - private val categoriesParamMenu = Menu.param[Blog]("Categories", "Categories", - Blog.findByBlogName _, _.blogname.is) / "settings" / "blog" / * / "categorize" >> TemplateBox(() => Templates("settings" :: "categories" :: Nil)) >> RequireLoggedIn + Blog.findByBlogName, _.blogname.is) / "settings" / "blog" / * / "categorize" >> TemplateBox(() => Templates("settings" :: "categories" :: Nil)) >> RequireLoggedIn lazy val categoriesLoc = categoriesParamMenu.toLoc - val register = MenuLoc(Menu.i("Register") / "register" >> RequireNotLoggedIn) - val passwordRecovery = MenuLoc(Menu.i("Password Recovery") / "help" / "recovery" >> RequireNotLoggedIn) + val bloggerHelp = MenuLoc(Menu.i("Help Verify Blogger") / "help" / "verify" / "blogger") + val tumblrHelp = MenuLoc(Menu.i("Help Verify Tumblr") / "help" / "verify" / "tumblr") private def menus = List( + userPreviewParamMenu, + userFollowingParamMenu, + blogWriterProfileParamMenu, userProfileParamMenu, blogProfileParamMenu, - editBlogParamMenu, categoriesParamMenu, home.menu, - about.menu, + purpose.menu, login.menu, - register.menu, loginToken.menu, inviteToken.menu, logout.menu, @@ -94,8 +120,13 @@ object Site extends Locs { editAccount.menu, password.menu, editBlogs.menu, + editFollowing.menu, blogVerify.menu, passwordRecovery.menu, + bloggerHelp.menu, + tumblrHelp.menu, + wordpressSignIn.menu, + wordpressCallback.menu, error.menu, notFound.menu, Menu.i("Throw") / "throw" >> EarlyResponse(() => throw new Exception("This is only a test.")) @@ -120,4 +151,6 @@ object Site extends Locs { protected def inviteTokenLocParams = EarlyResponse(() => User.meta.handleInviteToken) :: Nil + + def isMarketingPage(path: String): Boolean = List(home.url, purpose.url, notFound.url, "/").exists(path matches _) } diff --git a/src/main/scala/com/joereader/lib/Helper.scala b/src/main/scala/com/joereader/lib/Helper.scala @@ -26,6 +26,20 @@ object Helper { val ext = "htm" :: "html" :: "php" :: "php3" :: "jsp" :: "asp" :: "phtml" :: "shtm" :: "shtml" :: "cgi" :: "cfm" :: "cfml" :: Nil + def urlWithoutQueryParams(p: String*): String = { + val sep = in.split("\\?") + if(sep.size < 2) this.toString + else { + val params = sep.last.split("&") + this.toString + "?" + + params.map{ param => + val key = param.split("=").head + if(p.exists(_ == key)) "" + else param + }.filterNot(_ == "").mkString("&") + } + } + def removeFileExtension(p: String) = { val arr = p.split("""\.""") val last = arr.lastOption.getOrElse("") diff --git a/src/main/scala/com/joereader/lib/ImageUpload.scala b/src/main/scala/com/joereader/lib/ImageUpload.scala @@ -10,6 +10,8 @@ import com.joereader.model._ import concurrent.ExecutionContext.Implicits.global import com.joereader.snippet.SnipHelpers.UpdateImg import com.joereader.snippet.SnipHelpers +import net.liftweb.http.js.JsCmds.Run +import net.liftweb.http.js.JE.{Str, Call} object ImageUpload extends RestHelper with Logger { @@ -51,7 +53,6 @@ object ImageUpload extends RestHelper with Logger { ResponseWithReason(BadResponse(), "Image is too big. Must be 2MB or smaller.") else { - var id, img = "" for(user <- User.currentUser; file <- req.uploadedFiles) { val fn = StringHelpers.randomString(32) @@ -63,19 +64,15 @@ object ImageUpload extends RestHelper with Logger { if(imgType == "bg") { if(user.bgImg.is != "") {val s3f = s3.deleteFile(user.bgImg.is)} user.bgImg(fn).update - id = SnipHelpers.imgBgId - img = s3.fileUrl(fn) } else { if(user.img.is != "") {val s3f = s3.deleteFile(user.img.is)} user.img(fn).update - id = SnipHelpers.imgProfileId - img = s3.fileUrl(fn) } info("Successfully saved: "+file.fileName+" for "+user.name.is) } } - JavaScriptResponse(UpdateImg(id,img)) + OkResponse() } @@ -104,7 +101,6 @@ object ImageUpload extends RestHelper with Logger { ResponseWithReason(BadResponse(), "Image is too big. Must be 2MB or smaller.") else { - var id, img = "" for(blog <- blog; file <- req.uploadedFiles) { val fn = StringHelpers.randomString(32) @@ -116,19 +112,15 @@ object ImageUpload extends RestHelper with Logger { if(imgType == "bg") { if(blog.bgImg.is != "") {val s3f = s3.deleteFile(blog.bgImg.is)} blog.bgImg(fn).update - id = SnipHelpers.imgBgId - img = s3.fileUrl(fn) } else { if(blog.img.is != "") {val s3f = s3.deleteFile(blog.img.is)} blog.img(fn).update - id = SnipHelpers.imgProfileId - img = s3.fileUrl(fn) } info("Successfully saved: "+file.fileName+" for "+blog.name.is) } } - JavaScriptResponse(UpdateImg(id,img)) + OkResponse() } } } diff --git a/src/main/scala/com/joereader/lib/Wordpress.scala b/src/main/scala/com/joereader/lib/Wordpress.scala @@ -0,0 +1,116 @@ +package com.joereader.lib + +import net.liftweb.util.Props +import dispatch._ +import net.liftweb.http._ +import net.liftweb.json.JsonParser +import concurrent.ExecutionContext.Implicits.global +import net.liftweb.sitemap.{Loc, Menu} +import net.liftweb.sitemap.Loc.EarlyResponse +import net.liftweb.common.{Full, Box} +import com.joereader.lib.Helper.URLFormatter +import scala.collection.immutable.SortedMap + +// Used between signin and callback time (please reset after done using it) +object WordpressInfo extends SessionVar(new Wordpress) + +class Wordpress { + + var accessToken = "" + var clientCallback = "" + var username = "" // wp username is author in rss feed + var blogJsonUrl = "" // link to json of the blog site username writes for + var blogUrl = "" // url entered by user (in verification) + + def signIn : Box[LiftResponse] = { + val req = :/(Wordpress.host).secure / "oauth2" / "authorize" <<? Map( + "client_id" -> Wordpress.key, + "redirect_uri" -> Wordpress.callback, + "response_type" -> "code" + ) + Full(DoRedirectResponse(req.url)) + } + + def callback(): Box[LiftResponse] = { + val code = S.param("code") openOr "" + + val req = :/(Wordpress.host).secure / "oauth2" / "token" << Map( + "client_id" -> Wordpress.key, + "redirect_uri" -> Wordpress.callback, + "client_secret" -> Wordpress.secret, + "code" -> code, + "grant_type" -> "authorization_code" + ) + + val res = Http(req OK as.String).option + + res().map { jsonStr => + val json = JsonParser.parse(jsonStr) + accessToken = (json \ "access_token").values.toString + } + + Full(RedirectWithState(clientCallback, RedirectState(() => { + S.notice("Try Verifying Now! Click the Verify button below.") + }))) + } + + def validateToken: Boolean = { + if(accessToken.isEmpty) false + else { + val req = :/(Wordpress.host).secure / "rest" / "v1" / "me" <:< Map("Authorization" -> ("Bearer "+accessToken)) + try{ + val json = Http(req OK as.String).option + if(json().isDefined) { + json().map{jsonStr => + val json = JsonParser.parse(jsonStr) + username = (json \ "username").values.toString + blogJsonUrl = (json \ "meta" \ "links" \ "site").values.toString.replaceAll("""\\""","") + } + true + } else false + } + catch { case _: Throwable => false } + } + } + + def isBlogUrl(u: String): Boolean = { + val req = url(blogJsonUrl) <:< Map("Authorization" -> ("Bearer "+accessToken)) + val json = Http(req OK as.String).option + json().exists { jsonStr => + val json = JsonParser.parse(jsonStr) + val u1 = (json \ "URL").values.toString + URLFormatter(u1).toString == URLFormatter(u).toString + } + } + +} + +object Wordpress { + val baseUrl = Props.get("wordpress.baseurl") openOr S.hostName + val key = Props.get("wordpress.key") openOr "" + val secret = Props.get("wordpress.secret") openOr "" + val callback = baseUrl+"auth/wordpress/callback" + val host = "public-api.wordpress.com" + + def buildWordpressCallbackMenu = Menu(Loc( + "Wordpress Callback", "auth" :: "wordpress" :: "callback" :: Nil, + "wordpress.callback", wordpressCallbackLocParams + )) + + def wordpressCallbackLocParams = + EarlyResponse(() => { + WordpressInfo.is.callback + }) :: Nil + + def buildWordpressSignInMenu = Menu(Loc( + "Wordpress Sign In", "auth" :: "wordpress" :: "signin" :: Nil, + "wordpress.signin", wordpressSignInLocParams + )) + + def wordpressSignInLocParams = + EarlyResponse(() => { + WordpressInfo(new Wordpress) + WordpressInfo.is.clientCallback = S.referer openOr baseUrl + WordpressInfo.is.signIn + }) :: Nil +} diff --git a/src/main/scala/com/joereader/lib/rss/Rss.scala b/src/main/scala/com/joereader/lib/rss/Rss.scala @@ -8,12 +8,16 @@ import com.sun.syndication.io.{XmlReader, SyndFeedInput} import com.sun.syndication.feed.synd.{SyndContent, SyndEntry, SyndFeed} import scala.collection.SortedSet -import com.joereader.lib.Helper._ import java.util.Date import java.text.SimpleDateFormat -import scala.xml.NodeSeq import org.jsoup.safety.Whitelist import net.liftweb.util.PCDataXmlParser +import org.jsoup.select.Elements +import org.jsoup.parser.Tag +import scala.Some +import org.jsoup.nodes.Document +import com.joereader.lib.Helper.URLFormatter +import scala.xml.NodeSeq /** * @@ -31,7 +35,8 @@ object Rss { def response: RSSHtmlResponse = { val req = RSSHtmlResponse(str, "", str) - requestLink(req) + val res = requestLink(Some(req)) + res.getOrElse(req) } /** @@ -62,7 +67,7 @@ object Rss { * @param link the web link to the page. * @return either a failure with a message or successful content as a string */ - private def requestLink(link: String) : Future[Option[String]] = { + def requestLink(link: String) : Future[Option[String]] = { val request = url(URLFormatter(link).toString) Http.configure(_.setFollowRedirects(true).setCompressionEnabled(true))(request OK as.String).option } @@ -72,24 +77,27 @@ object Rss { * Note: Redirects can be handled by dispatch with setFollowRedirects as true, * but we want to retrieve the url of the content. Limit is 5 redirects. */ - private def requestLink(req: RSSHtmlResponse, redirectCount: Int = 0) : RSSHtmlResponse = { + def requestLink(optreq: Option[RSSHtmlResponse], redirectCount: Int = 0) : Option[RSSHtmlResponse] = { - if(req.redirectTo == null || redirectCount > 4) return req + if(optreq.exists(_.redirectTo == null) || redirectCount > 2 ) return optreq + optreq.flatMap { req => val request = url(URLFormatter(req.redirectTo).toString) val response = Http.configure(_.setCompressionEnabled(true))(request > { r=> - RSSHtmlResponse(req.redirectTo, r.getResponseBody, r.getHeader("Location")) - }) - - requestLink(response(), redirectCount+1) + if(r.isRedirected) + RSSHtmlResponse(req.redirectTo, r.getResponseBody, r.getHeader("Location")) + else RSSHtmlResponse(req.redirectTo, r.getResponseBody, null) + }).option + requestLink(response(), redirectCount+1) + } } /** * Finds link(s) to RSS feeds in HTML elements. * @param html html in plain text. */ - private def findRssLinks(html: String): List[String] = { + def findRssLinks(html: String): List[String] = { val document = parseHtml(html) @@ -117,7 +125,7 @@ object Rss { filterByMimeType(headElements(document)))) } - private def findRssLinks(html: Option[String]): List[String] = + def findRssLinks(html: Option[String]): List[String] = html map findRssLinks _ getOrElse Nil /** @@ -125,7 +133,7 @@ object Rss { * @param xml xml as string. * @return a syndicated feed if xml if correctly parsed. */ - private def extractFeed(xml: String): Option[SyndFeed] = try { + def extractFeed(xml: String): Option[SyndFeed] = try { val bytes = new ByteArrayInputStream(xml.getBytes("UTF-8")) val b = new XmlReader(bytes) val a = new SyndFeedInput() @@ -134,11 +142,11 @@ object Rss { h } catch {case _: Throwable => None} - private def extractFeed(link: Option[String]): Option[SyndFeed] = + def extractFeed(link: Option[String]): Option[SyndFeed] = link.map(extractFeed _).flatten - private def parseHtml(html: String): Document = Jsoup.parse(html) - private def headElements(doc: Document): List[Element] = + def parseHtml(html: String): Document = Jsoup.parse(html) + def headElements(doc: Document): List[Element] = doc.head.children.toList case class MetaVerification(metaName: String, metaContent: String, link: String) { @@ -207,27 +215,66 @@ object Rss { links: List[String]) object FeedEntry { - def build(entry: SyndEntry, feedType: String) = FeedEntry(entry.getTitle, entry.getPublishedDate, entry.getAuthor, content(entry, feedType)) + def build(entry: SyndEntry, feedType: String) = FeedEntry( + guid(entry), entry.getTitle, entry.getLink, entry.getPublishedDate, entry.getAuthor, content(entry, feedType)) + + def build(entries: List[SyndEntry], feedType: String): List[FeedEntry] = entries.map(build(_, feedType)) def build(entries: Option[List[SyndEntry]], feedType: String): List[FeedEntry] = entries.map(build(_, feedType)).getOrElse(Nil) - def content(entry: SyndEntry, feedType: String): String = - if(feedType.startsWith("rss")) entry.getDescription.getValue - else entry.getContents.asInstanceOf[java.util.List[SyndContent]].toList(0).getValue + def content(entry: SyndEntry, feedType: String): NodeSeq = { + val content = entry.getContents.asInstanceOf[java.util.List[SyndContent]].headOption.map(_.getValue). + getOrElse(entry.getDescription.getValue) + + val whitelist = Whitelist.relaxed. + addTags("iframe"). + addAttributes("iframe", "src", "frameborder", "allowfullscreen"). + addEnforcedAttribute("a", "rel", "nofollow") + + val unsanitized = Jsoup.parse("<div>"+content+"</div>").body + val imgUnsanitized = formatImages(unsanitized) + val vidUnsanitized = formatVideos(imgUnsanitized) + val semisanitized = Jsoup.clean(vidUnsanitized.toString, whitelist) + val sanitized = Jsoup.parse(semisanitized).body.children.addClass("content") + PCDataXmlParser(sanitized.toString) openOr NodeSeq.Empty + } + + def formatImages(content: Element): Element = { + val imgs: Elements = content.select("img") + for(img <- imgs) { + try { + val link = URLFormatter(img.attr("src")).urlWithoutQueryParams("w","width","h","height","crop","size","s") + img.attr("src", link) + if(!img.attr("width").isEmpty && img.attr("width").toInt > 25) img.attr("width", "") + if(!img.attr("height").isEmpty && img.attr("height").toInt > 25) img.attr("height", "") + } catch { case _: Throwable => } + } + content + } + + def formatVideos(content: Element): Element = { + + def emptyElem = new Element(Tag.valueOf("span"),"") + + val iframes: Elements = content.select("iframe") + val validSrc = "http://www.youtube.com/embed/" :: Nil + + for(iframe <- iframes) { + try { + val src = iframe.attr("src") + if(validSrc.exists(s => src.startsWith(s))) iframe.html("") // empty frame but keep attr + else iframe.replaceWith(emptyElem) + } catch { case _: Throwable => } + } + content + } + + def guid(entry: SyndEntry): String = { + if(entry.getUri == "" || entry.getUri == null) entry.getTitle + entry.getPublishedDate + else entry.getUri + } } - case class FeedEntry(title: String, date: Date, author: String, content: String) { + case class FeedEntry(id: String, title: String, link: String, date: Date, author: String, content: NodeSeq) { val df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") - - def toForm: NodeSeq = - <div class="article"> - <div class="title">{title}</div> - <div class="author">{author}</div> - <time class="timeago" datetime={df.format(date)}></time> - <div class="content">{ - val unsanitized = Jsoup.parse("<div>"+content+"</div>").body.toString - val semisanitized = Jsoup.clean(unsanitized, Whitelist.relaxed) - PCDataXmlParser(semisanitized) openOr NodeSeq.Empty - }</div> - </div> } } \ No newline at end of file diff --git a/src/main/scala/com/joereader/model/Blog.scala b/src/main/scala/com/joereader/model/Blog.scala @@ -61,7 +61,7 @@ class Blog private () extends MongoRecord[Blog] with ObjectIdPk[Blog] { else this } - def removeWriter(bw: BlogWriter) = writers(writers.get.filter(_.user.is != bw.user.is)) + def removeWriter(bw: BlogWriter) = writers(writers.get.filter(_.name.get != bw.name.get)) def removeWriter(n: String) = writers(writers.get.filter(_.name.is != n)) def writersNames: List[String] = writers.is.map(_.name.is) @@ -78,6 +78,12 @@ class Blog private () extends MongoRecord[Blog] with ObjectIdPk[Blog] { case None => Empty } + def writer(user: User): Box[BlogWriter] = + writers.is.find(_.user.is == user.id.is) match { + case Some(x) => Full(x) + case None => Empty + } + def writerExists(name: String): Boolean = writers.is.exists(_.name.is == name) } @@ -116,8 +122,9 @@ class BlogWriter private () extends BsonRecord[BlogWriter] { def hasUser: Boolean = user.is != user.defaultValue def removeUser() {user(user.defaultValue)} - // todo does this go here? object followers extends ObjectIdRefListField(this, User) + def addFollower(user: User) = followers(user.id.get :: followers.get) + def removeFollower(user: User) = followers(followers.get.filterNot(_ == user.id.get)) } object BlogWriter extends BlogWriter with BsonMetaRecord[BlogWriter] diff --git a/src/main/scala/com/joereader/model/User.scala b/src/main/scala/com/joereader/model/User.scala @@ -61,19 +61,59 @@ class User private () extends ProtoAuthUser[User] with ObjectIdPk[User] { object following extends MongoListField[User,String](this) { lazy val separator: String = "~" - def create(writer: BlogWriter, blog: Blog): String = - blog.id.is + following.separator + writer.name.is + def create(writer: BlogWriter, blog: Blog): String = blog.id.is + separator + writer.name.is + def create(user: User): String = user.id.get + separator + "sa" + + def user(n: Int): Box[UserUserBlog] = { + val id = get(n).split(separator).head + val who = get(n).split(separator).tail.mkString + + if(who == "sa") for { + user <- User.findByStringId(id) + userBlog <- user.blogs.get.headOption + } yield UserUserBlog(user, userBlog) // ??? + + else for { + blog <- Blog.findByStringId(id) + blogWriter <- blog.writer(who) + user <- blogWriter.user.obj + userBlog <- user.blog(blog) + } yield UserUserBlog(user, userBlog) + } + + def randomUsers(n: Int): Set[UserUserBlog] = { + val random = Seq.fill(n)(scala.util.Random.nextInt(get.size)).toSet + random.map(user).flatten + } + def allUsers: Set[UserUserBlog] = (0 until get.size).map(user).flatten.toSet } - // todo test follow and unfollow + def follow(writer: BlogWriter, blog: Blog) = { val addMe = following.create(writer,blog) if(!blog.writerExists(writer.name.is) || following.get.exists(_ == addMe)) this else following(addMe :: following.get) } + def follow(user: User) = { + val addMe = following.create(user) + if(following.get.exists(_ == addMe)) this + else following(addMe :: following.get) + } + def unFollow(writer: BlogWriter, blog: Blog) = { - following(following.get.filter(_ != following.create(writer,blog))) + following(following.get.filterNot(_ == following.create(writer,blog))) + } + + def unFollow(user: User) = { + following(following.get.filterNot(_ == following.create(user))) } + + // follow this user to view his shared articles (only if this user is a writer) + object followers extends ObjectIdRefListField(this, User) + + def addFollower(user: User) = followers(user.id.get :: followers.get) + def removeFollower(user: User) = followers(followers.get.filterNot(_ == user.id.get)) + } object User extends User with ProtoAuthUserMeta[User] with Loggable { @@ -169,20 +209,18 @@ object User extends User with ProtoAuthUserMeta[User] with Loggable { S.param("token").flatMap(InviteToken.findByStringId) match { case Full(at) if at.expires.isExpired => at.delete_! - resp = RedirectWithState(indexUrl, RedirectState(() => { S.error("Invite token has expired") })) + resp = RedirectWithState(indexUrl, RedirectState(() => { S.error("Invite token has expired.") })) case Full(at) => val userBoxed = findByEmail(at.email.is) val user: User = userBoxed openOr { createRecord. email(at.email.is). - verified(true). name(at.name.is). - addBlog(UserBlog.createRecord.blog(at.blogId.is)). password(StringHelpers.randomString(20), true). - username(StringHelpers.randomString(15)). - save + username(StringHelpers.randomString(15)) } + user.verified(true).addBlog(UserBlog.createRecord.blog(at.blogId.is)).save val blog = Blog.findByStringId(at.blogId.is.toString) blog.map(_.addWriterSafely(BlogWriter.createRecord.user(user.id.is).name(at.name.is)).save) @@ -192,40 +230,33 @@ object User extends User with ProtoAuthUserMeta[User] with Loggable { blog.map { blog => if(userBoxed.isDefined) resp = RedirectWithState(Site.categoriesLoc.calcHref(blog), RedirectState(() => { - S.notice("Congratulations! You have verified "+blog.name.is+"!") + S.notice("Congratulations! You are verified with "+blog.name.is+"!") })) else resp = RedirectWithState(Site.signUp3.url, RedirectState(() => { BlogIdVar(at.blogId.is.toString) VerifiedVar(true) - S.notice("Congratulations! You have verified "+blog.name.is+"!") + S.notice("Congratulations! You are verified with "+blog.name.is+"!") })) } at.delete_! case _ => - resp = RedirectWithState(indexUrl, RedirectState(() => { S.warning("Invite token not provided") })) + resp = RedirectWithState(indexUrl, RedirectState(() => { S.warning("Invite token is missing.") })) } Full(resp) } - def sendInvite(name: String, email: String, user: User, blog: Blog) { - sendInvite(name, email, Site.home.fullUrl, user, blog) - } def sendInviteToken(name: String, email: String, user: User, blog: Blog) { - val token = InviteToken.create(email, name, blog.id.is) - sendInvite(name, email, token.url, user, blog) - } - - private def sendInvite(name: String, email: String, url: String, user: User, blog: Blog) { import net.liftweb.util.Mailer._ + val token = InviteToken.create(email, name, blog.id.is) val msgTxt = """ |Hi %s, | - |%s has invited you to Joe Reader to become a member of your + |%s has invited you to Read Means to become a member of your |current blog, %s. | |Click below to join: @@ -233,11 +264,11 @@ object User extends User with ProtoAuthUserMeta[User] with Loggable { | |Yours truly, |%s - """.format(name, user.name.is, blog.name.is, url, MongoAuth.systemUsername.vend).stripMargin + """.format(name, user.name.is, blog.name.is, token.url, MongoAuth.systemUsername.vend).stripMargin sendMail( From(MongoAuth.systemFancyEmail), - Subject("%s: Invite to %s".format(user.name.is, MongoAuth.siteName.vend)), + Subject("%s invites you to %s".format(user.name.is, MongoAuth.siteName.vend)), To(email), PlainMailBodyType(msgTxt) ) @@ -281,4 +312,5 @@ class UserBlog private () extends BsonRecord[UserBlog] { } object UserBlog extends UserBlog with BsonMetaRecord[UserBlog] +case class UserUserBlog(user: User, userBlog: UserBlog) diff --git a/src/main/scala/com/joereader/snippet/BlogSnips.scala b/src/main/scala/com/joereader/snippet/BlogSnips.scala @@ -11,17 +11,19 @@ import JE._ import JsCmds._ import util._, Helpers._ -import net.liftmodules.extras.SnippetHelper +import net.liftmodules.extras.{Gravatar, SnippetHelper} import com.joereader._ import com.joereader.model._ import snippet.SnipHelpers._ import lib._, Helper._, rss.Rss._ import config._ +import com.joereader.config.Site.BlogWriterContent -sealed trait BlogSnippet extends SnippetHelper with Loggable { +sealed trait BlogSnippet extends SnippetHelper with Loggable with PageHeader { + val headName = blog.map(_.name.get) getOrElse "" protected def blog: Box[Blog] private def test = true @@ -51,78 +53,146 @@ sealed trait BlogSnippet extends SnippetHelper with Loggable { def bgImg(html: NodeSeq) = serve(html)(blog => "* [src]" #> imageBgUrl(blog))(test, NodeSeq.Empty) - def articles = serve(blog => blog.urlRss.is.head.entries.flatMap(_.toForm))(test, NodeSeq.Empty) + def articles = serve(blog => blog.urlRss.is.head.entries.flatMap(e=> SnipHelpers.blogProfileArticles(e,blog)))(test, NodeSeq.Empty) - def writers = serve(blog => writersList(blog.writers.is, owner = false))(test, NodeSeq.Empty) + def writers = serve(blog => writersList(blog.writers.get, owner = false))(test, NodeSeq.Empty) def writersList(writers: List[BlogWriter], owner: Boolean): NodeSeq = - for(writer <- writers) yield { - val user = User.findByStringId(writer.user.is.toString).openOr(User.createRecord) - val name = writer.name.is + (for(writer <- writers) yield { + val box = User.findByStringId(writer.user.is.toString) + val user = box.openOr(User.createRecord) + val name = if(box.isDefined) user.name.get else writer.name.get val dashName = name.split(" ").mkString("-") + var msg = "" + <div> <div id={"writer-"+dashName} class="blog-writer"> - <img id={"img-"+dashName} src={imageUrl(user)} /> - <span class="name">{name}</span> - <label class="inline">{ - if(!writer.hasUser && User.isLoggedIn) { - <input id={"email-"+dashName} placeholder="email" value={if(owner) writer.email.is else ""} /> - <button onclick={ajaxCall(JsArray(ValById("email-"+dashName), Str(name)), - {if(owner) inviteAsOwner _ else invite _})._2.toJsCmd.toString+"; return false;"} class="btn btn-primary">Invite</button> - } + <a href={ + blog.map { blog => + if(box.isDefined) Site.userProfileLoc.calcHref(user) + else Site.blogWriterProfileLoc.calcHref(BlogWriterContent(blog, writer)) + }.openOr("/") + }><img id={"img-"+dashName} src={image200Url(user)}/></a> + <div class="name">{name} { + if(owner) <span><a onclick={Show("writer-edit-"+dashName).toJsCmd.toString}>Edit</a></span> + }</div> + </div> + <div id={"writer-edit-"+dashName} class="writer-edit-area hide"> + <div class="inline header"> + <div class="name">{name}</div> + <a onclick={Hide("writer-edit-"+dashName).toJsCmd.toString}>Exit</a> + </div> + { + def inviteForm: NodeSeq = + if(!writer.hasUser && owner) { + msg = "Who is "+name+"? Has he registered already? If so, input the email that the person used to" + + " sign up. If he's not registered, we'll send "+name+" an invite. " + + <input type="text" id={"email-"+dashName} placeholder="email" value={writer.email.get} /> + <button onclick={ajaxCall(JsArray(ValById("email-"+dashName), Str(name)), + invite)._2.toJsCmd.toString+"; return false;"} class="btn btn-primary">Invite</button> + } else NodeSeq.Empty + + def removeButton(): NodeSeq = if(owner) { - <button onclick={ajaxCall(Str(name), remove _)._2.toJsCmd.toString+"; return false;"} class="close category">&times;</button> - } - }</label> - </div> - } + msg = msg + "If you would like to remove this name, click remove button. " + <button onclick={ajaxCall(JsArray(Str(writer.name.get), Str(name)), removeAlert)._2.toJsCmd.toString+"; return false;"} class="btn btn-primary">Remove</button> + } else NodeSeq.Empty + + def detachButton(): NodeSeq = + if(owner && writer.hasUser) { + msg = msg + "To remove the user account connected to this name, click Detach User button." + <button id={"detach-btn-"+dashName} onclick={ajaxCall( + JsArray(Str(user.username.get), Str(writer.name.get), Str(name)), detachUserAlert). + _2.toJsCmd.toString+"; return false;"} class="btn btn-primary">Detach User</button> + } else NodeSeq.Empty + + <div class="input-append">{inviteForm ++ removeButton ++ detachButton}</div> + <div class="help-block"><small>{msg}</small></div> + }</div> + </div> + }.toSeq).+:(<style>{"#blog-writers .overview{width:"+(writers.size*200)+"px}"}</style>).flatten.flatten + + def removeAlert(in: String): JsCmd = { + val name = in.split(",").headOption.getOrElse("") + val displayName = in.split(",").tail.headOption.getOrElse("") - def remove(name: String): JsCmd = for(blog <- blog; blogWriter <- blog.writer(name)) { - val msg = s"Are you sure you want to remove $name? ${ - if(blogWriter.hasUser) blogWriter.followers.is.size+"followers will be affected."}" + val followSize = blogWriter.followers.is.size + val msg = s"Are you sure you want to remove $displayName? ${ + if(followSize > 0) followSize +" followers will stop following!" else ""}" S.warning( <div>{msg}</div> <div> - <button onclick={ajaxCall(Str(name), removeForSure _)._2.toJsCmd.toString+"; return false;"} class="btn btn-warning">Yes</button> + <button onclick={ajaxCall(JsArray(Str(name), Str(displayName)), remove). + _2.toJsCmd.toString+"; return false;"} class="btn btn-warning">Yes</button> <button onclick="$(document).trigger('clear-alerts')" class="btn">No</button> </div> ) } + } - def removeForSure(name: String): JsCmd = - for(blog <- blog; blogWriter <- blog.writer(name)) { - if(blogWriter.hasUser) { - blogWriter.removeUser() - blog.save - Noop // todo update writers image with mr_noman (need to create js function) - } else { - blogWriter.followers.objs.par.map(_.unFollow(blogWriter, blog).update) - blog.removeWriter(blogWriter).update - Remove("writer-"+name.split(" ").mkString("-")) - } + def remove(in: String): JsCmd = { + val name = in.split(",").headOption.getOrElse("") + val displayName = in.split(",").tail.headOption.getOrElse("") + + for(blog <- blog; blogWriter <- blog.writer(name)) yield { + blogWriter.followers.objs.par.map(_.unFollow(blogWriter, blog).update) + blog.removeWriter(blogWriter).update + val dashName = displayName.split(" ").mkString("-") + Remove("writer-"+dashName) & Remove("writer-edit-"+dashName) & Hide("writer-edit-"+dashName) } + } - def inviteAsOwner(nameAndEmail: String): JsCmd = { - val name = nameAndEmail.split(",").headOption.getOrElse("") - val email = nameAndEmail.split(",").tail.headOption.getOrElse("") + def detachUserAlert(in: String): JsCmd = { + val username = in.split(",").headOption.getOrElse("") + val name = in.split(",").tail.headOption.getOrElse("") + val displayName = in.split(",").lastOption.getOrElse("") - for(blog <- blog; user <- User.currentUser) - User.sendInviteToken(name, email, user, blog) - Noop + for(blog <- blog) { + S.warning( + <div>Are you sure you want to detach from {blog.name.get}</div> + <div> + <button onclick={ajaxCall(JsArray(Str(username), Str(name), Str(displayName)), detachUser). + _2.toJsCmd.toString+"; return false;"} class="btn btn-warning">Yes</button> + <button onclick="$(document).trigger('clear-alerts')" class="btn">No</button> + </div> + ) + } } + + def detachUser(in: String): JsCmd = { + val username = in.split(",").headOption.getOrElse("") + val name = in.split(",").tail.headOption.getOrElse("") + val displayName = in.split(",").lastOption.getOrElse("") + + for(blog <- blog; user <- User.findByUsername(username)) { + val userblog = user.blog(blog) + userblog.map(ub => user.removeBlog(ub).update) + } + + for(blog <- blog; blogWriter <- blog.writer(name)) yield { + blogWriter.removeUser() + blog.save + val dashName = displayName.split(" ").mkString("-") + UpdateImg("writer-"+dashName+" img", Gravatar.imageUrl("blah")) & + Remove("detach-btn-"+dashName) & Hide("writer-edit-"+dashName) + } + } + def invite(nameAndEmail: String): JsCmd = { - val name = nameAndEmail.split(",").headOption.getOrElse("") - val email = nameAndEmail.split(",").tail.headOption.getOrElse("") + val email = nameAndEmail.split(",").headOption.getOrElse("") + val name = nameAndEmail.split(",").tail.headOption.getOrElse("") for(blog <- blog; user <- User.currentUser) { blog.writer(name).map(_.email(email)) blog.save - User.sendInvite(name, email, user, blog) + User.sendInviteToken(name, email, user, blog) } S.notice(name+" has been invited") } + } trait OwnerBlogSnippet extends BlogSnippet { @@ -130,7 +200,7 @@ trait OwnerBlogSnippet extends BlogSnippet { protected def test = blog.exists(b => User.currentUser.exists(_.id.is == b.owner.is)) override def writers = serve { blog => - writersList(blog.writers.is, owner = true) + writersList(blog.writers.get, owner = true) }(test, super.writers) def name(html: NodeSeq) = serve(html) { blog => @@ -168,6 +238,8 @@ trait OwnerBlogSnippet extends BlogSnippet { "*" #> ajaxText(blog.blogname.is, { s: String => check(s.toLowerCase)}) } (test, super.blogname) + + def surround = "#profile-wrap [class+]" #> (if(test) "editable-page" else "") } object ProfileLocBlog extends OwnerBlogSnippet { @@ -183,11 +255,38 @@ object ProfileLocBlogReq extends OwnerBlogSnippet { protected def blog = Blog.findByStringId(BlogIdVar.is) } -object ProfileLocBlogEdit extends OwnerBlogSnippet { - protected def blog = Site.editBlogLoc.currentValue +object ProfileLocBlogWriter { + + def blogWriterContent: Box[BlogWriterContent] = Site.blogWriterProfileLoc.currentValue + def blog: Box[Blog] = blogWriterContent.map(_.blog) + def blogWriter: Box[BlogWriter] = blogWriterContent.map(_.writer) + + def writerName: String = blogWriter.map(_.name.get).openOr("") + + def articles: NodeSeq = blog.map(blog => blog.urlRss.is.head.entries.filter(_.author == writerName). + flatMap(e=> SnipHelpers.userProfileArticle(e))).openOr(NodeSeq.Empty) + + def followButton: NodeSeq = if(User.isLoggedIn) { + <div><button class="btn btn-primary btn-large"><strong>Follow</strong></button> + <h4>{blogWriter.map(_.followers.get.size).sum} followers</h4></div> + } else NodeSeq.Empty + + def name: NodeSeq = Text(writerName) + def url: NodeSeq = blog.map(b=> Text(b.urlHtml.get)).openOr(NodeSeq.Empty) + + def img = { + "* [id]" #> imgProfileId & + "* [width]" #> imgProfileSize & + "* [src]" #> Gravatar.imageUrl(blogWriter.map(_.email.get).openOr("blah"), imgProfileSize) + } + + def bgImg = { + "* [id]" #> imgBgId & + "* [src]" #> defaultBackground + } } -case class CategoriesSnippet(b: Box[Blog]) extends BlogSnippet { +case class CategoriesSnippet(b: Box[Blog]) extends OwnerBlogSnippet { override protected def blog = b val user: Box[User] = User.currentUser @@ -201,25 +300,43 @@ case class CategoriesSnippet(b: Box[Blog]) extends BlogSnippet { var category = "" def toHtml = serve { blog => - userblog.map { userblog => - <div class="row"> - <div class="span12"> - <a href={Site.editBlogLoc.calcHref(blog)}>{name ++ img(<img/>)}</a><br/>{url} + for { + userblog <- userblog + user <- user + blogWriter <- blog.writer(user) + } yield + <div class="userblog-snip well"> + <div class="row-fluid"> + <div class="span12"> + <a href={Site.blogProfileLoc.calcHref(blog)}> + <span id="blog-img">{img(<img/>)}</span><span class="url">{url}</span> + </a> + </div> + </div> + <div class="row-fluid"> + <div class="span12 up-separate"> + <div>www.readmeans.com/blog/ {blogname(<span></span>)}</div> + <div> + <button id={"detach-btn-"+user.name.get.split(" ").mkString("-")} onclick={ajaxCall( + JsArray(Str(user.username.get), Str(blogWriter.name.get), Str(user.name.get)), detachUserAlert). + _2.toJsCmd.toString+"; return false;"} class="btn btn-primary">Remove Blog</button> + </div> + </div> </div> - <div class="span12 well"> - <form data-lift="form.ajax"> - <label class="inline"> + <div class="row-fluid"> + <div class="span12 up-separate"> + <form data-lift="form.ajax?class=input-append"> {text(category, category = _, "placeholder" -> "Submit New Category", "id" -> "category-input")} {ajaxSubmit("Add", ()=> addCategory(category), "class" -> "btn btn-primary")} - </label> - </form> - <br/> - <label id="chosen-categories" class="inline">{ - userblog.categories.is.flatMap(categoryNode(_)).toSeq - }</label> + </form> + <br/> + <div id="chosen-categories" class="well">{ + userblog.categories.is.flatMap(categoryNode).toSeq + }</div> + </div> </div> + <hr/> </div> - } } (test = true, NodeSeq.Empty) def addCategory(cat: String): JsCmd = { @@ -249,7 +366,7 @@ case class CategoriesSnippet(b: Box[Blog]) extends BlogSnippet { def categoryNode(cat: String): Elem = <span id={"chosen-cat-"+cat.split(" ").mkString("-")} class="uneditable-input">{cat}<button onclick={ - ajaxCall(Str(cat), removeCategory _)._2.toJsCmd.toString.singleQuoteToDouble +"; return false;" + ajaxCall(Str(cat), removeCategory)._2.toJsCmd.toString.singleQuoteToDouble +"; return false;" } class="close category">&times;</button></span> } @@ -259,7 +376,7 @@ class CategoriesSnip { val snip = CategoriesSnippet(blog) def render = { - "#chosen-categories *" #> snip.userblog.map(_.categories.is.map(snip.categoryNode(_))) & + "#chosen-categories *" #> snip.userblog.map(_.categories.is.map(snip.categoryNode)) & "#category-input" #> text(snip.category, snip.category = _) & "#category-add" #> ajaxSubmit("Add", ()=> snip.addCategory(snip.category)) } @@ -274,6 +391,6 @@ class BlogsSnip extends UserSnippet { blogs.flatMap(_.toHtml).toSeq } (test = true, NodeSeq.Empty) - def addBlog = "* [href]" #> Site.blogVerify.url + def addBlog() = "* [href]" #> Site.blogVerify.url } diff --git a/src/main/scala/com/joereader/snippet/LiftExtras.scala b/src/main/scala/com/joereader/snippet/LiftExtras.scala @@ -1,12 +1,14 @@ package com.joereader.snippet -import net.liftweb.util.Props +import net.liftweb.util._, Helpers._ import net.liftmodules.extras._, snippet._ import scala.xml.{Elem, NodeSeq} import com.joereader.model.{Blog, User} import com.joereader.config.S3Config._ import net.liftweb.http.js.{JE, JsCmd} import com.joereader.lib.ImageUpload +import com.joereader.lib.rss.Rss.FeedEntry +import com.joereader.config.{Site, S3Config} object Menus extends BsMenu object Notices extends BsAlerts @@ -24,20 +26,78 @@ object ProductionOnly { else NodeSeq.Empty } +trait PageHeader { + val headName: String + + def title = + <lift:head> + <title lift="Menu.title">{"Read Means: %*% - "+headName}</title> + </lift:head> +} + object SnipHelpers { + val imgProfileSize = 380 val imgProfileId = "img-profile" val imgBgId = "img-bg" - def imageUrl(u: User) = if(u.img.is.nonEmpty) s3.fileUrl(u.img.is) else Gravatar.imageUrl(u.email.is) - def imageUrl(b: Blog) = if(b.img.is.nonEmpty) s3.fileUrl(b.img.is) else Gravatar.imageUrl("blah", 200, "G", "wavatar") - def imageBgUrl(u: User) = if(u.bgImg.is.nonEmpty) s3.fileUrl(u.bgImg.is) else "" - def imageBgUrl(b: Blog) = if(b.bgImg.is.nonEmpty) s3.fileUrl(b.bgImg.is) else "" + def image100Url(u: User) = if(u.img.is.nonEmpty) s3.fileUrl(u.img.is) else Gravatar.imageUrl(u.email.is, 100) + def image200Url(u: User) = if(u.img.is.nonEmpty) s3.fileUrl(u.img.is) else Gravatar.imageUrl(u.email.is, 200) + def imageUrl(u: User, s: Int) = if(u.img.is.nonEmpty) s3.fileUrl(u.img.is) else Gravatar.imageUrl(u.email.is, s) + def imageUrl(b: Blog) = if(b.img.is.nonEmpty) s3.fileUrl(b.img.is) else Gravatar.imageUrl("blah", 500, "G", "wavatar") + def imageBgUrl(u: User) = if(u.bgImg.is.nonEmpty) s3.fileUrl(u.bgImg.is) else defaultBackground + def imageBgUrl(b: Blog) = if(b.bgImg.is.nonEmpty) s3.fileUrl(b.bgImg.is) else defaultBackground + def mrnoman = Gravatar.imageUrl("blah") + def defaultBackground: String = S3Config.s3.fileUrl("bubblegum.jpg") def insertFileUpload(id: String, path: String): NodeSeq = { <input id={id+"-fileupload"} type="file" name="files2[]" data-url={path} accept={ImageUpload.acceptedImages.mkString(",")} /> - <div id={id+"-progress"} style="width:20em; border: 1pt solid silver; display: none"><div id={id+"-progress-bar"} style="background: green; height: 1em; width:0%"></div></div> + <div id={id+"-progress"} style="width:20em; border: 1pt solid silver; display: none"> + <div id={id+"-progress-bar"} style="background: green; height: 1em; width:0%"></div> + </div> + } + + def setNoticeContainer = + "#notices-container [id]" #> (if(SignUp.hideSignup) "notices-container-top" else "notices-container") + + + def blogProfileArticles(entry: FeedEntry, blog: Blog): NodeSeq = { + val blogWriter = blog.writer(entry.author) + + val (name, img, profileLink): (String, String,String) = + (for { + blogWriter <- blogWriter + user <- blogWriter.user.obj + } yield + (user.name.get, image100Url(user), Site.userProfileLoc.calcHref(user))). + openOr((entry.author, mrnoman, "/")) + + if(blogWriter.isDefined) + <div class="article"> + <div class="row-fluid header text-center"> + <div class="span12"> + <a href={profileLink}><img src={img}/></a> + <div class="writer-name nolink-decoration"><a href={profileLink}>{name}</a></div> + <time class="timeago" datetime={entry.df.format(entry.date)}></time> + </div> + </div> + <div class="title"><a href={entry.link} target="_blank">{entry.title}</a></div> + { entry.content } + </div> + else + NodeSeq.Empty } + def userProfileArticle(entry: FeedEntry): NodeSeq = + <div class="article"> + <div class="row-fluid header text-center"> + <div class="span12"> + <time class="timeago" datetime={entry.df.format(entry.date)}></time> + </div> + </div> + <div class="title"><a href={entry.link} target="_blank">{entry.title}</a></div> + { entry.content } + </div> + class JQuery(id: String, func: String, params: String*) extends JsCmd { val script = """$("#%s").%s('%s')""".format(id, func, params.mkString("','")) diff --git a/src/main/scala/com/joereader/snippet/SignUp.scala b/src/main/scala/com/joereader/snippet/SignUp.scala @@ -17,6 +17,7 @@ import scala.xml.NodeSeq object EmailVar extends RequestVar("") object BlogIdVar extends RequestVar("") object VerifiedVar extends RequestVar(false) +object WordpressToken extends RequestVar("") class SignUp { @@ -28,26 +29,32 @@ class SignUp { */ def setupEmail = { - def invitedMsg: JsCmd = S.notice("You've been invited already silly") + def invitedMsg: JsCmd = S.notice("email-join-err", "You've been invited already silly!") - def joinedMsg: JsCmd = S.notice("You joined Joe Reader a while back. " + - "We'll invite you as soon as we're ready!") + def joinedMsg: JsCmd = S.notice("email-join-err", "We'll invite you as soon as we're ready!") - - "#email-join" #> ajaxText(email, {s=> email = s; Noop}) & - "#join-btn" #> ajaxSubmit("Join", () => { + def continue(): JsCmd = { + var js: JsCmd = Noop if(email.isEmail) { if(BetaUser.find(email).isDefined) - joinedMsg & SetValById("email-join", "") + js = joinedMsg & SetValById("email-join", "") else if(User.findByEmail(email).isDefined) - invitedMsg & SetValById("email-join", "") + js = invitedMsg & SetValById("email-join", "") else { BetaUser.createRecord.id(email).save - S.redirectTo(Site.signUp1.url,() => EmailVar(email)) + js = S.redirectTo(Site.signUp1.url,() => EmailVar(email)) } } - else S.error("Please enter a valid email.") - }) + else js = S.error("email-join-err", "Please enter a valid email.") + js + } + + if(SignUp.hideSignup) + "*" #> NodeSeq.Empty + else + "#signup-style *" #> "@media (min-width: 980px) {body{padding-top: 150px}}" & // @navbarHeight + @emailSignupHeight + fudge in less + "#email-join" #> text(email, email = _) & + "#join-btn" #> ajaxSubmit("Join", continue) } /** @@ -58,14 +65,14 @@ class SignUp { assert(email.isEmpty) "#yes-button" #> ajaxSubmit("Yes", () => S.redirectTo(Site.signUp2.url, () => EmailVar(email))) & - "#no-button" #> ajaxSubmit("No", () => S.redirectTo("/")) + "#no-button" #> ajaxSubmit("No ", () => S.redirectTo("/")) } // Third step is blog verification which is handled by // Verification.render. def setupVerification = { assert(email.isEmpty) - "*" #> NodeSeq.Empty + "*" #> NodeSeq.Empty // do nothing only check if theres an email } /** @@ -83,6 +90,7 @@ class SignUp { VerifiedVar(verified) }) + "#blogname" #> blog.map(_.name.is) & "#categories-area" #> Templates("templates-hidden" :: "parts" :: "categories" :: Nil).map{ ns => Site.categoriesLoc.requestValue(blog) ns @@ -147,3 +155,7 @@ class SignUp { def assert(bool: Boolean) { if(bool) S.redirectTo(Site.notFound.url) } } + +object SignUp { + def hideSignup: Boolean = !Site.isMarketingPage(S.uri) || User.isLoggedIn +} diff --git a/src/main/scala/com/joereader/snippet/UserSnips.scala b/src/main/scala/com/joereader/snippet/UserSnips.scala @@ -23,8 +23,15 @@ import com.joereader.snippet.SnipHelpers._ import config._ import lib._, Helper._, rss.Rss._ import net.liftweb.common.Full +import net.liftweb.http.js.JsCmds.SetValById +import net.liftweb.common.Full +import com.joereader.config.Site.BlogWriterContent +import org.bson.types.ObjectId +import net.liftweb.http.js.JsCmds.SetValById +import net.liftweb.common.Full +import net.liftweb.http.js.JE.JsFalse -trait UserSnippet extends SnippetHelper with Loggable { +trait UserSnippet extends SnippetHelper with Loggable{ protected def user: Box[User] @@ -51,8 +58,17 @@ trait ReaderUserSnippet extends UserSnippet { def img(html: NodeSeq) = serve(html){user => "* [id]" #> imgProfileId & - "* [src]" #> imageUrl(user) + "* [width]" #> imgProfileSize & + "* [src]" #> imageUrl(user, imgProfileSize) }(testReaderUserSnippet, NodeSeq.Empty) + + def introVidUrl(html: NodeSeq) = serve(html)(user => + "* [src]" #> ("http://www.youtube.com/embed/"+user.introVid.is+"?autoplay=1&iv_load_policy=3") + )(testReaderUserSnippet, NodeSeq.Empty) + + def previewPage(html: NodeSeq) = serve(html)(user => + "* [href]" #> Site.userPreviewLoc.calcHref(user) + )(testReaderUserSnippet, NodeSeq.Empty) } trait WriterUserSnippet extends UserSnippet { @@ -62,22 +78,87 @@ trait WriterUserSnippet extends UserSnippet { def username = serve(user => Text(user.username.is))(testWriterUserSnippet, NodeSeq.Empty) def about = serve(user => Text(user.about.is))(testWriterUserSnippet, NodeSeq.Empty) - def introVid(html: NodeSeq) = serve(html)(user => - "*" #> ("http://www.youtube.com/watch?v="+user.introVid.is) - )(testWriterUserSnippet, NodeSeq.Empty) - def bgImg(html: NodeSeq) = serve(html){ user => "* [id]" #> imgBgId & "* [src]" #> imageBgUrl(user) }(testWriterUserSnippet, NodeSeq.Empty) + def followButton(html: NodeSeq) = serve(html) { user => + val btnId = "follow-btn" + + def isFollowing: Boolean = User.currentUser.exists( loggedInUser => + user.followers.get.exists(_ == loggedInUser.id.get)) + + def follow: JsCmd = { + for { + loggedInUser <- User.currentUser + blogs <- user.blogs.get.par + blog <- blogs.blog.obj + blogWriter <- blog.writer(user) + } { + loggedInUser.follow(blogWriter, blog) + blogWriter.addFollower(loggedInUser) + blog.save + } + User.currentUser.map(_.follow(user).update) + AddClass(btnId, "btn-info") & RemoveClass(btnId, "btn-primary") & SetValById(btnId, "Unfollow") + } + + def unFollow: JsCmd = { + for { + loggedInUser <- User.currentUser + blogs <- user.blogs.get.par + blog <- blogs.blog.obj + blogWriter <- blog.writer(user) + } { + loggedInUser.unFollow(blogWriter, blog) + blogWriter.removeFollower(loggedInUser) + blog.save + } + User.currentUser.map(_.unFollow(user).update) + RemoveClass(btnId, "btn-info") & AddClass(btnId, "btn-primary") & SetValById(btnId, "Follow") + } + + "*" #> { + if(isFollowing) + ajaxButton("Unfollow", () => unFollow, "class" -> "btn btn-info btn-large", "id" -> btnId) + else + ajaxButton("Follow", () => follow, "class" -> "btn btn-primary btn-large", "id" -> btnId) + } + } (User.isLoggedIn && !testWriterUserSnippet, NodeSeq.Empty) + + def followingList(html: NodeSeq) = serve(html) { user => + val following = user.following.randomUsers(6) + + "*" #> following.map( ub => + <a href={Site.userProfileLoc.calcHref(ub.user)}> + <img src={image100Url(ub.user)}/></a>) + } (User.isLoggedIn && !testWriterUserSnippet, NodeSeq.Empty) + + def followersAmount(html: NodeSeq) = serve(html) { user => + val followers: Int = + (for { + blogs <- user.blogs.get + blog <- blogs.blog.obj + writer <- blog.writer(user) + } yield writer.followers.get.size).sum + + "*" #> (followers + " followers") + } (User.isLoggedIn && !testWriterUserSnippet, NodeSeq.Empty) + + def followingAmount(html: NodeSeq) = serve(html) { user => + val following: Int = user.following.get.size + "*" #> <a href={Site.userFollowingLoc.calcHref(user)}>Following {following}</a> + } (User.isLoggedIn && !testWriterUserSnippet, NodeSeq.Empty) + def articles = serve { user => user.blogs.is.map { ub => val blog = ub.blog.obj.openOr(Blog.createRecord) blog.writers.is.filter(_.user.is == user.id.is).flatMap { bw => - blog.urlRss.is.head.entries.filter(_.author == bw.name.is).flatMap(_.toForm) + blog.urlRss.is.head.entries.filter(_.author == bw.name.is). + flatMap(e=> SnipHelpers.userProfileArticle(e)) } }.flatten }(testWriterUserSnippet, NodeSeq.Empty) @@ -103,13 +184,13 @@ trait CurrentReaderUser extends ReaderUserSnippet with UserPassword { S.notice("New email is saved") } } - "*" #> ajaxText(user.email.is, checkEmail(_)) + "*" #> ajaxText(user.email.is, checkEmail) } (test, super.email(html)) def password(html: NodeSeq) = serve(html) { user => - "*" #> ajaxText(user.name.is, {s => + "*" #> ajaxText("", {s => val (pass,msg) = savePassword(s) - if(pass) Noop else S.error(msg) + if(pass) Noop else S.error("id_password_err", msg) }, "type" -> "password", "placeholder" -> "password") } (test, super.name) @@ -169,17 +250,18 @@ trait CurrentWriterUser extends WriterUserSnippet { "*" #> ajaxText(user.username.is, { s: String => check(s.toLowerCase)}) } (test, super.username) - override def introVid(html: NodeSeq) = serve(html) { user => + def introVid(html: NodeSeq) = serve(html) { user => def check(id: String): JsCmd = { import VideoService._, dispatch._ + if(id.isEmpty) Noop val time: Int = Youtube.info.videoDuration(id)().getOrElse(-1) if(time < 0) S.error("Video could not be found") else if(time <= 30) { user.introVid(id).update; Noop } else S.error("Video duration must be 30 seconds or less") } "*" #> ajaxText(user.introVid.is, {s => check(s); Noop}) - }(test, super.introVid(html)) + }(test, NodeSeq.Empty) def otherVid(html: NodeSeq) = serve(html) { user => @@ -213,7 +295,7 @@ trait CurrentWriterUser extends WriterUserSnippet { if(time.isDefined) true else false } - "*" #> ajaxText(vids.mkString(", "), addVideo(_)) + "*" #> ajaxText(vids.mkString(", "), addVideo) }(test, NodeSeq.Empty) } @@ -227,18 +309,75 @@ object CurrentWriter extends CurrentWriterUser { object ProfileLocReader extends CurrentReaderUser { protected def user = Site.userProfileLoc.currentValue override def test = user.exists(u => User.currentUser.exists(_.id.is == u.id.is)) && super.test + + def surround = "#profile-wrap [class+]" #> (if(test) "editable-page" else "") } object ProfileLocWriter extends CurrentWriterUser { protected def user = Site.userProfileLoc.currentValue override def test = user.exists(u => User.currentUser.exists(_.id.is == u.id.is)) && super.test + + def uploadButton(html: NodeSeq) = serve(html) { user => + "*" #> button("Upload Media", () => {}, "href" -> "#settingsModal", "role" -> "button", + "class" -> "btn btn-primary btn-large btn-bold", "data-toggle" -> "modal") + } (test, NodeSeq.Empty) +} + +object PreviewLocReader extends ReaderUserSnippet { + protected def user = Site.userPreviewLoc.currentValue +} + +object PreviewLocWriter extends WriterUserSnippet { + protected def user = Site.userPreviewLoc.currentValue +} + +object UserFollowing extends UserSnippet { + def user = Site.userFollowingLoc.currentValue + + def following = serve { user => + user.following.allUsers.toSeq.flatMap { ub => + <div class="row-fluid writer"> + <div class="span4"> + <img src={image100Url(ub.user)}/> + </div> + <div class="span8"> + <div class="name">{ub.user.name.get}</div> + <div class="categories">{ub.userBlog.categories.get.mkString(", ")}</div> + </div> + </div> + } + } (test = true, NodeSeq.Empty) +} + +class MyFollowing extends WriterUserSnippet { + + var iUser: Box[User] = Full(User.createRecord) + override def user: Box[User] = iUser + + def following: NodeSeq = User.currentUser.map { user => + user.following.allUsers.toSeq.flatMap { ub => + iUser = Full(ub.user) + <div class="row-fluid writer"> + <div class="span4"> + <img src={image100Url(ub.user)}/> + </div> + <div class="span6"> + <div class="name">{ub.user.name.get}</div> + <div class="categories">{ub.userBlog.categories.get.mkString(", ")}</div> + </div> + <div class="span2"> + {followButton(<span></span>)} + </div> + </div> + } + } getOrElse NodeSeq.Empty } object UserLogin extends Loggable { def render = { - var password = "" + var pwd = "" def doSubmit(): JsCmd = { S.param("email").map(e => { @@ -246,22 +385,22 @@ object UserLogin extends Loggable { // save the email and remember entered in the session var User.loginCredentials(email) - if (email.length > 0 && password.length > 0) { + if (email.length > 0 && pwd.length > 0) { User.findByEmail(email) match { - case Full(user) if user.password.isMatch(password) => + case Full(user) if user.password.isMatch(pwd) => User.logUserIn(user, isAuthed = true) ExtSession.deleteExtCookie() RedirectTo(LoginRedirect.openOr(Site.home.url)) case _ => - S.error("Invalid credentials") + S.error("id_password_err", "Invalid credentials") Noop } } - else if (email.length <= 0 && password.length > 0) { + else if (email.length <= 0 && pwd.length > 0) { S.error("id_email_err", "Please enter an email") Noop } - else if (password.length <= 0 && email.length > 0) { + else if (pwd.length <= 0 && email.length > 0) { S.error("id_password_err", "Please enter a password") Noop } @@ -277,9 +416,9 @@ object UserLogin extends Loggable { } "#id_email [value]" #> User.loginCredentials.is & - "#id_password" #> SHtml.password(password, password = _) & + "#id_password" #> password(pwd, pwd = _) & "#forgot_password [href]" #> Site.passwordRecovery.url & - "#id_submit" #> SHtml.hidden(doSubmit) + "#id_submit" #> hidden(doSubmit) } } @@ -296,7 +435,7 @@ object UserRecovery extends Loggable { case Full(user) => User.sendLoginToken(user) User.loginCredentials.remove() - S.notice("An email has been sent to you with instructions to access your account") + S.notice("id_email_err", "An email has been sent to you with instructions to access your account") Noop case _ => S.error("id_email_err", "The email you entered cannot be found") @@ -309,7 +448,7 @@ object UserRecovery extends Loggable { } "#id_email [value]" #> User.loginCredentials.is & - "#id_submit" #> SHtml.hidden(doSubmit) + "#id_submit" #> hidden(doSubmit) } } @@ -347,16 +486,16 @@ trait UserPassword { // Checks if password is stealthy enough def validPassword(pw: String): (Boolean, String) = { if(pw.length < 1) (false, "You forgot to enter a password") - if(pw.length < 8) (false, "Password must be at least 8 figures long") - (true,"") + else if(pw.length < 8) (false, "Password must be at least 8 figures long") + else (true,"") } def resettablePassword(oldPw: String, newPw: String, confirmPw: String): (Boolean, String) = { if(!correctPassword(oldPw)) (false, "Your old password is incorrect") - if(newPw != confirmPw) + else if(newPw != confirmPw) (false, "Your passwords do not match") - (true,"") + else (true,"") } def savePassword(oldPw: String, newPw: String, confirmPw: String): (Boolean, String) = { @@ -384,15 +523,15 @@ object UserTopbar { <ul class="nav pull-right" id="user"> <li class="dropdown" data-dropdown="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <img src={imageUrl(user)} width="20" height="20"></img> - <span>{user.firstName}</span> + <img src={image100Url(user)} width="20" height="20" style="margin-right:10px"></img> + <span>{user.name.get}</span> <b class="caret"></b> </a> <ul class="dropdown-menu"> - <li><a href={Site.userProfileLoc.calcHref(user)}><i class="icon-user"></i> Profile</a></li> - <li><lift:Menu.item name="Account" donthide="true" linktoself="true"><i class="icon-cog"></i> Settings</lift:Menu.item></li> + <li><a href={Site.userProfileLoc.calcHref(user)}>Profile</a></li> + <li><lift:Menu.item name="Account" donthide="true" linktoself="true">Settings</lift:Menu.item></li> <li class="divider"></li> - <li><lift:Menu.item name="Logout" donthide="true"><i class="icon-off"></i> Log Out</lift:Menu.item></li> + <li><lift:Menu.item name="Logout" donthide="true">Log Out</lift:Menu.item></li> </ul> </li> </ul> diff --git a/src/main/scala/com/joereader/snippet/Verification.scala b/src/main/scala/com/joereader/snippet/Verification.scala @@ -14,93 +14,118 @@ import snippet.SnipHelpers._ import config._ import model._ import scala.xml._ -import net.liftmodules.mongoauth.LoginRedirect +import com.joereader.lib.{Wordpress, WordpressInfo} + +// this is used in case of wordpress callbacks +object CurrentVerification extends SessionVar(VerificationSettings()) + +case class VerificationSettings() { + val user: User = Verification.setUser() + var blog: Blog = Blog.createRecord + var searched, verified = false + var urlHtml = "" + +} /** * Verifies a blog. */ class Verification extends VerificationDesigns { - val user: User = setUser() - var blog = Blog.createRecord - - var searched, verified = false - var urlHtml = "" + var s = VerificationSettings() val writerName = ValueCell("") val owner = ValueCell(false) - val metaName = "joe_reader" + val metaName = "readmeans" val metaContent = (writerName lift owner)( - (w,o) => user.id.is+":"+w+{if(o)":owner" else ""}) + (w,o) => s.user.id.is+":"+w+{if(o)":owner" else ""}) val verification = metaContent.lift(metaContent => s"""<meta name="$metaName" content="$metaContent"/>""") - def render = "#verify-state" #> idMemoize(verifyBlog _) + def render = "#verify-state" #> idMemoize(verifyBlog) def process(): JsCmd = { - verified = - MetaVerification(metaName, metaContent.get, urlHtml).verified + // check if wordpress auth is set + if(WordpressInfo.is.validateToken) { + if(WordpressInfo.is.isBlogUrl(s.urlHtml)) { + if(s.blog.writersNames.exists(_ == WordpressInfo.is.username)) { + writerName.set(WordpressInfo.is.username) + s.verified = true + } + } + } else + s.verified = MetaVerification(metaName, metaContent.get, s.urlHtml).verified - if(verified) { + if(s.verified) verifiedProcess() + else S.error("Verification is unsuccessful.") + } - // save blog stuff - val bw = BlogWriter.createRecord.name(writerName.is).user(user.id.is) + def verifiedProcess(): JsCmd = { + // save blog stuff + val bw = BlogWriter.createRecord.name(writerName.is).user(s.user.id.is) - if(owner) blog.owner(user.id.is) - blog.addWriterSafely(bw) + if(owner) s.blog.owner(s.user.id.is) + s.blog.addWriterSafely(bw) - if(blog.blogname.is.isEmpty) - blog.blogname(StringHelpers.randomString(15)) + if(s.blog.blogname.is.isEmpty) + s.blog.blogname(StringHelpers.randomString(15)) - blog.save + s.blog.save - onVerified() & onVerifiedSignUp() // support signup too - } - else - S.error("Verification is unsuccessful. " + - "Double check if your <head> contains the correct meta content.") + WordpressInfo(new Wordpress) // reset + CurrentVerification(VerificationSettings()) + + onVerified() & onVerifiedSignUp() // support signup too } def verifyBlog(outer: IdMemoizeTransform) = { // if idmemoize updated, get urlhtml and find feed - if(urlHtml.nonEmpty) { - val existing = Blog.findByUrl(urlHtml) + if(s.urlHtml.nonEmpty) { + val existing = Blog.findByUrl(s.urlHtml) if(existing.isEmpty) { - val res = urlHtml.response + val res = s.urlHtml.response val links = res.content.rssLinks val feed: Feed = links.feed val writers = feed.writers.map(BlogWriter.createRecord.name(_)) - blog = Blog.createRecord + s.blog = Blog.createRecord .urlHtml(res.loc) .name(feed.name) .description(feed.description) .writers(writers) .urlRss(feed.links) } else - existing.map(blog = _) + existing.map(s.blog = _) - searched = true - urlHtml = blog.urlHtml.is // nicely formatted - } - "#blog-url" #> text(urlHtml, urlHtml = _) & - "#search-blog" #> ajaxSubmit("Search Blog", () => ajaxInvoke(outer.setHtml _)) & + s.searched = true + s.urlHtml = s.blog.urlHtml.is // nicely formatted + WordpressInfo.is.blogUrl = s.urlHtml + CurrentVerification(s) + } else + s = CurrentVerification.is + + "#blog-url" #> text(s.urlHtml, s.urlHtml = _) & + "#search-blog" #> ajaxSubmit("Search Blog", () => ajaxInvoke(outer.setHtml)) & "#writer-list *" #> listWriters & "#blog-owner-q-yes" #> radios(0) & "#blog-owner-q-no" #> radios(1) & "#verification-info [class]" #> hideVerification & + "#verification-help [class]" #> hideHelp & + "#wordpress-login [href]" #> Site.wordpressSignIn.url & + "#blogger-link [href]" #> Site.bloggerHelp.url & + "#tumblr-link [href]" #> Site.tumblrHelp.url & "#blog-owner-q [class]" #> hideOwnerQuestion & "#verification-info-input" #> WiringUI.asText(verification) & "#verify-blog" #> ajaxSubmit("Verify", process) } def writersRadios = ajaxRadio[String]( - blog.unregisteredWritersNames, - Full(blog.unregisteredWritersNames headOr ""), + s.blog.unregisteredWritersNames, + Full(s.blog.unregisteredWritersNames headOr ""), { s => onWritersRadiosChange(s) & onWritersRadiosChangeSignUp(s) } ).unregisteredWritersChoicesToPictureForm @@ -114,79 +139,84 @@ class Verification extends VerificationDesigns { ) def registeredUsers = - blog.registeredWriters.registeredWritersChoicesToPictureForm + s.blog.registeredWriters.registeredWritersChoicesToPictureForm def completedMsg = - if(blog.unregisteredWriters.isEmpty && searched) + if(s.blog.unregisteredWriters.isEmpty && s.searched) Text("Looks like all writers have joined") else NodeSeq.Empty def hideVerification: String = { - blog.unregisteredWritersNames.nonEmpty ? "" | "hide" + s.blog.unregisteredWritersNames.nonEmpty ? "" | "hide" } + def hideHelp: String = hideVerification + def hideOwnerQuestion: String = { - val size = blog.unregisteredWritersNames.size + val size = s.blog.unregisteredWritersNames.size owner.set((size == 1) ? true | false) (size < 2) ? "hide" | "" } // returns the radio group of writers def listWriters(): NodeSeq = - if(blog.writersNames.isEmpty && searched) + if(s.blog.writersNames.isEmpty && s.searched) Text("Writers not found. Double check your url.") else { - writerName.set(blog.unregisteredWritersNames headOr "") - user.name(writerName.is) + writerName.set(s.blog.unregisteredWritersNames headOr "") + s.user.name(writerName.is) writersRadios ++ registeredUsers ++ completedMsg } // Below is a hack to separate verification between signup and a logged in user // who has multiple blogs. I chose to do it this way to avoid multiple templates. // We differentiate by checking if EmailVar is set (which only happens during signup.) + // including setUser function - def setUser(): User = { - if(EmailVar.is.isEmpty) User.currentUser.openOr(User.createRecord) - else User.createRecord - } - - def onVerified(): JsCmd = if(!EmailVar.is.isEmpty) { + def onVerifiedSignUp(): JsCmd = if(!EmailVar.is.isEmpty) { BetaUser.find(EmailVar.is).map(_.delete_!) - user - .addBlog(UserBlog.createRecord.blog(blog.id.is)) + s.user + .addBlog(UserBlog.createRecord.blog(s.blog.id.is)) .email(EmailVar.is) .password(Helpers.randomString(20)) .username(StringHelpers.randomString(15)) - user.password.hashIt - user.save - User.logUserIn(user, isAuthed = true) + s.user.password.hashIt + s.user.save + User.logUserIn(s.user, isAuthed = true) RedirectTo(Site.signUp3.url,() => { - BlogIdVar(blog.id.is.toString) - VerifiedVar(verified) + BlogIdVar(s.blog.id.is.toString) + VerifiedVar(s.verified) }) } else Noop - def onWritersRadiosChange(s: String): JsCmd = if(!EmailVar.is.isEmpty) { - writerName.set(s) - user.name(s) + def onWritersRadiosChangeSignUp(str: String): JsCmd = if(!EmailVar.is.isEmpty) { + writerName.set(str) + s.user.name(str) Noop } else Noop - protected def onVerifiedSignUp(): JsCmd = if(EmailVar.is.isEmpty) { - user.addBlog(UserBlog.createRecord.blog(blog.id.is)).update + protected def onVerified(): JsCmd = if(EmailVar.is.isEmpty) { + s.user.addBlog(UserBlog.createRecord.blog(s.blog.id.is)).update - if(owner) S.redirectTo(Site.editBlogLoc.calcHref(blog)) + if(owner) S.redirectTo(Site.editBlogs.url) else S.notice("Congratulations! You have verified your blog!") } else Noop - protected def onWritersRadiosChangeSignUp(s: String): JsCmd = if(EmailVar.is.isEmpty) { - writerName.set(s) + protected def onWritersRadiosChange(str: String): JsCmd = if(EmailVar.is.isEmpty) { + writerName.set(str) Noop } else Noop } +object Verification { + def setUser(): User = { + if(EmailVar.is.isEmpty) User.currentUser.openOr(User.createRecord) + else User.createRecord + } +} + sealed trait VerificationDesigns { implicit class InputRadioDesignImplicit(choices: ChoiceHolder[String]) { @@ -196,8 +226,7 @@ sealed trait VerificationDesigns { val choice = choices.items(i) val user = User.createRecord - <label onClick="$(this).addClass('selected').siblings().removeClass('selected')"> - {choice.xhtml}<img src={imageUrl(user)} />{choice.key.toString}</label> + <label>{choice.xhtml}<img src={image100Url(user)} class="writer"/><div>{choice.key.toString}</div></label> } } } @@ -210,7 +239,8 @@ sealed trait VerificationDesigns { val writer = writers(i) val user = User.findByStringId(writer.user.is.toString).openOr(User.createRecord) - <label><img src={imageUrl(user)} />{writer.name.is}</label> + <label><a href={Site.userProfileLoc.calcHref(user)} target="_blank"> + <img src={image100Url(user)} class="writer"/></a><div>{writer.name.is}</div></label> } } } diff --git a/src/main/webapp/_/img/large/image1.jpg b/src/main/webapp/_/img/large/image1.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image10.jpg b/src/main/webapp/_/img/large/image10.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image2.jpg b/src/main/webapp/_/img/large/image2.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image3.jpg b/src/main/webapp/_/img/large/image3.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image4.jpg b/src/main/webapp/_/img/large/image4.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image5.jpg b/src/main/webapp/_/img/large/image5.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image6.jpg b/src/main/webapp/_/img/large/image6.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image7.jpg b/src/main/webapp/_/img/large/image7.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image8.jpg b/src/main/webapp/_/img/large/image8.jpg Binary files differ. diff --git a/src/main/webapp/_/img/large/image9.jpg b/src/main/webapp/_/img/large/image9.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image1.jpg b/src/main/webapp/_/img/small/image1.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image10.jpg b/src/main/webapp/_/img/small/image10.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image2.jpg b/src/main/webapp/_/img/small/image2.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image3.jpg b/src/main/webapp/_/img/small/image3.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image4.jpg b/src/main/webapp/_/img/small/image4.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image5.jpg b/src/main/webapp/_/img/small/image5.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image6.jpg b/src/main/webapp/_/img/small/image6.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image7.jpg b/src/main/webapp/_/img/small/image7.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image8.jpg b/src/main/webapp/_/img/small/image8.jpg Binary files differ. diff --git a/src/main/webapp/_/img/small/image9.jpg b/src/main/webapp/_/img/small/image9.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb1.jpg b/src/main/webapp/_/img/thumbs/thumb1.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb10.jpg b/src/main/webapp/_/img/thumbs/thumb10.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb2.jpg b/src/main/webapp/_/img/thumbs/thumb2.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb3.jpg b/src/main/webapp/_/img/thumbs/thumb3.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb4.jpg b/src/main/webapp/_/img/thumbs/thumb4.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb5.jpg b/src/main/webapp/_/img/thumbs/thumb5.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb6.jpg b/src/main/webapp/_/img/thumbs/thumb6.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb7.jpg b/src/main/webapp/_/img/thumbs/thumb7.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb8.jpg b/src/main/webapp/_/img/thumbs/thumb8.jpg Binary files differ. diff --git a/src/main/webapp/_/img/thumbs/thumb9.jpg b/src/main/webapp/_/img/thumbs/thumb9.jpg Binary files differ. diff --git a/src/main/webapp/about.html b/src/main/webapp/about.html @@ -1,17 +0,0 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div class="inner"> - <h2>About Joe Reader</h2> - <p> - <span lift="Menu.item?name=Home;a:class=btn primary large">Back to Home &raquo;</span> - </p> - </div> - </div> - </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> -</div> -\ No newline at end of file diff --git a/src/main/webapp/blog.html b/src/main/webapp/blog.html @@ -1,3 +1,3 @@ -<div data-lift="surround?with=default;at=content"> +<div data-lift="surround?with=base-wrap;at=content"> <span data-lift="embed?what=/templates-hidden/parts/blog-profile"></span> </div> \ No newline at end of file diff --git a/src/main/webapp/blogwriter.html b/src/main/webapp/blogwriter.html @@ -0,0 +1,53 @@ +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + <lift:head> + <title data-lift="Menu.title">Read Means: %*%</title> + </lift:head> + + <div id="profile-wrap"> + + <div id="bg"> + <img data-lift="ProfileLocBlogWriter.bgImg"> + </div> + + <div class="boxed-articles"> + <div id="profile"> + <div id="profile-inner"> + + <div class="row-fluid"> + <div id="profile-img" class="span12 text-center"> + <img data-lift="ProfileLocBlogWriter.img"> + </div> + </div> + + <div class="row-fluid"> + <div id="user-name" class="span12 text-center up-separate"> + <span data-lift="ProfileLocBlogWriter.name"></span> + </div> + </div> + + <div class="row-fluid"> + <div id="blog-url" class="span12 text-center"> + <span data-lift="ProfileLocBlogWriter.url"></span> + </div> + </div> + + <div class="row-fluid"> + <div class="span12 text-center up-separate"> + <span data-lift="ProfileLocBlogWriter.followButton"></span> + </div> + </div> + + </div> + </div> + </div> + + <div id="profile-articles-area" class="row-fluid"> + <div class="span12"> + <div class="boxed-articles"> + <span data-lift="ProfileLocBlogWriter.articles"></span> + </div> + </div> + </div> + + </div> +</div> +\ No newline at end of file diff --git a/src/main/webapp/following.html b/src/main/webapp/following.html @@ -0,0 +1,10 @@ +<div data-lift="surround?with=default;at=content"> + <span data-lift="UserFollowing.title"></span> + <form> + <input id="following-search" placeholder="Search writer's name or category" type="text" class="span12"> + </form> + + <div id="writers-container"> + <span data-lift="UserFollowing.following"></span> + </div> +</div> +\ No newline at end of file diff --git a/src/main/webapp/help/recovery.html b/src/main/webapp/help/recovery.html @@ -1,5 +1,4 @@ <div data-lift="surround?with=default;at=content"> - <div data-lift="Notices"></div> <div class="row"> <div class="span12"> <form data-lift="Form.ajax?class=form-horizontal"> diff --git a/src/main/webapp/help/verify/blogger.html b/src/main/webapp/help/verify/blogger.html @@ -0,0 +1,17 @@ +<div data-lift="surround?with=default;at=content"> + + <h2>Step 1</h2> + <p>Go to your blog's dashboard and click on "Template"</p> + <img src="/img/help/blogger_1.jpg"> + + <h2>Step 2</h2> + <p>Click on "Edit HTML"</p> + <img src="/img/help/blogger_2.jpg"> + + <h2>Step 3</h2> + <p>Find the &lt;head&gt; tag and paste your specially given meta tag there. Click on "Save Template"</p> + <img src="/img/help/blogger_3.jpg"> + + <h2>Step 4</h2> + <p>Go back to Read Means Verification page and click on the "Verify" button. You should be verified.</p> +</div> +\ No newline at end of file diff --git a/src/main/webapp/help/verify/tumblr.html b/src/main/webapp/help/verify/tumblr.html @@ -0,0 +1,29 @@ +<div data-lift="surround?with=default;at=content"> + + <h2>Step 1</h2> + <p>Log in to your Tumblr and click the settings button.</p> + <img src="/img/help/tumblr_1.jpg"> + + <h2>Step 2</h2> + <p>Click on the blog you want to verify.</p> + <img src="/img/help/tumblr_2.jpg"> + + <h2>Step 3</h2> + <p>In the blog's settings page, click on "Customize"</p> + <img src="/img/help/tumblr_3.jpg"> + + <h2>Step 4</h2> + <p>In the the left-side panel, click on "Edit HTML"</p> + <img src="/img/help/tumblr_4.jpg"> + + <h2>Step 5</h2> + <p>Find the &lt;head&gt; tag and paste your specially given meta tag there. Click on "Update Preview"</p> + <img src="/img/help/tumblr_5.jpg"> + + <h2>Step 6</h2> + <p>"Save" button will appear. Click it!</p> + <img src="/img/help/tumblr_6.jpg"> + + <h2>Step 7</h2> + <p>Go back to Read Means Verification page and click on the "Verify" button. You should be verified.</p> +</div> +\ No newline at end of file diff --git a/src/main/webapp/img/controls.png b/src/main/webapp/img/controls.png Binary files differ. diff --git a/src/main/webapp/img/favicon.ico b/src/main/webapp/img/favicon.ico Binary files differ. diff --git a/src/main/webapp/img/help/blogger_1.jpg b/src/main/webapp/img/help/blogger_1.jpg Binary files differ. diff --git a/src/main/webapp/img/help/blogger_2.jpg b/src/main/webapp/img/help/blogger_2.jpg Binary files differ. diff --git a/src/main/webapp/img/help/blogger_3.jpg b/src/main/webapp/img/help/blogger_3.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_1.jpg b/src/main/webapp/img/help/tumblr_1.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_2.jpg b/src/main/webapp/img/help/tumblr_2.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_3.jpg b/src/main/webapp/img/help/tumblr_3.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_4.jpg b/src/main/webapp/img/help/tumblr_4.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_5.jpg b/src/main/webapp/img/help/tumblr_5.jpg Binary files differ. diff --git a/src/main/webapp/img/help/tumblr_6.jpg b/src/main/webapp/img/help/tumblr_6.jpg Binary files differ. diff --git a/src/main/webapp/img/icon/apple-touch-icon-114-precomposed.png b/src/main/webapp/img/icon/apple-touch-icon-114-precomposed.png Binary files differ. diff --git a/src/main/webapp/img/icon/apple-touch-icon-144-precomposed.png b/src/main/webapp/img/icon/apple-touch-icon-144-precomposed.png Binary files differ. diff --git a/src/main/webapp/img/icon/apple-touch-icon-16-precomposed.png b/src/main/webapp/img/icon/apple-touch-icon-16-precomposed.png Binary files differ. diff --git a/src/main/webapp/img/icon/apple-touch-icon-57-precomposed.png b/src/main/webapp/img/icon/apple-touch-icon-57-precomposed.png Binary files differ. diff --git a/src/main/webapp/img/icon/apple-touch-icon-72-precomposed.png b/src/main/webapp/img/icon/apple-touch-icon-72-precomposed.png Binary files differ. diff --git a/src/main/webapp/img/media/bigplay.svg b/src/main/webapp/img/media/bigplay.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!-- Generator: Adobe Fireworks CS6, Export SVG Extension by Aaron Beall (http://fireworks.abeall.com) . Version: 0.6.1 --><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg id="bigplay-gradient.fw-Page%201" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"></svg> +\ No newline at end of file diff --git a/src/main/webapp/img/spinner.gif b/src/main/webapp/img/spinner.gif Binary files differ. diff --git a/src/main/webapp/img/wp.png b/src/main/webapp/img/wp.png Binary files differ. diff --git a/src/main/webapp/img/yt95x40.png b/src/main/webapp/img/yt95x40.png Binary files differ. diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html @@ -1,38 +1,109 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div data-lift="Notices"></div> - <div class="hero-unit"> - <div class="inner"> - <h2>Joe Reader</h2> - <p> - <span lift="Menu.item?name=About;donthide=true;linktoself=true;a:class=btn primary large">About Joe Reader &raquo;</span> - </p> - - <div data-lift="SignUp.setupEmail"> - <form data-lift="form.ajax"> - Email: <input id="email-join" placeholder="email"> - <input id="join-btn" class="btn btn-primary" data-loading-text="Loading..." /> - </form> - </div> +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + <lift:head> + <title data-lift="Menu.title">Read Means: %*%</title> + </lift:head> + <div class="container"> + <div class="marketing"> + Discover and follow blog writers! + <div class="small">with the friendliest rss reader online</div> + <div class="logo"> + <span class="readBlue">Read</span> + <span class="readOrange"> means</span> + </div> + <ul class="inline small" > + <li><a href="/purpose">Purpose</a></li> + <li><a href="#features">Features</a></li> + <li><a href="#myblog">Our Blog</a></li> + <li><a href="#writerswelove">Writers we Love</a></li> + </ul> + </div> + </div> + <div id="writerswelove"></div> + <div class="container"> + <div class="articles"> + <div class="article text-center"> + <h2>Writers we Love</h2> + <p>In Read Means, writers are celebrities because we believe writers create content, not content creates writers. Check out our featured writers that you can follow with + <span class="readBlue">Read</span><span class="readOrange"> means</span> + </p> + </div> + </div> + </div> + <span data-lift="embed?what=/templates-hidden/parts/writers-gallery"></span> - <video width="640" height="360" id="intro-player" controls="controls" autoplay="false"> - <source type="video/youtube" src="http://www.youtube.com/watch?v=nOEw9iiopwI" /> - </video> + <div class="container"> + <style type="text/css"> + .features { margin-top: 120px } + .features [class*="span"] { + height: 310px; + padding: 20px; + font-weight: bold; + margin-bottom: 20px; + border-radius: 3px; + } + .features h2 { + padding: 20px; + padding-left: 80px; + color: #fff; + margin-bottom: 50px; + border-radius: 3px; + } + </style> + <div id="features"></div> + <div class="features"> + <h2 style="background-color: #1E7697">Features</h2> + <div class="row-fluid"> + <div class="span4" style="background-color:#1E7697; color: #fff"> + Follow blog writers, not blogs. + </div> + <div class="span4" style="background-color:#A6D2C1; color: #fff"> + View who follows who to find more writers. + </div> + <div class="span4" style="background-color:#FFF"> + Discover new writers by any category. + </div> + </div> + <div class="row-fluid"> + <div class="span4" style="background-color:#84D5F4; color: #fff"> + Save and share articles with those following you in Read Means and in other social networks. + </div> + <div class="span8" style="background-color:#5BC1E9; color: #fff"> + To easily discover writers that fit you the most, watch a quick 30 second intro video about the writer and his or her purpose. + </div> + </div> + </div> + + <div class="features"> + <h2 style="background-color: #FB840B">Features for Blog Writers</h2> + <div class="row-fluid"> + <div class="span4" style="background-color:#FB840B; color: #fff"> + Follow blog writers, not blogs. + </div> + <div class="span4" style="background-color:#FBB30B; color: #fff"> + View who follows who to find more writers. + </div> + <div class="span4" style="background-color:#FDA348;color:#fff"> + Discover new writers by any category. + </div> + </div> + <div class="row-fluid"> + <div class="span4" style="background-color:#0C7C9C; color: #fff"> + Save and share articles with those connected to you. + </div> + <div class="span8" style="background-color:#5BC1E9; color: #fff"> + Enjoy quick 30 second "writer's purpose" videos and read recent + articles to easily search the right writer for you. + </div> + </div> + </div> - <!-- - <h1>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</h1> - --> - </div> + </div> - </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + <span data-lift="embed?what=/templates-hidden/parts/footer"></span> </div> diff --git a/src/main/webapp/login.html b/src/main/webapp/login.html @@ -1,12 +1,11 @@ -<div data-lift="surround?with=default;at=content"> - <div data-lift="Notices"></div> +<div data-lift="surround?with=default-wide;at=content"> <div class="row"> <div class="span12"> <form data-lift="Form.ajax?class=form-horizontal"> <span lift="UserLogin"> <fieldset> <div class="control-group"> - <label class="control-label" for="email"></label> + <label class="control-label" for="id_email"></label> <div class="controls"> <p><strong>Enter your email address:</strong></p> <input class="xlarge" maxlength="254" id="id_email" size="32" name="email" type="text" value="" /> @@ -20,12 +19,16 @@ <span data-alertid="id_password_err" class="notice-block"></span> </div> </div> - <a id="forgot_password">Forgot password?</a> + <div class="control-group"> + <div class="controls"> + <a id="forgot_password">Forgot password?</a> + </div> + </div> </fieldset> <div class="form-actions"> <input id="id_submit" /> <input type="submit" class="btn btn-primary" value="Submit"> - <span lift="Menu.item?name=Home;a:class=btn">Cancel</span> + <span data-lift="Menu.item?name=Home;a:class=btn">Cancel</span> </div> </span> </form> diff --git a/src/main/webapp/preview.html b/src/main/webapp/preview.html @@ -0,0 +1,40 @@ +<div data-lift="surround?with=base-wrap;at=content"> + + <div id="bg"> + <img data-lift="PreviewLocWriter.bgImg"/> + </div> + + <div class="boxed-articles"> + <div id="profile"> + + <iframe data-lift="PreviewLocReader.introVidUrl" width="800" height="450" frameborder="0" allowfullscreen></iframe> + + <div id="profile-inner"> + + <div class="row-fluid"> + <div id="user-name" class="span12 text-center up-separate"> + <span data-lift="PreviewLocReader.name"></span> + </div> + </div> + + <div class="row-fluid"> + <div id="user-about" class="span12 text-center up-separate article" style="background: transparent; padding-top:0; padding-bottom:0;"> + <span data-lift="PreviewLocWriter.about"></span> + </div> + </div> + + <div class="row-fluid"> + <div class="span12 text-center"> + <span data-lift="PreviewLocWriter.followButton"></span> + <div id="following-amount"> + <span data-lift="PreviewLocWriter.followersAmount"></span> + </div> + </div> + </div> + + </div> + + </div> + </div> + +</div> +\ No newline at end of file diff --git a/src/main/webapp/purpose.html b/src/main/webapp/purpose.html @@ -0,0 +1,62 @@ +<div data-lift="surround?with=default;at=content"> + + <div class="article"> + <div class="content"> + <h3>Why Read Means and not other readers?</h3> + + <p> + Having a difficult time following blogs? Can't organize your subscriptions because you read via email? Your only + option is to read from a rss reader, but for some reason it doesn't feel right and others cannot explain why so they say + "RSS is dead." It's not dead, it just hasn't been updated. + </p> + <p> + Marco Arment, creator of Instapaper, said it best, "RSS [reader] is easy + to abuse." Rss readers were created when blogs were personal, and since then they haven't adapted to the + changing blogosphere that has become mainstream and bigger than ever. It's easy to follow a blog with 30 journalists, and then wake up + with 300 unread articles and only a few of them were interesting. People get overwhelmed and never return. + That is the essential problem Read Means was built to solve. + </p> + + <div class="well well-large"> + <h4>The main difference between Read Means and other rss readers is that you follow blog writers, not blogs.</h4> + </div> + + <p> + This approach dramatically changes + the way we read online for the better. Not only does it solve the problem described above, but we also become better critical readers + which allow us to follow writers we truly love. + </p> + <p> + By following a writer, you ask yourself, "Who is this person and why should I follow him or her?" + Unfortunately, this question is sometimes impossible to answer. If you're lucky, you might find the writer's about page, but that + alone is not enough. Writers need to present themselves in an interactive way: Videos! + </p> + <div class="well well-large"> + <h4>Writers, upload a sweet and short 30 second video and share it with the world.</h4> + </div> + <p> + We need to hear the writer's voice. We need writers to open up and tell the world why people + should follow your blog. + </p> + <p> + Not only are videos an excellent way for introduction, but from personal experience, knowing the writer's personality sets the mood, + tone of voice and humor making the reading experience more meaningful and interesting. + </p> + <p> + Read Means will allow readers to search for new writers by category. This will be a great way for readers to find great writers that + share similar interests. There's currently no way of doing this, but with the help from blog writers and readers, it can happen! + </p> + <p> + Spread the word and start a movement to make the reading experience better for all of us. + Sign up at the top of this page and like us on Facebook, follow us on Twitter, +1 us on Google+. + If you're a blog writer, make sure to verify your blog and set up a profile with Read Means. + </p> + <p> + Thank you, + <br> + Julio Cabrera + </p> + </div> + </div> + +</div> +\ No newline at end of file diff --git a/src/main/webapp/reader.html b/src/main/webapp/reader.html @@ -1,3 +1,2 @@ <div data-lift="surround?with=default;at=content"> - <p>Homey</p> </div> diff --git a/src/main/webapp/register.html b/src/main/webapp/register.html @@ -1,4 +0,0 @@ -<div data-lift="surround?with=default;at=content"> - <div data-lift="Notices"></div> - <div data-lift="RegisterScreen"></div> -</div> diff --git a/src/main/webapp/settings/account.html b/src/main/webapp/settings/account.html @@ -1,25 +1,82 @@ <div data-lift="surround?with=settings-wrap;at=content"> - <div class="row"><div class="span12">Youtube Vid: <span data-lift="CurrentWriter.introVid" id="intro-vid"></span></div></div> - - <div class="row"><div class="span12">Email: <span data-lift="CurrentReader.email" id="user-email"></span></div></div> - - <div class="row"><div class="span12">Name: <span data-lift="CurrentReader.name" id="user-name"></span></div></div> - <div class="row"><div class="span12">Img Upload: <span data-lift="CurrentReader.uploadImg" id="pic-fileupload-outer"></span></div></div> - <div class="row"><div class="span12">Bg Img Upload: <span data-lift="CurrentWriter.uploadBgImg" id="bg-fileupload-outer"></span></div></div> - <div class="row"><div class="span12">About: <span data-lift="CurrentWriter.about" id="user-about"></span></div></div> - - <div class="row"><div class="span12">Username: <span data-lift="CurrentWriter.username" id="user-username"></span></div></div> - <div class="row"><div class="span12">Other Videos: <span data-lift="CurrentWriter.otherVid" id="user-other-vid"></span></div></div> - - <div class="row"> - <div data-lift="CurrentReader.setPassword" class="span12"> - <form data-lift="form.ajax"> - Old Password: <span id="old-pwd"></span><br> - New Password: <span id="new-pwd"></span><br> - Confirm Password: <span id="new-pwd2"></span><br> - <span id="submit-pwd"></span> - </form> - </div> + + <label>Email</label> + <span data-lift="CurrentReader.email"></span> + + <br><br> + + <label>Username</label> + <span data-lift="CurrentWriter.username"></span> + <span class="help-inline"><small>www.readmeans.com/{username}</small></span> + + <br><br> + + <label>Name</label> + <span data-lift="CurrentReader.name"></span> + + <br><br> + + <label>About</label> + <span data-lift="CurrentWriter.about" class="user-about-settings"></span> + <style>.user-about-settings{width:300px; height:150px;}</style> + + <br><br> + + <h3>Media</h3> + + <div id="intro-vid" class="well well-small"> + <p>Enter a Youtube video id to influence people to follow you. Must be 30 seconds or less:</p> + <span> + <span data-lift="CurrentWriter.introVid"></span> + <img class="yt" src="/img/yt95x40.png"> + <span class="help-inline"><small>www.youtube.com/watch?v=<span style="color:red">0Bmhjf0rKe8</span></small></span> + </span> + </div> + + <label>Upload a new profile image</label> + <span data-lift="CurrentReader.uploadImg" id="pic-fileupload-outer"></span> + + <br><br> + + <label>Upload a new background image</label> + <span data-lift="CurrentWriter.uploadBgImg" id="bg-fileupload-outer" ></span> + + <br><br> + + <label>Enter other Youtube video ids that shows your tone of voice and personality: interviews, speeches, etc.</label> + <span data-lift="CurrentWriter.otherVid"></span> + <span class="help-block"><small>Separate by comma: 0Bmhjf0rKe8, 0Bmhjf0rKe8</small></span> + + <br><br> + + <h3>Reset Password</h3> + + <div data-lift="CurrentReader.setPassword"> + <form data-lift="form.ajax" class="form-horizontal"> + <div class="control-group"> + <label class="control-label" for="old-pwd">Old Password</label> + <div class="controls"> + <span id="old-pwd"></span> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="new-pwd">New Password</label> + <div class="controls"> + <span id="new-pwd"></span> + </div> + </div> + <div class="control-group"> + <label class="control-label" for="new-pwd2">Confirm New Password</label> + <div class="controls"> + <span id="new-pwd2"></span> + </div> + </div> + <div class="control-group"> + <div class="controls"> + <span id="submit-pwd" class="btn"></span> + </div> + </div> + </form> </div> </div> diff --git a/src/main/webapp/settings/blog.html b/src/main/webapp/settings/blog.html @@ -1,8 +0,0 @@ -<div lift="surround?with=settings-wrap;at=content"> - - <div class="row"><div class="span12">Name: <span data-lift="ProfileLocBlogEdit.name" id="blog-name" ></span></div></div> - <div class="row"><div class="span12">Blog Name: <span data-lift="ProfileLocBlogEdit.blogname" id="blog-blogname" ></span></div></div> - <div class="row"><div class="span12">Description: <span data-lift="ProfileLocBlogEdit.description" id="blog-about" ></span></div></div> - - <div class="row"><div class="span12">Writers: <span data-lift="ProfileLocBlogEdit.writers" id="blog-writers" ></span></div></div> -</div> -\ No newline at end of file diff --git a/src/main/webapp/settings/following.html b/src/main/webapp/settings/following.html @@ -0,0 +1,10 @@ +<div data-lift="surround?with=settings-wrap;at=content"> + + <form> + <input id="following-search" placeholder="Search writer's name or category" type="text" class="span12"> + </form> + + <div id="writers-container"> + <span data-lift="MyFollowing.following"></span> + </div> +</div> +\ No newline at end of file diff --git a/src/main/webapp/settings/verify.html b/src/main/webapp/settings/verify.html @@ -1,3 +1,3 @@ -<div lift="surround?with=settings-wrap;at=content"> +<div lift="surround?with=default-wide;at=content"> <span data-lift="embed?what=/templates-hidden/parts/verification"></span> </div> diff --git a/src/main/webapp/signup/blog.html b/src/main/webapp/signup/blog.html @@ -1,16 +1,24 @@ -<div data-lift="surround?with=default;at=content"> +<div data-lift="surround?with=default-wide;at=content"> <div data-lift="SignUp.setupBlog"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div class="inner"> - <form data-lift="form.ajax"> - www.joereader.com/blog/ <input data-lift="ProfileLocBlogReq.blogname" id="blog-site-url" placeholder="Blog Url"><br> - <input id="blog-continue" class="btn btn-success"> - </form> + <div class="row-fluid" style="background-color: #ddd"> + <div class="span12"> + <div class="boxed-articles"> + <form data-lift="form.ajax?class=navbar-form pull-left"> + www.joereader.com/blog/ <input data-lift="ProfileLocBlogReq.blogname" id="blog-site-url" placeholder="Blog Url"><br> + </form> + <form data-lift="form.ajax?class=navbar-form pull-right"> + <input id="blog-continue" class="btn btn-success"> + </form> + </div> + </div> + </div> + + <div class="row-fluid"> + <div class="span12"> + <span id="blog-area"></span> </div> </div> - <div class="row"><div class="span12"><span id="blog-area"></span></div></div> </div> </div> \ No newline at end of file diff --git a/src/main/webapp/signup/categories.html b/src/main/webapp/signup/categories.html @@ -1,12 +1,14 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div id="categories-area"></div> - </div> +<div data-lift="surround?with=default-wide;at=content"> + + <div data-lift="SignUp.setupCategories"> + <h4>Congratulations! You have verified yourself as a writer for <span id="blogname"></span></h4> + <p>Select a few categories that describe what you write for this blog.</p> + <hr> + <div id="categories-area"></div> + + <form data-lift="form.ajax"> + <input id="categories-continue" class="btn btn-primary btn-large"> + </form> </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + </div> \ No newline at end of file diff --git a/src/main/webapp/signup/password.html b/src/main/webapp/signup/password.html @@ -1,19 +1,20 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div data-lift="SignUp.setupPassword" class="inner"> +<div data-lift="surround?with=default;at=content"> - <form data-lift="form.ajax"> - the password <input data-lift="CurrentReader.password" id="user-password" placeholder="password"><br> - <input id="user-continue" class="btn btn-success"> - </form> + <div data-lift="SignUp.setupPassword"> + <form data-lift="form.ajax"> + + <div class="control-group"> + <div class="controls"> + <p><strong>the password</strong></p> + <input data-lift="CurrentReader.password" id="user-password" placeholder="password"> + <span data-alertid="id_password_err" class="notice-block"></span> + </div> </div> - </div> + <hr> + <input id="user-continue" class="btn btn-primary btn-large"> + </form> + </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + <div style="margin: 340px 0"></div> </div> \ No newline at end of file diff --git a/src/main/webapp/signup/user.html b/src/main/webapp/signup/user.html @@ -1,16 +1,25 @@ -<div data-lift="surround?with=default;at=content"> +<div data-lift="surround?with=base-wrap;at=content"> <div data-lift="SignUp.setupUser"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div class="inner"> - <form data-lift="form.ajax"> - www.joereader.com/ <input data-lift="CurrentWriter.username" id="user-site-url" placeholder="Your Url"><br> - <input id="user-continue" class="btn btn-success"> - </form> + <div class="row-fluid" style="background-color: #ddd"> + <div class="span12"> + <div class="boxed-articles"> + <form data-lift="form.ajax?class=navbar-form pull-left"> + www.joereader.com/ <input data-lift="CurrentWriter.username" id="user-site-url" placeholder="Your Url"><br> + </form> + <form data-lift="form.ajax?class=navbar-form pull-right"> + <input id="user-continue" class="btn btn-success"> + </form> + </div> + </div> + </div> + + + <div class="row-fluid"> + <div class="span12"> + <span id="user-area"></span> </div> </div> - <div class="row"><div class="span12"><span id="user-area"></span></div></div> </div> </div> \ No newline at end of file diff --git a/src/main/webapp/signup/verify.html b/src/main/webapp/signup/verify.html @@ -1,13 +1,6 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div lift="Notices"></div> +<div data-lift="surround?with=default-wide;at=content"> - <div data-lift="SignUp.setupVerification"></div> - <span data-lift="embed?what=/templates-hidden/parts/verification"></span> - - </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + <div data-lift="SignUp.setupVerification"></div> + <span data-lift="embed?what=/templates-hidden/parts/verification"></span> + <div style="margin: 340px 0"></div> </div> \ No newline at end of file diff --git a/src/main/webapp/signup/writer.html b/src/main/webapp/signup/writer.html @@ -1,19 +1,14 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div lift="Notices"></div> - <div class="hero-unit"> - <div data-lift="SignUp.setupWriter" class="inner"> - <h2>Thank you for joining!</h2> - <p>Are you a blog writer?</p> - <form data-lift="form.ajax"> - <input type="submit" id="yes-button"><br> - <input type="submit" id="no-button"> - </form> - </div> +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + + <div class="text-center up-separate"> + <div data-lift="SignUp.setupWriter"> + <h2>Thank you for joining!</h2> + <p>Are you a blog writer?</p> + <form data-lift="form.ajax" > + <input type="submit" id="yes-button" class="btn btn-success btn-large"> + <input type="submit" id="no-button" class="btn btn-danger btn-large"> + </form> </div> </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + </div> \ No newline at end of file diff --git a/src/main/webapp/templates-hidden/base-wrap.html b/src/main/webapp/templates-hidden/base-wrap.html @@ -1,28 +1,40 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"/> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="description" content=""> - <meta name="author" content="Joe Reader"> - <meta name="Copyright" content="Copyright Joe Reader 2012. All Rights Reserved."> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Joe Reader"> + <meta name="Copyright" content="Copyright Joe Reader 2012. All Rights Reserved."> - <!-- css --> - <link href="/css/styles.css" rel="stylesheet" data-lift="with-resource-id"> + <!-- css --> + <link href="/css/styles.css" rel="stylesheet" data-lift="with-resource-id"> - <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> - <!--[if lt IE 9]> + <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> + <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> - <![endif]--> - <!-- fav and touch icons --> - <!-- - <link rel="shortcut icon" href="/img/favicon.ico"> - <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> - <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> - <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> - --> + <![endif]--> + + <!-- fav and touch icons --> + <link rel="shortcut icon" href="/img/favicon.ico"> + <link rel="apple-touch-icon" href="/img/icon/apple-touch-icon-16-precomposed.png"> + <link rel="apple-touch-icon" sizes="57x57" href="/img/icon/apple-touch-icon-57-precomposed.png"> + <link rel="apple-touch-icon" sizes="72x72" href="/img/icon/apple-touch-icon-72-precomposed.png"> + <link rel="apple-touch-icon" sizes="114x114" href="/img/icon/apple-touch-icon-114-precomposed.png"> + <link rel="apple-touch-icon" sizes="144x144" href="/img/icon/apple-touch-icon-144-precomposed.png"> + + <script type="text/javascript" src="//use.typekit.net/jdi5hji.js"></script> + <script type="text/javascript">try{Typekit.load();}catch(e){}</script> </head> <body> + + <div id="border"> + <div class="b-bottom"></div> + <div class="b-top"></div> + <div class="b-right"></div> + <div class="b-left"></div> + </div> + <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> @@ -32,17 +44,51 @@ <span class="icon-bar"></span> </a> <div class="brand"> - <a href="/">Read Means</a> + <a href="/"> + <span class="readBlue">Read</span> + <span class="readOrange">means</span> + </a> </div> - <div class="nav-collapse collapse"> - <ul data-lift="Menus.group?group=topbar" class="nav"></ul> + <div class="nav-collapse collapse"> + <ul data-lift="Menus.group?group=topbar" class="nav"></ul> <span data-lift="UserTopbar"></span> </div> </div> </div> + + <div class="row-fluid" data-lift="SignUp.setupEmail"> + <style id="signup-style"></style> + <form data-lift="form.ajax"> + <div id="email-signup" class="span4 offset4"> + <div class="row-fluid"> + <div class="span8"> + + <div class="control-group"> + <div class="controls"> + <input id="email-join" class="input-block-level" placeholder="email address"> + <span data-alertid="email-join-err" class="notice-block"></span> + </div> + </div> + + </div> + <div class="span4"> + <button id="join-btn" class="btn btn-primary btn-block" type="button"><strong>SignUp!</strong></button> + </div> + </div> + </div> + </form> + </div> + </div> - <div id="white-overlay" class="container hide" style="position:absolute; left:0; top:0; width:100%; height:100%; z-index: 1000; opacity: 0.7; background-color: #fff; filter: alpha(opacity=70);"></div> - <div id="content" class="container"></div><!-- /container --> + + <div data-lift="SnipHelpers.setNoticeContainer" id="notices-container"> + <div style="display:none;" id="ajax-spinner" class="text-center"> + <img src="/img/spinner.gif" width="32" height="16"/> + </div> + <div data-lift="Notices"></div> + </div> + + <div id="content"></div><!-- /container --> <!-- javascript --> <script src="/js/script.js" data-lift="with-resource-id"></script> diff --git a/src/main/webapp/templates-hidden/default-wide.html b/src/main/webapp/templates-hidden/default-wide.html @@ -0,0 +1,14 @@ +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + <lift:head> + <title data-lift="Menu.title">Read Means: %*%</title> + </lift:head> + <div class="container"> + <div class="page-header"> + <h1> + <span data-lift="Menu.title"></span> + </h1> + </div> + <div id="content"></div> + </div> + <span data-lift="embed?what=/templates-hidden/parts/footer"></span> +</div> +\ No newline at end of file diff --git a/src/main/webapp/templates-hidden/default.html b/src/main/webapp/templates-hidden/default.html @@ -1,17 +1,22 @@ -<div data-lift="surround?with=base-wrap;at=content"> - <lift:head> - <title data-lift="Menu.title">Joe Reader: %*%</title> - </lift:head> - <div class="main-content"> - <div class="page-header"> - <h1> - <span data-lift="Menu.title"></span> - <div style="display:none; float:right;" id="ajax-spinner"> - <img src="/img/spinner.gif" width="16" height="16"/> +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + <lift:head> + <title data-lift="Menu.title">Read Means: %*%</title> + </lift:head> + <div class="container"> + <div class="articles"> + + <div class="page-header"> + <h1> + <span data-lift="Menu.title"></span> + </h1> + </div> + <div class="row-fluid"> + <div class="span12"> + <div id="content"></div> + </div> + </div> + </div> - </h1> </div> - <div id="content"></div> - </div> - <span data-lift="embed?what=/templates-hidden/parts/footer"></span> + <span data-lift="embed?what=/templates-hidden/parts/footer"></span> </div> diff --git a/src/main/webapp/templates-hidden/parts/blog-profile.html b/src/main/webapp/templates-hidden/parts/blog-profile.html @@ -1,16 +1,73 @@ -<div> +<div data-lift="ProfileLocBlog.surround" id="profile-wrap"> - <div class="row"><div class="span12">URL: <span data-lift="ProfileLocBlog.url" id="blog-url"></span></div></div> - <div class="row"><div class="span12">Name: <span data-lift="ProfileLocBlog.name" id="blog-name" ></span></div></div> - <div class="row"><div class="span12">About: <span data-lift="ProfileLocBlog.description" id="blog-about" ></span></div></div> - <div class="row"><div class="span12">Img: <img data-lift="ProfileLocBlog.img" id="blog-img"></div></div> - <div class="row"><div class="span12">Bg Img: <img data-lift="ProfileLocBlog.bgImg" id="blog-bgimg"></div></div> + <div id="bg"> + <img data-lift="ProfileLocBlog.bgImg"> + </div> - <div class="row"><div class="span12">Writers: <span data-lift="ProfileLocBlog.writers" id="blog-writers" ></span></div></div> + <div class="boxed-articles"> + <div id="profile"> - <div class="row"><div class="span12"><span data-lift="ProfileLocBlog.uploadBgImg" id="bg-fileupload-outer" ></span></div></div> - <div class="row"><div class="span12"><span data-lift="ProfileLocBlog.uploadImg" id="pic-fileupload-outer" ></span></div></div> + <div class="row-fluid"> + <div id="blog-writers" class="span12"> + <div class="scrollbar"><div class="track"><div class="thumb"> + <div class="end"></div></div></div></div> + <div class="viewport"> + <div class="overview"> + <span data-lift="ProfileLocBlog.writers"></span> + </div> + </div> + </div> + </div> + + <div id="profile-inner"> + + <div class="row-fluid"> + <div id="blog-url" class="span12 text-center"> + <span data-lift="ProfileLocBlog.url"></span> + </div> + </div> + + <div class="row-fluid"> + <div id="blog-img" class="span12 text-center"> + <img data-lift="ProfileLocBlog.img"> + </div> + </div> + + <div class="row-fluid"> + <div id="blog-name" class="span12 up-separate text-center"> + <span data-lift="ProfileLocBlog.name"></span> + </div> + </div> + + <div class="row-fluid"> + <div id="blog-description" class="span12 text-center up-separate article"> + <span data-lift="ProfileLocBlog.description"></span> + </div> + </div> + + </div> + </div> + </div> + + <div id="profile-articles-area" class="row-fluid"> + <div class="span12"> + <div class="boxed-articles"> + <span data-lift="ProfileLocBlog.articles"></span> + </div> + </div> + </div> + +</div> - <div class="row"><div class="span12">Articles: <br><span data-lift="ProfileLocBlog.articles" id="blog-articles" ></span></div></div> -</div> -\ No newline at end of file + + + + + + + + + + <div class="row"><div class="span12"><span data-lift="ProfileLocBlog.uploadBgImg" id="bg-fileupload-outer" ></span></div></div> + <div class="row"><div class="span12"><span data-lift="ProfileLocBlog.uploadImg" id="pic-fileupload-outer" ></span></div></div> diff --git a/src/main/webapp/templates-hidden/parts/categories.html b/src/main/webapp/templates-hidden/parts/categories.html @@ -1,17 +1,20 @@ -<div data-lift="CategoriesSnip" class="inner"> +<div data-lift="CategoriesSnip"> - <form data-lift="form.ajax"> - <label class="inline"> - <input id="category-input" placeholder="Submit New Category"> - <input id="category-add" class="btn btn-primary"> - </label> - </form> + <div class="row-fluid"> - <br> + <div class="span8"> + <form data-lift="form.ajax?class=input-append"> + <input id="category-input" placeholder="Submit New Category"> + <input id="category-add" class="btn btn-primary"> + </form> + <br> + <div id="chosen-categories" class="well"></div> + </div> - <label id="chosen-categories" class="inline"></label> + <div class="span4"> + <h3>Advice</h3> + People will find you by category. Choose carefully. + </div> + </div> - <form data-lift="form.ajax"> - <input id="categories-continue" class="btn btn-success"> - </form> </div> \ No newline at end of file diff --git a/src/main/webapp/templates-hidden/parts/footer.html b/src/main/webapp/templates-hidden/parts/footer.html @@ -1,4 +1,5 @@ <footer> <br /> - <p>&copy; Joe Reader 2012</p> + <ul data-lift="Menus.group?group=topbar" class="inline"></ul> + <span>&copy; Read Means 2013</span> </footer> diff --git a/src/main/webapp/templates-hidden/parts/user-profile.html b/src/main/webapp/templates-hidden/parts/user-profile.html @@ -1,15 +1,100 @@ -<div> +<div data-lift="ProfileLocReader.surround" id="profile-wrap"> - <div class="row"><div class="span12">Name: <span data-lift="ProfileLocReader.name" id="user-name" ></span></div></div> - <div class="row"><div class="span12">About: <span data-lift="ProfileLocWriter.about" id="user-about" ></span></div></div> - <div class="row"><div class="span12">Youtube Vid: <span data-lift="ProfileLocWriter.introVid" id="intro-vid" ></span></div></div> + <div id="bg"> + <img data-lift="ProfileLocWriter.bgImg"> + </div> - <div class="row"><div class="span12">Img: <img data-lift="ProfileLocReader.img" id="user-img"></div></div> - <div class="row"><div class="span12">Bg Img: <img data-lift="ProfileLocWriter.bgImg" id="user-bgimg"></div></div> + <div class="boxed-articles"> + <div id="profile"> + <div id="profile-inner"> - <div class="row"><div class="span12"><span data-lift="ProfileLocWriter.uploadBgImg" id="bg-fileupload-outer" ></span></div></div> - <div class="row"><div class="span12"><span data-lift="ProfileLocReader.uploadImg" id="pic-fileupload-outer" ></span></div></div> + <a data-lift="ProfileLocReader.previewPage" class="nolink-decoration"> + <div class="row-fluid"> + <div id="profile-img" class="span12 text-center"> + <img data-lift="ProfileLocReader.img"> + </div> + </div> - <div class="row"><div class="span12">Articles: <br><span data-lift="ProfileLocWriter.articles" id="user-articles" ></span></div></div> + <div class="row-fluid"> + <div id="user-name" class="span12 text-center up-separate"> + <span data-lift="ProfileLocReader.name"></span> + </div> + </div> + + <div class="row-fluid"> + <div id="user-about" class="span12 text-center up-separate article short-ver" style="background: transparent; padding-top:0; padding-bottom:0;"> + <span data-lift="ProfileLocWriter.about"></span> + </div> + </div> + </a> + + <div class="row-fluid"> + <div class="span12 text-center"> + <span data-lift="ProfileLocWriter.followButton"></span> + <div id="following-amount"> + <span data-lift="ProfileLocWriter.followersAmount"></span> + </div> + <span data-lift="ProfileLocWriter.uploadButton"></span> + </div> + </div> + + + <div class="row-fluid" id="user-follow"> + <div class="span12 text-center"> + <strong><span data-lift="ProfileLocWriter.followingAmount"></span></strong> + <div class="inline"> + <span data-lift="ProfileLocWriter.followingList"></span> + </div> + </div> + </div> + + </div> + </div> + </div> + + <div id="profile-articles-area" class="row-fluid"> + <div class="span12"> + <div class="boxed-articles"> + <span data-lift="ProfileLocWriter.articles"></span> + </div> + </div> + </div> + + + <div data-lift="tail"> + <div id="settingsModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="settingsModalLabel" aria-hidden="true"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="settingsModalLabel">Media Settings</h3> + </div> + + <div class="modal-body"> + <div id="intro-vid" class="well well-small"> + <p>Enter a Youtube video id to influence people to follow you. Must be 30 seconds or less:</p> + <span> + <span data-lift="ProfileLocWriter.introVid"></span> + <img class="yt" src="/img/yt95x40.png"> + <span class="help-inline"><small>www.youtube.com/watch?v=<span style="color:red">0Bmhjf0rKe8</span></small></span> + </span> + </div> + + <p>Upload a new background image:</p> + <span data-lift="ProfileLocWriter.uploadBgImg" id="bg-fileupload-outer" ></span> + <hr> + <p>Upload a new profile image:</p> + <span data-lift="ProfileLocReader.uploadImg" id="pic-fileupload-outer" ></span> + <hr> + <p>Enter other Youtube video ids: interviews, speeches, etc.</p> + <span> + <span data-lift="CurrentWriter.otherVid" id="user-other-vid"></span> + <span class="help-inline"><small>Separate by comma: 0Bmhj8, jfKe8</small></span> + </span> + </div> + + <div class="modal-footer"> + <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> + </div> + </div> + </div> </div> \ No newline at end of file diff --git a/src/main/webapp/templates-hidden/parts/verification.html b/src/main/webapp/templates-hidden/parts/verification.html @@ -1,29 +1,54 @@ <div data-lift="Verification"> - <div id="verify-state" class="inner"> - - <h2>Verify your Blog</h2> - <form data-lift="form.ajax"> - Blog Url: <input id="blog-url" placeholder="ie. www.example.com/blog"> - <span data-alertid="blog-url_err" class="notice-block"></span> - <br> - <input id="search-blog" data-loading-text="Loading..."> - </form> - - Select yourself as a writer for your blog. If there's more than one writer, answer if you're an owner. - <div id="writer-list"></div><br> - - <div id="blog-owner-q" class="hide"> - Are you the owner of the blog? - <input id="blog-owner-q-yes" class="radio" /> <span>Yes</span> - <input id="blog-owner-q-no" class="radio" /> <span>No</span> + <div id="verify-state" class="row-fluid"> + <div class="span8"> + <form data-lift="form.ajax?class=form-search"> + Blog Url: + <div class="input-append"> + <input id="blog-url" placeholder="ie. www.example.com/blog.html" class="span10 search-query"> + <span data-alertid="blog-url_err" class="notice-block"></span> + <input id="search-blog" class="btn btn-primary"> + </div> + </form> + + <div id="writer-list"></div><br> + + <div id="blog-owner-q"> + <span>Are you the owner of the blog?</span> + <input id="blog-owner-q-yes" class="radio" style="margin-left: 20px" /> <span>Yes</span> + <input id="blog-owner-q-no" class="radio" style="margin-left: 20px" /> <span>No</span> + </div> + + <div id="verification-info"> + <form data-lift="form.ajax"> + <div class="up-separate"></div> + <div class="well well-small" id="verification-info-input" style="margin:0"></div> + <span class="help-block">Copy and paste this meta tag to the &lt;head&gt; of your index.html file or equivalent.</span> + <div class="up-separate"></div> + <input id="verify-blog" class="btn btn-primary btn-large"> + </form> + </div> </div> - <div id="verification-info" class="hide"> - <form data-lift="form.ajax"> - <div id="verification-info-input"></div> - <p>Copy and paste this meta tag to the &lt;head&gt; of your index.html file or equivalent.</p><br> - <input id="verify-blog"> - </form> + <div class="span4"> + <div id="verification-help"> + <h3>Help</h3> + <p>Select yourself as a writer for your blog. If there's more than one writer, select if you're the owner to edit your blog profile page.</p> + <hr> + + <div> + <p>To verify Wordpress.com blogs, you must login with O-Authentication. It's safe and secure. Just click on the Wordpress logo.</p> + <p> + <a id="wordpress-login"><img src="/img/wp.png" width="200" /></a> + </p> + + <p>Need help verifying with other services?</p> + <ul class="inline"> + <li><a id="blogger-link" target="_blank">Blogger</a></li> + <li><a id="tumblr-link" target="_blank">Tumblr</a></li> + </ul> + + </div> + </div> </div> </div> diff --git a/src/main/webapp/templates-hidden/parts/writers-gallery.html b/src/main/webapp/templates-hidden/parts/writers-gallery.html @@ -0,0 +1,81 @@ + + +<div id="gallery"> + + <div id="gallery-nav" class="container"> + + <div id="nav-buttons" > + <a href="#gallery-view1"><img src="_/img/thumbs/thumb1.jpg" ></a> + <a href="#gallery-view2"><img src="_/img/thumbs/thumb2.jpg" ></a> + <a href="#gallery-view3"><img src="_/img/thumbs/thumb3.jpg" ></a> + <a href="#gallery-view4"><img src="_/img/thumbs/thumb4.jpg" ></a> + <a href="#gallery-view5"><img src="_/img/thumbs/thumb5.jpg" ></a> + <a href="#gallery-view6"><img src="_/img/thumbs/thumb6.jpg" ></a> + <a href="#gallery-view7"><img src="_/img/thumbs/thumb7.jpg" ></a> + <a href="#gallery-view8"><img src="_/img/thumbs/thumb8.jpg" ></a> + </div> + </div> + + <div id="gallery-view" class="tab-content"> + + <div class="tab-pane active" id="gallery-view1"> + <img class="bg" src="_/img/large/image1.jpg"> + <div class="container"> + <div class="row-fluid gallery-caption"> + <div class="span6 info"> + <h4><small class="lead">Gustav Andersson </small>Traveling</h4><br> + <p class="lead">"I explore what makes life exciting, meaningful and authentic."</p> + </div> + + </div> + </div> + </div> + + <div class="tab-pane" id="gallery-view2"> + <img class="bg" src="_/img/large/image2.jpg"> + <div class="container"> + <div class="row-fluid gallery-caption"> + <div class="span6"> + <h1>One more for good measure.</h1> + <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> + </div> + <div class="span6"></div> + </div> + </div> + </div> + <div class="tab-pane" id="gallery-view3"> + <img class="bg" src="_/img/large/image3.jpg"> + <div class="container"> + <div class="gallery-caption"> + <h1>One more for good measure.</h1> + <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> + </div> + </div> + </div> + <div class="tab-pane" id="gallery-view4"> + <img class="bg" src="_/img/large/image4.jpg"> + <div class="container"> + <div class="gallery-caption"> + <h1>One more for good measure.</h1> + <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> + </div> + </div> + </div> + <div class="tab-pane" id="gallery-view5"> + <img src="_/img/large/image5.jpg"> + </div> + <div class="tab-pane" id="gallery-view6"> + <img src="_/img/large/image6.jpg"> + </div> + <div class="tab-pane" id="gallery-view7"> + <img src="_/img/large/image7.jpg"> + </div> + <div class="tab-pane" id="gallery-view8"> + <img src="_/img/large/image8.jpg"> + </div> + </div> + + + +</div> + diff --git a/src/main/webapp/templates-hidden/settings-wrap.html b/src/main/webapp/templates-hidden/settings-wrap.html @@ -1,13 +1,10 @@ <div data-lift="surround?with=default;at=content"> - <div class="row"> + <div class="row-fluid"> <div class="span12"> - <div data-lift="Notices"></div> <ul data-lift="Menus.group?group=settings" class="nav nav-tabs"></ul> </div> - <div class="span10"> + <div class="span12"> <div id="content"></div> </div> - <div class="span2"> - </div> </div> </div> diff --git a/src/main/webapp/user.html b/src/main/webapp/user.html @@ -1,3 +1,6 @@ -<div data-lift="surround?with=default;at=content"> +<div data-lift="surround?with=base-wrap;at=content" xmlns:lift="http://www.w3.org/1999/xhtml"> + <lift:head> + <title data-lift="Menu.title">Read Means: %*%</title> + </lift:head> <span data-lift="embed?what=/templates-hidden/parts/user-profile"></span> </div> \ No newline at end of file