Commit c60c2c15 authored by Sindre Sorhus's avatar Sindre Sorhus

Upgrade site to Bootstrap 2.1

parent 528500a3
/*! /*!
* Bootstrap Responsive v2.0.2 * Bootstrap Responsive v2.1.0
* *
* Copyright 2012 Twitter, Inc * Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0 * Licensed under the Apache License v2.0
...@@ -7,181 +7,90 @@ ...@@ -7,181 +7,90 @@
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world @twitter by @mdo and @fat.
*/ */
.clearfix { .clearfix {
*zoom: 1; *zoom: 1;
} }
.clearfix:before, .clearfix:before,
.clearfix:after { .clearfix:after {
display: table; display: table;
line-height: 0;
content: ""; content: "";
} }
.clearfix:after { .clearfix:after {
clear: both; clear: both;
} }
.hide-text { .hide-text {
overflow: hidden; font: 0/0 a;
text-indent: 100%; color: transparent;
white-space: nowrap; text-shadow: none;
background-color: transparent;
border: 0;
} }
.input-block-level { .input-block-level {
display: block; display: block;
width: 100%; width: 100%;
min-height: 28px; min-height: 30px;
/* Make inputs at least the height of their button counterpart */
/* Makes inputs behave like true block-level elements */
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-ms-box-sizing: border-box; box-sizing: border-box;
box-sizing: border-box;
} }
.hidden { .hidden {
display: none; display: none;
visibility: hidden; visibility: hidden;
} }
.visible-phone { .visible-phone {
display: none; display: none !important;
} }
.visible-tablet { .visible-tablet {
display: none; display: none !important;
}
.visible-desktop {
display: block;
}
.hidden-phone {
display: block;
}
.hidden-tablet {
display: block;
} }
.hidden-desktop { .hidden-desktop {
display: none; display: none !important;
} }
@media (max-width: 767px) {
.visible-phone { .visible-desktop {
display: block; display: inherit !important;
} }
.hidden-phone {
display: none; @media (min-width: 768px) and (max-width: 979px) {
}
.hidden-desktop { .hidden-desktop {
display: block; display: inherit !important;
} }
.visible-desktop { .visible-desktop {
display: none; display: none !important ;
} }
}
@media (min-width: 768px) and (max-width: 979px) {
.visible-tablet { .visible-tablet {
display: block; display: inherit !important;
} }
.hidden-tablet { .hidden-tablet {
display: none; display: none !important;
} }
}
@media (max-width: 767px) {
.hidden-desktop { .hidden-desktop {
display: block; display: inherit !important;
} }
.visible-desktop { .visible-desktop {
display: none; display: none !important;
}
}
@media (max-width: 480px) {
.nav-collapse {
-webkit-transform: translate3d(0, 0, 0);
}
.page-header h1 small {
display: block;
line-height: 18px;
}
input[type="checkbox"],
input[type="radio"] {
border: 1px solid #ccc;
}
.form-horizontal .control-group > label {
float: none;
width: auto;
padding-top: 0;
text-align: left;
}
.form-horizontal .controls {
margin-left: 0;
}
.form-horizontal .control-list {
padding-top: 0;
}
.form-horizontal .form-actions {
padding-left: 10px;
padding-right: 10px;
}
.modal {
position: absolute;
top: 10px;
left: 10px;
right: 10px;
width: auto;
margin: 0;
} }
.modal.fade.in { .visible-phone {
top: auto; display: inherit !important;
}
.modal-header .close {
padding: 10px;
margin: -10px;
} }
.carousel-caption { .hidden-phone {
position: static; display: none !important;
} }
} }
@media (max-width: 767px) {
body {
padding-left: 20px;
padding-right: 20px;
}
.navbar-fixed-top {
margin-left: -20px;
margin-right: -20px;
}
.container {
width: auto;
}
.row-fluid {
width: 100%;
}
.row {
margin-left: 0;
}
.row > [class*="span"],
.row-fluid > [class*="span"] {
float: none;
display: block;
width: auto;
margin: 0;
}
.thumbnails [class*="span"] {
width: auto;
}
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
display: block;
width: 100%;
min-height: 28px;
/* Make inputs at least the height of their button counterpart */
/* Makes inputs behave like true block-level elements */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.input-prepend input[class*="span"],
.input-append input[class*="span"] {
width: auto;
}
}
@media (min-width: 768px) and (max-width: 979px) { @media (min-width: 768px) and (max-width: 979px) {
.row { .row {
margin-left: -20px; margin-left: -20px;
...@@ -190,6 +99,7 @@ ...@@ -190,6 +99,7 @@
.row:before, .row:before,
.row:after { .row:after {
display: table; display: table;
line-height: 0;
content: ""; content: "";
} }
.row:after { .row:after {
...@@ -200,6 +110,7 @@ ...@@ -200,6 +110,7 @@
margin-left: 20px; margin-left: 20px;
} }
.container, .container,
.navbar-static-top .container,
.navbar-fixed-top .container, .navbar-fixed-top .container,
.navbar-fixed-bottom .container { .navbar-fixed-bottom .container {
width: 724px; width: 724px;
...@@ -283,105 +194,382 @@ ...@@ -283,105 +194,382 @@
.row-fluid:before, .row-fluid:before,
.row-fluid:after { .row-fluid:after {
display: table; display: table;
line-height: 0;
content: ""; content: "";
} }
.row-fluid:after { .row-fluid:after {
clear: both; clear: both;
} }
.row-fluid > [class*="span"] { .row-fluid [class*="span"] {
display: block;
float: left; float: left;
margin-left: 2.762430939%; width: 100%;
min-height: 30px;
margin-left: 2.7624309392265194%;
*margin-left: 2.709239449864817%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
} }
.row-fluid > [class*="span"]:first-child { .row-fluid [class*="span"]:first-child {
margin-left: 0; margin-left: 0;
} }
.row-fluid > .span12 { .row-fluid .span12 {
width: 99.999999993%; width: 100%;
*width: 99.94680851063829%;
}
.row-fluid .span11 {
width: 91.43646408839778%;
*width: 91.38327259903608%;
}
.row-fluid .span10 {
width: 82.87292817679558%;
*width: 82.81973668743387%;
}
.row-fluid .span9 {
width: 74.30939226519337%;
*width: 74.25620077583166%;
}
.row-fluid .span8 {
width: 65.74585635359117%;
*width: 65.69266486422946%;
}
.row-fluid .span7 {
width: 57.18232044198895%;
*width: 57.12912895262725%;
}
.row-fluid .span6 {
width: 48.61878453038674%;
*width: 48.56559304102504%;
} }
.row-fluid > .span11 { .row-fluid .span5 {
width: 91.436464082%; width: 40.05524861878453%;
*width: 40.00205712942283%;
} }
.row-fluid > .span10 { .row-fluid .span4 {
width: 82.87292817100001%; width: 31.491712707182323%;
*width: 31.43852121782062%;
} }
.row-fluid > .span9 { .row-fluid .span3 {
width: 74.30939226%; width: 22.92817679558011%;
*width: 22.87498530621841%;
} }
.row-fluid > .span8 { .row-fluid .span2 {
width: 65.74585634900001%; width: 14.3646408839779%;
*width: 14.311449394616199%;
} }
.row-fluid > .span7 { .row-fluid .span1 {
width: 57.182320438000005%; width: 5.801104972375691%;
*width: 5.747913483013988%;
} }
.row-fluid > .span6 { .row-fluid .offset12 {
width: 48.618784527%; margin-left: 105.52486187845304%;
*margin-left: 105.41847889972962%;
} }
.row-fluid > .span5 { .row-fluid .offset12:first-child {
width: 40.055248616%; margin-left: 102.76243093922652%;
*margin-left: 102.6560479605031%;
} }
.row-fluid > .span4 { .row-fluid .offset11 {
width: 31.491712705%; margin-left: 96.96132596685082%;
*margin-left: 96.8549429881274%;
} }
.row-fluid > .span3 { .row-fluid .offset11:first-child {
width: 22.928176794%; margin-left: 94.1988950276243%;
*margin-left: 94.09251204890089%;
} }
.row-fluid > .span2 { .row-fluid .offset10 {
width: 14.364640883%; margin-left: 88.39779005524862%;
*margin-left: 88.2914070765252%;
} }
.row-fluid > .span1 { .row-fluid .offset10:first-child {
width: 5.801104972%; margin-left: 85.6353591160221%;
*margin-left: 85.52897613729868%;
}
.row-fluid .offset9 {
margin-left: 79.8342541436464%;
*margin-left: 79.72787116492299%;
}
.row-fluid .offset9:first-child {
margin-left: 77.07182320441989%;
*margin-left: 76.96544022569647%;
}
.row-fluid .offset8 {
margin-left: 71.2707182320442%;
*margin-left: 71.16433525332079%;
}
.row-fluid .offset8:first-child {
margin-left: 68.50828729281768%;
*margin-left: 68.40190431409427%;
}
.row-fluid .offset7 {
margin-left: 62.70718232044199%;
*margin-left: 62.600799341718584%;
}
.row-fluid .offset7:first-child {
margin-left: 59.94475138121547%;
*margin-left: 59.838368402492065%;
}
.row-fluid .offset6 {
margin-left: 54.14364640883978%;
*margin-left: 54.037263430116376%;
}
.row-fluid .offset6:first-child {
margin-left: 51.38121546961326%;
*margin-left: 51.27483249088986%;
}
.row-fluid .offset5 {
margin-left: 45.58011049723757%;
*margin-left: 45.47372751851417%;
}
.row-fluid .offset5:first-child {
margin-left: 42.81767955801105%;
*margin-left: 42.71129657928765%;
}
.row-fluid .offset4 {
margin-left: 37.01657458563536%;
*margin-left: 36.91019160691196%;
}
.row-fluid .offset4:first-child {
margin-left: 34.25414364640884%;
*margin-left: 34.14776066768544%;
}
.row-fluid .offset3 {
margin-left: 28.45303867403315%;
*margin-left: 28.346655695309746%;
}
.row-fluid .offset3:first-child {
margin-left: 25.69060773480663%;
*margin-left: 25.584224756083227%;
}
.row-fluid .offset2 {
margin-left: 19.88950276243094%;
*margin-left: 19.783119783707537%;
}
.row-fluid .offset2:first-child {
margin-left: 17.12707182320442%;
*margin-left: 17.02068884448102%;
}
.row-fluid .offset1 {
margin-left: 11.32596685082873%;
*margin-left: 11.219583872105325%;
}
.row-fluid .offset1:first-child {
margin-left: 8.56353591160221%;
*margin-left: 8.457152932878806%;
} }
input, input,
textarea, textarea,
.uneditable-input { .uneditable-input {
margin-left: 0; margin-left: 0;
} }
input.span12, textarea.span12, .uneditable-input.span12 { .controls-row [class*="span"] + [class*="span"] {
width: 714px; margin-left: 20px;
}
input.span12,
textarea.span12,
.uneditable-input.span12 {
width: 710px;
}
input.span11,
textarea.span11,
.uneditable-input.span11 {
width: 648px;
}
input.span10,
textarea.span10,
.uneditable-input.span10 {
width: 586px;
}
input.span9,
textarea.span9,
.uneditable-input.span9 {
width: 524px;
}
input.span8,
textarea.span8,
.uneditable-input.span8 {
width: 462px;
}
input.span7,
textarea.span7,
.uneditable-input.span7 {
width: 400px;
}
input.span6,
textarea.span6,
.uneditable-input.span6 {
width: 338px;
}
input.span5,
textarea.span5,
.uneditable-input.span5 {
width: 276px;
}
input.span4,
textarea.span4,
.uneditable-input.span4 {
width: 214px;
}
input.span3,
textarea.span3,
.uneditable-input.span3 {
width: 152px;
}
input.span2,
textarea.span2,
.uneditable-input.span2 {
width: 90px;
}
input.span1,
textarea.span1,
.uneditable-input.span1 {
width: 28px;
}
}
@media (max-width: 767px) {
body {
padding-right: 20px;
padding-left: 20px;
}
.navbar-fixed-top,
.navbar-fixed-bottom {
margin-right: -20px;
margin-left: -20px;
}
.container-fluid {
padding: 0;
}
.dl-horizontal dt {
float: none;
width: auto;
clear: none;
text-align: left;
}
.dl-horizontal dd {
margin-left: 0;
}
.container {
width: auto;
}
.row-fluid {
width: 100%;
}
.row,
.thumbnails {
margin-left: 0;
}
.thumbnails > li {
float: none;
margin-left: 0;
}
[class*="span"],
.row-fluid [class*="span"] {
display: block;
float: none;
width: auto;
margin-left: 0;
}
.span12,
.row-fluid .span12 {
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.input-large,
.input-xlarge,
.input-xxlarge,
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.input-prepend input,
.input-append input,
.input-prepend input[class*="span"],
.input-append input[class*="span"] {
display: inline-block;
width: auto;
}
.modal {
position: fixed;
top: 20px;
right: 20px;
left: 20px;
width: auto;
margin: 0;
} }
input.span11, textarea.span11, .uneditable-input.span11 { .modal.fade.in {
width: 652px; top: auto;
} }
input.span10, textarea.span10, .uneditable-input.span10 { }
width: 590px;
@media (max-width: 480px) {
.nav-collapse {
-webkit-transform: translate3d(0, 0, 0);
} }
input.span9, textarea.span9, .uneditable-input.span9 { .page-header h1 small {
width: 528px; display: block;
line-height: 20px;
} }
input.span8, textarea.span8, .uneditable-input.span8 { input[type="checkbox"],
width: 466px; input[type="radio"] {
border: 1px solid #ccc;
} }
input.span7, textarea.span7, .uneditable-input.span7 { .form-horizontal .control-group > label {
width: 404px; float: none;
width: auto;
padding-top: 0;
text-align: left;
} }
input.span6, textarea.span6, .uneditable-input.span6 { .form-horizontal .controls {
width: 342px; margin-left: 0;
} }
input.span5, textarea.span5, .uneditable-input.span5 { .form-horizontal .control-list {
width: 280px; padding-top: 0;
} }
input.span4, textarea.span4, .uneditable-input.span4 { .form-horizontal .form-actions {
width: 218px; padding-right: 10px;
padding-left: 10px;
} }
input.span3, textarea.span3, .uneditable-input.span3 { .modal {
width: 156px; top: 10px;
right: 10px;
left: 10px;
} }
input.span2, textarea.span2, .uneditable-input.span2 { .modal-header .close {
width: 94px; padding: 10px;
margin: -10px;
} }
input.span1, textarea.span1, .uneditable-input.span1 { .carousel-caption {
width: 32px; position: static;
} }
} }
@media (max-width: 979px) { @media (max-width: 979px) {
body { body {
padding-top: 0; padding-top: 0;
} }
.navbar-fixed-top { .navbar-fixed-top,
.navbar-fixed-bottom {
position: static; position: static;
margin-bottom: 18px;
} }
.navbar-fixed-top .navbar-inner { .navbar-fixed-top {
margin-bottom: 20px;
}
.navbar-fixed-bottom {
margin-top: 20px;
}
.navbar-fixed-top .navbar-inner,
.navbar-fixed-bottom .navbar-inner {
padding: 5px; padding: 5px;
} }
.navbar .container { .navbar .container {
...@@ -389,98 +577,115 @@ ...@@ -389,98 +577,115 @@
padding: 0; padding: 0;
} }
.navbar .brand { .navbar .brand {
padding-left: 10px;
padding-right: 10px; padding-right: 10px;
padding-left: 10px;
margin: 0 0 0 -5px; margin: 0 0 0 -5px;
} }
.navbar .nav-collapse { .nav-collapse {
clear: left; clear: both;
} }
.navbar .nav { .nav-collapse .nav {
float: none; float: none;
margin: 0 0 9px; margin: 0 0 10px;
} }
.navbar .nav > li { .nav-collapse .nav > li {
float: none; float: none;
} }
.navbar .nav > li > a { .nav-collapse .nav > li > a {
margin-bottom: 2px; margin-bottom: 2px;
} }
.navbar .nav > .divider-vertical { .nav-collapse .nav > .divider-vertical {
display: none; display: none;
} }
.navbar .nav .nav-header { .nav-collapse .nav .nav-header {
color: #999999; color: #555555;
text-shadow: none; text-shadow: none;
} }
.navbar .nav > li > a, .nav-collapse .nav > li > a,
.navbar .dropdown-menu a { .nav-collapse .dropdown-menu a {
padding: 6px 15px; padding: 9px 15px;
font-weight: bold; font-weight: bold;
color: #999999; color: #555555;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
}
.nav-collapse .btn {
padding: 4px 10px 4px;
font-weight: normal;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
} }
.navbar .dropdown-menu li + li a { .nav-collapse .dropdown-menu li + li a {
margin-bottom: 2px; margin-bottom: 2px;
} }
.navbar .nav > li > a:hover, .nav-collapse .nav > li > a:hover,
.navbar .dropdown-menu a:hover { .nav-collapse .dropdown-menu a:hover {
background-color: #222222; background-color: #f2f2f2;
} }
.navbar .dropdown-menu { .navbar-inverse .nav-collapse .nav > li > a:hover,
.navbar-inverse .nav-collapse .dropdown-menu a:hover {
background-color: #111111;
}
.nav-collapse.in .btn-group {
padding: 0;
margin-top: 5px;
}
.nav-collapse .dropdown-menu {
position: static; position: static;
top: auto; top: auto;
left: auto; left: auto;
float: none;
display: block; display: block;
float: none;
max-width: none; max-width: none;
margin: 0 15px;
padding: 0; padding: 0;
margin: 0 15px;
background-color: transparent; background-color: transparent;
border: none; border: none;
-webkit-border-radius: 0; -webkit-border-radius: 0;
-moz-border-radius: 0; -moz-border-radius: 0;
border-radius: 0; border-radius: 0;
-webkit-box-shadow: none; -webkit-box-shadow: none;
-moz-box-shadow: none; -moz-box-shadow: none;
box-shadow: none; box-shadow: none;
} }
.navbar .dropdown-menu:before, .nav-collapse .dropdown-menu:before,
.navbar .dropdown-menu:after { .nav-collapse .dropdown-menu:after {
display: none; display: none;
} }
.navbar .dropdown-menu .divider { .nav-collapse .dropdown-menu .divider {
display: none; display: none;
} }
.navbar-form, .nav-collapse .navbar-form,
.navbar-search { .nav-collapse .navbar-search {
float: none; float: none;
padding: 9px 15px; padding: 10px 15px;
margin: 9px 0; margin: 10px 0;
border-top: 1px solid #222222; border-top: 1px solid #f2f2f2;
border-bottom: 1px solid #222222; border-bottom: 1px solid #f2f2f2;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
} }
.navbar .nav.pull-right { .navbar .nav-collapse .nav.pull-right {
float: none; float: none;
margin-left: 0; margin-left: 0;
} }
.navbar-static .navbar-inner { .nav-collapse,
padding-left: 10px; .nav-collapse.collapse {
padding-right: 10px; height: 0;
overflow: hidden;
} }
.btn-navbar { .navbar .btn-navbar {
display: block; display: block;
} }
.nav-collapse { .navbar-static .navbar-inner {
overflow: hidden; padding-right: 10px;
height: 0; padding-left: 10px;
} }
} }
@media (min-width: 980px) { @media (min-width: 980px) {
.nav-collapse.collapse { .nav-collapse.collapse {
height: auto !important; height: auto !important;
......
.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} /*!
.clearfix:after{clear:both;} * Bootstrap Responsive v2.1.0
.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;} *
.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} * Copyright 2012 Twitter, Inc
.hidden{display:none;visibility:hidden;} * Licensed under the Apache License v2.0
.visible-phone{display:none;} * http://www.apache.org/licenses/LICENSE-2.0
.visible-tablet{display:none;} *
.visible-desktop{display:block;} * Designed and built with all the love in the world @twitter by @mdo and @fat.
.hidden-phone{display:block;} */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#555;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
.hidden-tablet{display:block;}
.hidden-desktop{display:none;}
@media (max-width:767px){.visible-phone{display:block;} .hidden-phone{display:none;} .hidden-desktop{display:block;} .visible-desktop{display:none;}}@media (min-width:768px) and (max-width:979px){.visible-tablet{display:block;} .hidden-tablet{display:none;} .hidden-desktop{display:block;} .visible-desktop{display:none;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:18px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{position:absolute;top:10px;left:10px;right:10px;width:auto;margin:0;}.modal.fade.in{top:auto;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top{margin-left:-20px;margin-right:-20px;} .container{width:auto;} .row-fluid{width:100%;} .row{margin-left:0;} .row>[class*="span"],.row-fluid>[class*="span"]{float:none;display:block;width:auto;margin:0;} .thumbnails [class*="span"]{width:auto;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} .input-prepend input[class*="span"],.input-append input[class*="span"]{width:auto;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} .row-fluid:after{clear:both;} .row-fluid>[class*="span"]{float:left;margin-left:2.762430939%;} .row-fluid>[class*="span"]:first-child{margin-left:0;} .row-fluid > .span12{width:99.999999993%;} .row-fluid > .span11{width:91.436464082%;} .row-fluid > .span10{width:82.87292817100001%;} .row-fluid > .span9{width:74.30939226%;} .row-fluid > .span8{width:65.74585634900001%;} .row-fluid > .span7{width:57.182320438000005%;} .row-fluid > .span6{width:48.618784527%;} .row-fluid > .span5{width:40.055248616%;} .row-fluid > .span4{width:31.491712705%;} .row-fluid > .span3{width:22.928176794%;} .row-fluid > .span2{width:14.364640883%;} .row-fluid > .span1{width:5.801104972%;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:714px;} input.span11, textarea.span11, .uneditable-input.span11{width:652px;} input.span10, textarea.span10, .uneditable-input.span10{width:590px;} input.span9, textarea.span9, .uneditable-input.span9{width:528px;} input.span8, textarea.span8, .uneditable-input.span8{width:466px;} input.span7, textarea.span7, .uneditable-input.span7{width:404px;} input.span6, textarea.span6, .uneditable-input.span6{width:342px;} input.span5, textarea.span5, .uneditable-input.span5{width:280px;} input.span4, textarea.span4, .uneditable-input.span4{width:218px;} input.span3, textarea.span3, .uneditable-input.span3{width:156px;} input.span2, textarea.span2, .uneditable-input.span2{width:94px;} input.span1, textarea.span1, .uneditable-input.span1{width:32px;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top{position:static;margin-bottom:18px;} .navbar-fixed-top .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .navbar .nav-collapse{clear:left;} .navbar .nav{float:none;margin:0 0 9px;} .navbar .nav>li{float:none;} .navbar .nav>li>a{margin-bottom:2px;} .navbar .nav>.divider-vertical{display:none;} .navbar .nav .nav-header{color:#999999;text-shadow:none;} .navbar .nav>li>a,.navbar .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .navbar .dropdown-menu li+li a{margin-bottom:2px;} .navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover{background-color:#222222;} .navbar .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .navbar .dropdown-menu:before,.navbar .dropdown-menu:after{display:none;} .navbar .dropdown-menu .divider{display:none;} .navbar-form,.navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222222;border-bottom:1px solid #222222;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.1);} .navbar .nav.pull-right{float:none;margin-left:0;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;} .btn-navbar{display:block;} .nav-collapse{overflow:hidden;height:0;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -107,18 +107,18 @@ header nav a:first-child { ...@@ -107,18 +107,18 @@ header nav a:first-child {
} }
.whats-new { .whats-new {
list-style: none; list-style: none;
} }
.whats-new li { .whats-new li {
position: relative; position: relative;
margin: 15px 0; margin: 15px 0;
} }
.whats-new li:before { .whats-new li:before {
content: '✔'; content: '✔';
position: absolute; position: absolute;
left: -20px; left: -20px;
} }
.applist { .applist {
...@@ -205,6 +205,12 @@ p .label { ...@@ -205,6 +205,12 @@ p .label {
padding: 9px 70px 9px 15px; padding: 9px 70px 9px 15px;
} }
.popover-title a {
font-size: 13px;
position: absolute;
right: 20px;
}
.quote { .quote {
border: none; border: none;
margin: 20px 0 70px 0; margin: 20px 0 70px 0;
...@@ -249,14 +255,6 @@ p .label { ...@@ -249,14 +255,6 @@ p .label {
vertical-align: middle; vertical-align: middle;
} }
.popover-title a {
font-size: 13px;
line-height: 18px;
position: absolute;
top: 16px;
right: 20px;
}
.speech-bubble { .speech-bubble {
position: relative; position: relative;
padding: 10px; padding: 10px;
......
/* =================================================== /* ===================================================
* bootstrap-transition.js v2.0.2 * bootstrap-transition.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#transitions * http://twitter.github.com/bootstrap/javascript.html#transitions
* =================================================== * ===================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -17,39 +17,48 @@ ...@@ -17,39 +17,48 @@
* limitations under the License. * limitations under the License.
* ========================================================== */ * ========================================================== */
!function( $ ) {
!function ($) {
$(function () { $(function () {
"use strict" "use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874) /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */ * ======================================================= */
$.support.transition = (function () { $.support.transition = (function () {
var thisBody = document.body || document.documentElement
, thisStyle = thisBody.style var transitionEnd = (function () {
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
var el = document.createElement('bootstrap')
return support && { , transEndEventNames = {
end: (function () { 'WebkitTransition' : 'webkitTransitionEnd'
var transitionEnd = "TransitionEnd" , 'MozTransition' : 'transitionend'
if ( $.browser.webkit ) { , 'OTransition' : 'oTransitionEnd otransitionend'
transitionEnd = "webkitTransitionEnd" , 'transition' : 'transitionend'
} else if ( $.browser.mozilla ) { }
transitionEnd = "transitionend" , name
} else if ( $.browser.opera ) {
transitionEnd = "oTransitionEnd" for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
} }
return transitionEnd }
}())
}())
return transitionEnd && {
end: transitionEnd
} }
})() })()
}) })
}( window.jQuery );/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-alert.js v2.0.2 * bootstrap-alert.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#alerts * http://twitter.github.com/bootstrap/javascript.html#alerts
* ========================================================== * ==========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -68,61 +77,57 @@ ...@@ -68,61 +77,57 @@
* ========================================================== */ * ========================================================== */
!function( $ ){ !function ($) {
"use strict"; // jshint ;_;
"use strict"
/* ALERT CLASS DEFINITION /* ALERT CLASS DEFINITION
* ====================== */ * ====================== */
var dismiss = '[data-dismiss="alert"]' var dismiss = '[data-dismiss="alert"]'
, Alert = function ( el ) { , Alert = function (el) {
$(el).on('click', dismiss, this.close) $(el).on('click', dismiss, this.close)
} }
Alert.prototype = { Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
constructor: Alert if (!selector) {
selector = $this.attr('href')
, close: function ( e ) { selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
var $this = $(this) }
, selector = $this.attr('data-target')
, $parent
if (!selector) { $parent = $(selector)
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector) e && e.preventDefault()
$parent.trigger('close')
e && e.preventDefault() $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) $parent.trigger(e = $.Event('close'))
$parent if (e.isDefaultPrevented()) return
.trigger('close')
.removeClass('in')
function removeElement() { $parent.removeClass('in')
$parent
.trigger('closed')
.remove()
}
$.support.transition && $parent.hasClass('fade') ? function removeElement() {
$parent.on($.support.transition.end, removeElement) : $parent
removeElement() .trigger('closed')
.remove()
} }
$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
} }
/* ALERT PLUGIN DEFINITION /* ALERT PLUGIN DEFINITION
* ======================= */ * ======================= */
$.fn.alert = function ( option ) { $.fn.alert = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('alert') , data = $this.data('alert')
...@@ -141,8 +146,8 @@ ...@@ -141,8 +146,8 @@
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close) $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
}) })
}( window.jQuery );/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-button.js v2.0.2 * bootstrap-button.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#buttons * http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================ * ============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -160,58 +165,54 @@ ...@@ -160,58 +165,54 @@
* limitations under the License. * limitations under the License.
* ============================================================ */ * ============================================================ */
!function( $ ){
"use strict" !function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION /* BUTTON PUBLIC CLASS DEFINITION
* ============================== */ * ============================== */
var Button = function ( element, options ) { var Button = function (element, options) {
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options) this.options = $.extend({}, $.fn.button.defaults, options)
} }
Button.prototype = { Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
constructor: Button state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
, setState: function ( state ) { $el[val](data[state] || this.options[state])
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
state = state + 'Text' // push to event loop to allow forms to submit
data.resetText || $el.data('resetText', $el[val]()) setTimeout(function () {
state == 'loadingText' ?
$el[val](data[state] || this.options[state]) $el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
// push to event loop to allow forms to submit }, 0)
setTimeout(function () { }
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
, toggle: function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
$parent && $parent Button.prototype.toggle = function () {
.find('.active') var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
.removeClass('active')
this.$element.toggleClass('active') $parent && $parent
} .find('.active')
.removeClass('active')
this.$element.toggleClass('active')
} }
/* BUTTON PLUGIN DEFINITION /* BUTTON PLUGIN DEFINITION
* ======================== */ * ======================== */
$.fn.button = function ( option ) { $.fn.button = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('button') , data = $this.data('button')
...@@ -240,8 +241,8 @@ ...@@ -240,8 +241,8 @@
}) })
}) })
}( window.jQuery );/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-carousel.js v2.0.2 * bootstrap-carousel.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#carousel * http://twitter.github.com/bootstrap/javascript.html#carousel
* ========================================================== * ==========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -260,16 +261,17 @@ ...@@ -260,16 +261,17 @@
* ========================================================== */ * ========================================================== */
!function( $ ){ !function ($) {
"use strict"; // jshint ;_;
"use strict"
/* CAROUSEL CLASS DEFINITION /* CAROUSEL CLASS DEFINITION
* ========================= */ * ========================= */
var Carousel = function (element, options) { var Carousel = function (element, options) {
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, $.fn.carousel.defaults, options) this.options = options
this.options.slide && this.slide(this.options.slide) this.options.slide && this.slide(this.options.slide)
this.options.pause == 'hover' && this.$element this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this)) .on('mouseenter', $.proxy(this.pause, this))
...@@ -278,13 +280,16 @@ ...@@ -278,13 +280,16 @@
Carousel.prototype = { Carousel.prototype = {
cycle: function () { cycle: function (e) {
this.interval = setInterval($.proxy(this.next, this), this.options.interval) if (!e) this.paused = false
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this return this
} }
, to: function (pos) { , to: function (pos) {
var $active = this.$element.find('.active') var $active = this.$element.find('.item.active')
, children = $active.parent().children() , children = $active.parent().children()
, activePos = children.index($active) , activePos = children.index($active)
, that = this , that = this
...@@ -304,7 +309,12 @@ ...@@ -304,7 +309,12 @@
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
} }
, pause: function () { , 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()
}
clearInterval(this.interval) clearInterval(this.interval)
this.interval = null this.interval = null
return this return this
...@@ -321,12 +331,15 @@ ...@@ -321,12 +331,15 @@
} }
, slide: function (type, next) { , slide: function (type, next) {
var $active = this.$element.find('.active') var $active = this.$element.find('.item.active')
, $next = next || $active[type]() , $next = next || $active[type]()
, isCycling = this.interval , isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right' , direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last' , fallback = type == 'next' ? 'first' : 'last'
, that = this , that = this
, e = $.Event('slide', {
relatedTarget: $next[0]
})
this.sliding = true this.sliding = true
...@@ -336,24 +349,26 @@ ...@@ -336,24 +349,26 @@
if ($next.hasClass('active')) return if ($next.hasClass('active')) return
if (!$.support.transition && this.$element.hasClass('slide')) { if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger('slide') this.$element.trigger(e)
$active.removeClass('active') if (e.isDefaultPrevented()) return
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
} else {
$next.addClass(type) $next.addClass(type)
$next[0].offsetWidth // force reflow $next[0].offsetWidth // force reflow
$active.addClass(direction) $active.addClass(direction)
$next.addClass(direction) $next.addClass(direction)
this.$element.trigger('slide')
this.$element.one($.support.transition.end, function () { this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active') $next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' ')) $active.removeClass(['active', direction].join(' '))
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0) 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() isCycling && this.cycle()
...@@ -367,15 +382,16 @@ ...@@ -367,15 +382,16 @@
/* CAROUSEL PLUGIN DEFINITION /* CAROUSEL PLUGIN DEFINITION
* ========================== */ * ========================== */
$.fn.carousel = function ( option ) { $.fn.carousel = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('carousel') , data = $this.data('carousel')
, options = typeof option == 'object' && option , 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 (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option) if (typeof option == 'number') data.to(option)
else if (typeof option == 'string' || (option = options.slide)) data[option]() else if (action) data[action]()
else data.cycle() else if (options.interval) data.cycle()
}) })
} }
...@@ -400,8 +416,8 @@ ...@@ -400,8 +416,8 @@
}) })
}) })
}( window.jQuery );/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-collapse.js v2.0.2 * bootstrap-collapse.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#collapse * http://twitter.github.com/bootstrap/javascript.html#collapse
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -419,16 +435,21 @@ ...@@ -419,16 +435,21 @@
* limitations under the License. * limitations under the License.
* ============================================================ */ * ============================================================ */
!function( $ ){
"use strict" !function ($) {
"use strict"; // jshint ;_;
var Collapse = function ( element, options ) { /* COLLAPSE PUBLIC CLASS DEFINITION
this.$element = $(element) * ================================ */
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options) this.options = $.extend({}, $.fn.collapse.defaults, options)
if (this.options["parent"]) { if (this.options.parent) {
this.$parent = $(this.options["parent"]) this.$parent = $(this.options.parent)
} }
this.options.toggle && this.toggle() this.options.toggle && this.toggle()
...@@ -444,31 +465,39 @@ ...@@ -444,31 +465,39 @@
} }
, show: function () { , show: function () {
var dimension = this.dimension() var dimension
, scroll = $.camelCase(['scroll', dimension].join('-')) , scroll
, actives = this.$parent && this.$parent.find('.in') , actives
, hasData , hasData
if (this.transitioning) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) { if (actives && actives.length) {
hasData = actives.data('collapse') hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide') actives.collapse('hide')
hasData || actives.data('collapse', null) hasData || actives.data('collapse', null)
} }
this.$element[dimension](0) this.$element[dimension](0)
this.transition('addClass', 'show', 'shown') this.transition('addClass', $.Event('show'), 'shown')
this.$element[dimension](this.$element[0][scroll]) $.support.transition && this.$element[dimension](this.$element[0][scroll])
} }
, hide: function () { , hide: function () {
var dimension = this.dimension() var dimension
if (this.transitioning) return
dimension = this.dimension()
this.reset(this.$element[dimension]()) this.reset(this.$element[dimension]())
this.transition('removeClass', 'hide', 'hidden') this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0) this.$element[dimension](0)
} }
, reset: function ( size ) { , reset: function (size) {
var dimension = this.dimension() var dimension = this.dimension()
this.$element this.$element
...@@ -476,37 +505,43 @@ ...@@ -476,37 +505,43 @@
[dimension](size || 'auto') [dimension](size || 'auto')
[0].offsetWidth [0].offsetWidth
this.$element[size ? 'addClass' : 'removeClass']('collapse') this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this return this
} }
, transition: function ( method, startEvent, completeEvent ) { , transition: function (method, startEvent, completeEvent) {
var that = this var that = this
, complete = function () { , complete = function () {
if (startEvent == 'show') that.reset() if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent) that.$element.trigger(completeEvent)
} }
this.$element this.$element.trigger(startEvent)
.trigger(startEvent)
[method]('in') if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ? $.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) : this.$element.one($.support.transition.end, complete) :
complete() complete()
} }
, toggle: function () { , toggle: function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']() this[this.$element.hasClass('in') ? 'hide' : 'show']()
} }
} }
/* COLLAPSIBLE PLUGIN DEFINITION
/* COLLAPSIBLE PLUGIN DEFINITION
* ============================== */ * ============================== */
$.fn.collapse = function ( option ) { $.fn.collapse = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('collapse') , data = $this.data('collapse')
...@@ -527,18 +562,19 @@ ...@@ -527,18 +562,19 @@
* ==================== */ * ==================== */
$(function () { $(function () {
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href var $this = $(this), href
, target = $this.attr('data-target') , target = $this.attr('data-target')
|| e.preventDefault() || e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data() , option = $(target).data('collapse') ? 'toggle' : $this.data()
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option) $(target).collapse(option)
}) })
}) })
}( window.jQuery );/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-dropdown.js v2.0.2 * bootstrap-dropdown.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#dropdowns * http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================ * ============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -557,15 +593,16 @@ ...@@ -557,15 +593,16 @@
* ============================================================ */ * ============================================================ */
!function( $ ){ !function ($) {
"use strict"; // jshint ;_;
"use strict"
/* DROPDOWN CLASS DEFINITION /* DROPDOWN CLASS DEFINITION
* ========================= */ * ========================= */
var toggle = '[data-toggle="dropdown"]' var toggle = '[data-toggle=dropdown]'
, Dropdown = function ( element ) { , Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle) var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () { $('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open') $el.parent().removeClass('open')
...@@ -576,39 +613,92 @@ ...@@ -576,39 +613,92 @@
constructor: Dropdown constructor: Dropdown
, toggle: function ( e ) { , toggle: function (e) {
var $this = $(this) var $this = $(this)
, selector = $this.attr('data-target')
, $parent , $parent
, isActive , isActive
if (!selector) { if ($this.is('.disabled, :disabled')) return
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector) $parent = getParent($this)
$parent.length || ($parent = $this.parent())
isActive = $parent.hasClass('open') isActive = $parent.hasClass('open')
clearMenus() clearMenus()
!isActive && $parent.toggleClass('open')
if (!isActive) {
$parent.toggleClass('open')
$this.focus()
}
return false 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)) return $this.click()
$items = $('[role=menu] li:not(.divider) 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() { function clearMenus() {
$(toggle).parent().removeClass('open') getParent($(toggle))
.removeClass('open')
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
return $parent
} }
/* DROPDOWN PLUGIN DEFINITION /* DROPDOWN PLUGIN DEFINITION
* ========================== */ * ========================== */
$.fn.dropdown = function ( option ) { $.fn.dropdown = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('dropdown') , data = $this.data('dropdown')
...@@ -624,12 +714,16 @@ ...@@ -624,12 +714,16 @@
* =================================== */ * =================================== */
$(function () { $(function () {
$('html').on('click.dropdown.data-api', clearMenus) $('html')
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
$('body')
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown', 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 );/* ========================================================= }(window.jQuery);/* =========================================================
* bootstrap-modal.js v2.0.2 * bootstrap-modal.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#modals * http://twitter.github.com/bootstrap/javascript.html#modals
* ========================================================= * =========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -648,17 +742,19 @@ ...@@ -648,17 +742,19 @@
* ========================================================= */ * ========================================================= */
!function( $ ){ !function ($) {
"use strict"; // jshint ;_;
"use strict"
/* MODAL CLASS DEFINITION /* MODAL CLASS DEFINITION
* ====================== */ * ====================== */
var Modal = function ( content, options ) { var Modal = function (element, options) {
this.options = options this.options = options
this.$element = $(content) this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) .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 = { Modal.prototype = {
...@@ -671,19 +767,24 @@ ...@@ -671,19 +767,24 @@
, show: function () { , show: function () {
var that = this var that = this
, e = $.Event('show')
this.$element.trigger(e)
if (this.isShown) return if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open') $('body').addClass('modal-open')
this.isShown = true this.isShown = true
this.$element.trigger('show')
escape.call(this) this.escape()
backdrop.call(this, function () {
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade') var transition = $.support.transition && that.$element.hasClass('fade')
!that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position if (!that.$element.parent().length) {
that.$element.appendTo(document.body) //don't move modals dom position
}
that.$element that.$element
.show() .show()
...@@ -692,7 +793,12 @@ ...@@ -692,7 +793,12 @@
that.$element[0].offsetWidth // force reflow that.$element[0].offsetWidth // force reflow
} }
that.$element.addClass('in') that.$element
.addClass('in')
.attr('aria-hidden', false)
.focus()
that.enforceFocus()
transition ? transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
...@@ -701,109 +807,120 @@ ...@@ -701,109 +807,120 @@
}) })
} }
, hide: function ( e ) { , hide: function (e) {
e && e.preventDefault() e && e.preventDefault()
if (!this.isShown) return
var that = this var that = this
e = $.Event('hide')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false this.isShown = false
$('body').removeClass('modal-open') $('body').removeClass('modal-open')
escape.call(this) this.escape()
$(document).off('focusin.modal')
this.$element this.$element
.trigger('hide')
.removeClass('in') .removeClass('in')
.attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
hideWithTransition.call(this) : this.hideWithTransition() :
hideModal.call(this) this.hideModal()
} }
} , enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
/* MODAL PRIVATE METHODS if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
* ===================== */ that.$element.focus()
}
})
}
function hideWithTransition() { , escape: function () {
var that = this var that = this
, timeout = setTimeout(function () { if (this.isShown && this.options.keyboard) {
that.$element.off($.support.transition.end) this.$element.on('keyup.dismiss.modal', function ( e ) {
hideModal.call(that) e.which == 27 && that.hide()
}, 500) })
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
}
}
this.$element.one($.support.transition.end, function () { , hideWithTransition: function () {
clearTimeout(timeout) var that = this
hideModal.call(that) , timeout = setTimeout(function () {
}) that.$element.off($.support.transition.end)
} that.hideModal()
}, 500)
function hideModal( that ) { this.$element.one($.support.transition.end, function () {
this.$element clearTimeout(timeout)
.hide() that.hideModal()
.trigger('hidden') })
}
backdrop.call(this) , hideModal: function (that) {
} this.$element
.hide()
.trigger('hidden')
function backdrop( callback ) { this.backdrop()
var that = this }
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) { , removeBackdrop: function () {
var doAnimate = $.support.transition && animate this.$backdrop.remove()
this.$backdrop = null
}
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') , backdrop: function (callback) {
.appendTo(document.body) var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.options.backdrop != 'static') { if (this.isShown && this.options.backdrop) {
this.$backdrop.click($.proxy(this.hide, this)) var doAnimate = $.support.transition && animate
}
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.addClass('in') if (this.options.backdrop != 'static') {
this.$backdrop.click($.proxy(this.hide, this))
}
doAnimate ? if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) { this.$backdrop.addClass('in')
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? doAnimate ?
this.$backdrop.stop(true,true).one($.support.transition.end, $.proxy(removeBackdrop, this)) : this.$backdrop.one($.support.transition.end, callback) :
removeBackdrop.call(this) callback()
} else if (callback) { } else if (!this.isShown && this.$backdrop) {
callback() this.$backdrop.removeClass('in')
}
}
function removeBackdrop() { $.support.transition && this.$element.hasClass('fade')?
this.$backdrop.remove() this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
this.$backdrop = null this.removeBackdrop()
}
function escape() { } else if (callback) {
var that = this callback()
if (this.isShown && this.options.keyboard) { }
$(document).on('keyup.dismiss.modal', function ( e ) { }
e.which == 27 && that.hide()
})
} else if (!this.isShown) {
$(document).off('keyup.dismiss.modal')
}
} }
/* MODAL PLUGIN DEFINITION /* MODAL PLUGIN DEFINITION
* ======================= */ * ======================= */
$.fn.modal = function ( option ) { $.fn.modal = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('modal') , data = $this.data('modal')
...@@ -828,17 +945,23 @@ ...@@ -828,17 +945,23 @@
$(function () { $(function () {
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
var $this = $(this), href var $this = $(this)
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 , href = $this.attr('href')
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data()) , $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() e.preventDefault()
$target.modal(option)
$target
.modal(option)
.one('hide', function () {
$this.focus()
})
}) })
}) })
}( window.jQuery );/* =========================================================== }(window.jQuery);/* ===========================================================
* bootstrap-tooltip.js v2.0.2 * bootstrap-tooltip.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips * http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
* =========================================================== * ===========================================================
...@@ -857,14 +980,16 @@ ...@@ -857,14 +980,16 @@
* limitations under the License. * limitations under the License.
* ========================================================== */ * ========================================================== */
!function( $ ) {
"use strict" !function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION /* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */ * =============================== */
var Tooltip = function ( element, options ) { var Tooltip = function (element, options) {
this.init('tooltip', element, options) this.init('tooltip', element, options)
} }
...@@ -872,7 +997,7 @@ ...@@ -872,7 +997,7 @@
constructor: Tooltip constructor: Tooltip
, init: function ( type, element, options ) { , init: function (type, element, options) {
var eventIn var eventIn
, eventOut , eventOut
...@@ -881,11 +1006,13 @@ ...@@ -881,11 +1006,13 @@
this.options = this.getOptions(options) this.options = this.getOptions(options)
this.enabled = true this.enabled = true
if (this.options.trigger != 'manual') { if (this.options.trigger == 'click') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (this.options.trigger != 'manual') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this)) this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this)) this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
} }
this.options.selector ? this.options.selector ?
...@@ -893,7 +1020,7 @@ ...@@ -893,7 +1020,7 @@
this.fixTitle() this.fixTitle()
} }
, getOptions: function ( options ) { , getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
if (options.delay && typeof options.delay == 'number') { if (options.delay && typeof options.delay == 'number') {
...@@ -906,34 +1033,28 @@ ...@@ -906,34 +1033,28 @@
return options return options
} }
, enter: function ( e ) { , enter: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type) var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (!self.options.delay || !self.options.delay.show) { if (!self.options.delay || !self.options.delay.show) return self.show()
self.show()
} else { clearTimeout(this.timeout)
self.hoverState = 'in' self.hoverState = 'in'
setTimeout(function() { this.timeout = setTimeout(function() {
if (self.hoverState == 'in') { if (self.hoverState == 'in') self.show()
self.show() }, self.options.delay.show)
}
}, self.options.delay.show)
}
} }
, leave: function ( e ) { , leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type) var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (!self.options.delay || !self.options.delay.hide) { if (this.timeout) clearTimeout(this.timeout)
self.hide() if (!self.options.delay || !self.options.delay.hide) return self.hide()
} else {
self.hoverState = 'out' self.hoverState = 'out'
setTimeout(function() { this.timeout = setTimeout(function() {
if (self.hoverState == 'out') { if (self.hoverState == 'out') self.hide()
self.hide() }, self.options.delay.hide)
}
}, self.options.delay.hide)
}
} }
, show: function () { , show: function () {
...@@ -993,7 +1114,9 @@ ...@@ -993,7 +1114,9 @@
, setContent: function () { , setContent: function () {
var $tip = this.tip() var $tip = this.tip()
$tip.find('.tooltip-inner').html(this.getTitle()) , title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right') $tip.removeClass('fade in top bottom left right')
} }
...@@ -1017,6 +1140,8 @@ ...@@ -1017,6 +1140,8 @@
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() : removeWithAnimation() :
$tip.remove() $tip.remove()
return this
} }
, fixTitle: function () { , fixTitle: function () {
...@@ -1045,8 +1170,6 @@ ...@@ -1045,8 +1170,6 @@
title = $e.attr('data-original-title') title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
return title return title
} }
...@@ -1078,6 +1201,10 @@ ...@@ -1078,6 +1201,10 @@
this[this.tip().hasClass('in') ? 'hide' : 'show']() this[this.tip().hasClass('in') ? 'hide' : 'show']()
} }
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
} }
...@@ -1098,16 +1225,18 @@ ...@@ -1098,16 +1225,18 @@
$.fn.tooltip.defaults = { $.fn.tooltip.defaults = {
animation: true animation: true
, delay: 0
, selector: false
, placement: 'top' , placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover' , trigger: 'hover'
, title: '' , title: ''
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' , delay: 0
, html: true
} }
}( window.jQuery );/* =========================================================== }(window.jQuery);
* bootstrap-popover.js v2.0.2 /* ===========================================================
* bootstrap-popover.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#popovers * http://twitter.github.com/bootstrap/javascript.html#popovers
* =========================================================== * ===========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -1126,14 +1255,19 @@ ...@@ -1126,14 +1255,19 @@
* =========================================================== */ * =========================================================== */
!function( $ ) { !function ($) {
"use strict"; // jshint ;_;
"use strict" /* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
var Popover = function ( element, options ) { var Popover = function (element, options) {
this.init('popover', element, options) this.init('popover', element, options)
} }
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */ ========================================== */
...@@ -1146,8 +1280,8 @@ ...@@ -1146,8 +1280,8 @@
, title = this.getTitle() , title = this.getTitle()
, content = this.getContent() , content = this.getContent()
$tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title) $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content) $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in') $tip.removeClass('fade top bottom left right in')
} }
...@@ -1164,25 +1298,27 @@ ...@@ -1164,25 +1298,27 @@
content = $e.attr('data-content') content = $e.attr('data-content')
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
content = content.toString().replace(/(^\s*|\s*$)/, "")
return content return content
} }
, tip: function() { , tip: function () {
if (!this.$tip) { if (!this.$tip) {
this.$tip = $(this.options.template) this.$tip = $(this.options.template)
} }
return this.$tip return this.$tip
} }
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}) })
/* POPOVER PLUGIN DEFINITION /* POPOVER PLUGIN DEFINITION
* ======================= */ * ======================= */
$.fn.popover = function ( option ) { $.fn.popover = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('popover') , data = $this.data('popover')
...@@ -1196,12 +1332,13 @@ ...@@ -1196,12 +1332,13 @@
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right' placement: 'right'
, trigger: 'click'
, content: '' , content: ''
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>' , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
}) })
}( window.jQuery );/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-scrollspy.js v2.0.2 * bootstrap-scrollspy.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#scrollspy * http://twitter.github.com/bootstrap/javascript.html#scrollspy
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -1219,23 +1356,25 @@ ...@@ -1219,23 +1356,25 @@
* limitations under the License. * limitations under the License.
* ============================================================== */ * ============================================================== */
!function ( $ ) {
"use strict" !function ($) {
/* SCROLLSPY CLASS DEFINITION "use strict"; // jshint ;_;
* ========================== */
/* SCROLLSPY CLASS DEFINITION
* ========================== */
function ScrollSpy( element, options) { function ScrollSpy(element, options) {
var process = $.proxy(this.process, this) var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element) , $element = $(element).is('body') ? $(window) : $(element)
, href , href
this.options = $.extend({}, $.fn.scrollspy.defaults, options) this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll.data-api', process) this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a' || '') + ' .nav li > a'
this.$body = $('body').on('click.scroll.data-api', this.selector, process) this.$body = $('body')
this.refresh() this.refresh()
this.process() this.process()
} }
...@@ -1245,25 +1384,43 @@ ...@@ -1245,25 +1384,43 @@
constructor: ScrollSpy constructor: ScrollSpy
, refresh: function () { , refresh: function () {
this.targets = this.$body var self = this
, $targets
this.offsets = $([])
this.targets = $([])
$targets = this.$body
.find(this.selector) .find(this.selector)
.map(function () { .map(function () {
var href = $(this).attr('href') var $el = $(this)
return /^#\w/.test(href) && $(href).length ? href : null , href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
&& [[ $href.position().top, href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
}) })
this.offsets = $.map(this.targets, function (id) {
return $(id).position().top
})
} }
, process: function () { , process: function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 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 , offsets = this.offsets
, targets = this.targets , targets = this.targets
, activeTarget = this.activeTarget , activeTarget = this.activeTarget
, i , i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
}
for (i = offsets.length; i--;) { for (i = offsets.length; i--;) {
activeTarget != targets[i] activeTarget != targets[i]
&& scrollTop >= offsets[i] && scrollTop >= offsets[i]
...@@ -1274,21 +1431,27 @@ ...@@ -1274,21 +1431,27 @@
, activate: function (target) { , activate: function (target) {
var active var active
, selector
this.activeTarget = target this.activeTarget = target
this.$body $(this.selector)
.find(this.selector).parent('.active') .parent('.active')
.removeClass('active') .removeClass('active')
active = this.$body selector = this.selector
.find(this.selector + '[href="' + target + '"]') + '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
.parent('li') .parent('li')
.addClass('active') .addClass('active')
if ( active.parent('.dropdown-menu') ) { if (active.parent('.dropdown-menu').length) {
active.closest('li.dropdown').addClass('active') active = active.closest('li.dropdown').addClass('active')
} }
active.trigger('activate')
} }
} }
...@@ -1297,7 +1460,7 @@ ...@@ -1297,7 +1460,7 @@
/* SCROLLSPY PLUGIN DEFINITION /* SCROLLSPY PLUGIN DEFINITION
* =========================== */ * =========================== */
$.fn.scrollspy = function ( option ) { $.fn.scrollspy = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('scrollspy') , data = $this.data('scrollspy')
...@@ -1317,15 +1480,15 @@ ...@@ -1317,15 +1480,15 @@
/* SCROLLSPY DATA-API /* SCROLLSPY DATA-API
* ================== */ * ================== */
$(function () { $(window).on('load', function () {
$('[data-spy="scroll"]').each(function () { $('[data-spy="scroll"]').each(function () {
var $spy = $(this) var $spy = $(this)
$spy.scrollspy($spy.data()) $spy.scrollspy($spy.data())
}) })
}) })
}( window.jQuery );/* ======================================================== }(window.jQuery);/* ========================================================
* bootstrap-tab.js v2.0.2 * bootstrap-tab.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#tabs * http://twitter.github.com/bootstrap/javascript.html#tabs
* ======================================================== * ========================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -1344,14 +1507,15 @@ ...@@ -1344,14 +1507,15 @@
* ======================================================== */ * ======================================================== */
!function( $ ){ !function ($) {
"use strict"; // jshint ;_;
"use strict"
/* TAB CLASS DEFINITION /* TAB CLASS DEFINITION
* ==================== */ * ==================== */
var Tab = function ( element ) { var Tab = function (element) {
this.element = $(element) this.element = $(element)
} }
...@@ -1365,6 +1529,7 @@ ...@@ -1365,6 +1529,7 @@
, selector = $this.attr('data-target') , selector = $this.attr('data-target')
, previous , previous
, $target , $target
, e
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
...@@ -1375,11 +1540,14 @@ ...@@ -1375,11 +1540,14 @@
previous = $ul.find('.active a').last()[0] previous = $ul.find('.active a').last()[0]
$this.trigger({ e = $.Event('show', {
type: 'show' relatedTarget: previous
, relatedTarget: previous
}) })
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector) $target = $(selector)
this.activate($this.parent('li'), $ul) this.activate($this.parent('li'), $ul)
...@@ -1453,8 +1621,8 @@ ...@@ -1453,8 +1621,8 @@
}) })
}) })
}( window.jQuery );/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-typeahead.js v2.0.2 * bootstrap-typeahead.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#typeahead * http://twitter.github.com/bootstrap/javascript.html#typeahead
* ============================================================= * =============================================================
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
...@@ -1472,16 +1640,22 @@ ...@@ -1472,16 +1640,22 @@
* limitations under the License. * limitations under the License.
* ============================================================ */ * ============================================================ */
!function( $ ){
"use strict" !function($){
"use strict"; // jshint ;_;
var Typeahead = function ( element, options ) { /* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options) this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.$menu = $(this.options.menu).appendTo('body') this.$menu = $(this.options.menu).appendTo('body')
this.source = this.options.source this.source = this.options.source
this.shown = false this.shown = false
...@@ -1494,11 +1668,16 @@ ...@@ -1494,11 +1668,16 @@
, select: function () { , select: function () {
var val = this.$menu.find('.active').attr('data-value') var val = this.$menu.find('.active').attr('data-value')
this.$element.val(val) this.$element
this.$element.change(); .val(this.updater(val))
.change()
return this.hide() return this.hide()
} }
, updater: function (item) {
return item
}
, show: function () { , show: function () {
var pos = $.extend({}, this.$element.offset(), { var pos = $.extend({}, this.$element.offset(), {
height: this.$element[0].offsetHeight height: this.$element[0].offsetHeight
...@@ -1521,18 +1700,24 @@ ...@@ -1521,18 +1700,24 @@
} }
, lookup: function (event) { , lookup: function (event) {
var that = this var items
, items
, q
this.query = this.$element.val() this.query = this.$element.val()
if (!this.query) { if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this return this.shown ? this.hide() : this
} }
items = $.grep(this.source, function (item) { items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
if (that.matcher(item)) return item
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) items = this.sorter(items)
...@@ -1564,7 +1749,8 @@ ...@@ -1564,7 +1749,8 @@
} }
, highlighter: function (item) { , highlighter: function (item) {
return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) { var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>' return '<strong>' + match + '</strong>'
}) })
} }
...@@ -1612,7 +1798,7 @@ ...@@ -1612,7 +1798,7 @@
.on('keyup', $.proxy(this.keyup, this)) .on('keyup', $.proxy(this.keyup, this))
if ($.browser.webkit || $.browser.msie) { if ($.browser.webkit || $.browser.msie) {
this.$element.on('keydown', $.proxy(this.keypress, this)) this.$element.on('keydown', $.proxy(this.keydown, this))
} }
this.$menu this.$menu
...@@ -1620,6 +1806,40 @@ ...@@ -1620,6 +1806,40 @@
.on('mouseenter', 'li', $.proxy(this.mouseenter, this)) .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
} }
, 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) { , keyup: function (e) {
switch(e.keyCode) { switch(e.keyCode) {
case 40: // down arrow case 40: // down arrow
...@@ -1645,30 +1865,6 @@ ...@@ -1645,30 +1865,6 @@
e.preventDefault() e.preventDefault()
} }
, keypress: 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()
}
, blur: function (e) { , blur: function (e) {
var that = this var that = this
setTimeout(function () { that.hide() }, 150) setTimeout(function () { that.hide() }, 150)
...@@ -1691,7 +1887,7 @@ ...@@ -1691,7 +1887,7 @@
/* TYPEAHEAD PLUGIN DEFINITION /* TYPEAHEAD PLUGIN DEFINITION
* =========================== */ * =========================== */
$.fn.typeahead = function ( option ) { $.fn.typeahead = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('typeahead') , data = $this.data('typeahead')
...@@ -1706,12 +1902,13 @@ ...@@ -1706,12 +1902,13 @@
, items: 8 , items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>' , menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>' , item: '<li><a href="#"></a></li>'
, minLength: 1
} }
$.fn.typeahead.Constructor = Typeahead $.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD DATA-API /* TYPEAHEAD DATA-API
* ================== */ * ================== */
$(function () { $(function () {
...@@ -1723,4 +1920,108 @@ ...@@ -1723,4 +1920,108 @@
}) })
}) })
}( window.jQuery ); }(window.jQuery);
/* ==========================================================
* bootstrap-affix.js v2.1.0
* 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))
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
* ======================= */
$.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 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
/** /*!
* Bootstrap.js by @fat & @mdo * Bootstrap.js by @fat & @mdo
* Copyright 2012 Twitter, Inc. * Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt * http://www.apache.org/licenses/LICENSE-2.0.txt
*/ */
!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return 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(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;return!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=(a||"").toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(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(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.$element.change(),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},keypress:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},blur:function(a){var b=this;setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery); !function(e){e(function(){"use strict";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()},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(function(){e("body").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.parent('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},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(function(){e("body").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.options=n,this.options.slide&&this.slide(this.options.slide),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.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[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()),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=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;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}},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.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),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)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)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"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=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(function(){e("body").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(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),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||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},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(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.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;e("body").addClass("modal-open"),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).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.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,e("body").removeClass("modal-open"),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(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){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.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),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,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},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(function(){e("body").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;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="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,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.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 e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]: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}}e.css(o).addClass(s).addClass("in")}},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 r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),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")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},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)},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(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},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",title:"",delay:0,html:!0}}(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=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.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)}}),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><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(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 t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||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")}},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(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 a").last()[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")}},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(function(){e("body").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.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,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.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.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("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.webkit||e.browser.msie)&&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))},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: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(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},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(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),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)),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:""))},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(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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment