$(function(){
// build side menu
var html = '';
$('.bs-docs-section h1').each(function () {
var mainheader = $this = $(this);
var subheaders = $this.nextUntil('h1', 'h2, h3');
if (mainheader.length) {
html += '
' + mainheader.clone().children().remove().end().text() + '';
if (subheaders.length) {
html+= '';
}
html += '';
}
});
if (html == '') {
$('[role=complementary]').hide();
$('[role=main]').toggleClass('col-md-9 col-md-12');
}
else {
$('.bs-docs-sidenav').html(html);
}
/*!
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
!function(a){a(function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var b=document.createElement("style");b.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(b)}{var c=a(window),d=a(document.body);a(".navbar").outerHeight(!0)+10}d.scrollspy({target:".bs-docs-sidebar"}),c.on("load",function(){d.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),setTimeout(function(){var b=a(".bs-docs-sidebar");b.affix({offset:{top:function(){var c=b.offset().top,d=parseInt(b.children(0).css("margin-top"),10),e=a(".bs-docs-nav").height();return this.top=c-e-d},bottom:function(){return this.bottom=a(".bs-docs-footer").outerHeight(!0)}}})},100),setTimeout(function(){a(".bs-top").affix()},100)})}(jQuery);
});
function trianglify(color1, color2) {
var header = $('#jumbotron-header'),
t = new Trianglify({
cellsize: 90,
noiseIntensity: 0,
x_gradient: [color1, color2]
}),
pattern = t.generate(window.screen.width | header.outerWidth(), header.outerHeight()*1.2);
header.css('background-image', pattern.dataUrl);
}