Permalink
Browse files

Created gh-pages branch via GitHub

  • Loading branch information...
0 parents commit a8f9cf7b50f47fba16a35bbdfa20aaa52c150857 @andris9 andris9 committed Apr 5, 2012
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
@@ -0,0 +1,53 @@
+var sectionHeight = function() {
+ var total = $(window).height(),
+ $section = $('section').css('height','auto');
+
+ if ($section.outerHeight(true) < total) {
+ var margin = $section.outerHeight(true) - $section.height();
+ $section.height(total - margin - 20);
+ } else {
+ $section.css('height','auto');
+ }
+}
+
+$(window).resize(sectionHeight);
+
+$(document).ready(function(){
+ $("section h1, section h2").each(function(){
+ $("nav ul").append("<li class='tag-" + this.nodeName.toLowerCase() + "'><a href='#" + $(this).text().toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g,'') + "'>" + $(this).text() + "</a></li>");
+ $(this).attr("id",$(this).text().toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g,''));
+ $("nav ul li:first-child a").parent().addClass("active");
+ });
+
+ $("nav ul li a").live("click",function(event) {
+ $("body").animate({scrollTop:$($(this).attr("href")).offset().top-190},400);
+ $("nav ul li a").parent().removeClass("active");
+ $(this).parent().addClass("active");
+ event.preventDefault();
+ });
+
+ sectionHeight();
+
+ $('img').load(sectionHeight);
+});
+
+fixScale = function(doc) {
+
+ var addEvent = 'addEventListener',
+ type = 'gesturestart',
+ qsa = 'querySelectorAll',
+ scales = [1, 1],
+ meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
+
+ function fix() {
+ meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
+ doc.removeEventListener(type, fix, true);
+ }
+
+ if ((meta = meta[meta.length - 1]) && addEvent in doc) {
+ fix();
+ scales = [.25, 1.6];
+ doc[addEvent](type, fix, true);
+ }
+
+};
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit a8f9cf7

Please sign in to comment.