Advertisement
Guest User

Untitled

a guest
Oct 25th, 2012
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.74 KB | None | 0 0
  1. <!-- JAVASCRIPT -->
  2.  
  3. {block:IfUseCustomfonts}
  4. <script type="text/javascript">
  5. WebFontConfig = {
  6. google: { families: [ {block:ifCustomFont1}'{text:Custom Font 1}'{/block:ifCustomFont1}{block:ifCustomFont2}, '{text:Custom Font 2}'{/block:ifCustomFont2}{block:ifCustomFont3}, '{text:Custom Font 3}'{/block:ifCustomFont3} ] }
  7. };
  8. (function() {
  9. var wf = document.createElement('script');
  10. wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
  11. '://ajax.googleapis.com/ajax/libs/webfont/1.0.31/webfont.js';
  12. wf.type = 'text/javascript';
  13. wf.async = 'true';
  14. var s = document.getElementsByTagName('script')[0];
  15. s.parentNode.insertBefore(wf, s);
  16. })();
  17. </script>
  18. {/block:IfUseCustomfonts}
  19.  
  20. <script type="text/javascript">
  21. var tessellate = {
  22. // search: '{lang:Search}',
  23. analytics: {block:ifGoogleAnalyticsID}true{/block:ifGoogleAnalyticsID}{block:ifNotGoogleAnalyticsID}false{/block:ifNotGoogleAnalyticsID},
  24. infscr: {block:ifInfiniteScroll}true{/block:ifInfiniteScroll}{block:ifNotInfiniteScroll}false{/block:ifNotInfiniteScroll},
  25. animations: {block:ifEnableAnimations}true{/block:ifEnableAnimations}{block:ifNotEnableAnimations}false{/block:ifNotEnableAnimations},
  26. fadein: {block:ifFadeInFirstPage}true{/block:ifFadeInFirstPage}{block:ifNotFadeInFirstPage}false{/block:ifNotFadeInFirstPage}
  27. }
  28. </script>
  29.  
  30. {block:ifGoogleAnalyticsID}<script type="text/javascript">
  31. var _gaq = _gaq || [];
  32. _gaq.push(['_setAccount', '{text:Google Analytics ID}']);
  33. _gaq.push(['_trackPageview']);
  34.  
  35. (function() {
  36. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  37. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  38. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  39. })();
  40. </script>{/block:ifGoogleAnalyticsID}
  41. {block:IndexPage}<script type="text/javascript" src="http://assets.tumblr.com/javascript/tumblelog.js"></script>{/block:IndexPage}
  42.  
  43. <script type="text/javascript" src="http://static.tumblr.com/eatauj5/aBHly2e80/jquery-1.7.1.min.js"></script>
  44. <script type="text/javascript" src="http://zero8zero5.com/assets/layers3.js"></script>
  45. <!-- <script type="text/javascript" src="http://static.tumblr.com/oanhd8m/g0Ombfkue/layers2.js"></script> -->
  46.  
  47. <script>
  48. $ = jQuery.noConflict();
  49. $(function () {
  50. var a = $("#content"),
  51. o = a.children(),
  52. l = $("#loading"),
  53. k = Modernizr.csstransitions,
  54. p = tessellate.animations,
  55. f = tessellate.fadein,
  56. d = tessellate.search,
  57. n = window.location,
  58. j = n.href.match(/http.*page\//),
  59. i = n.href.match(/page\/(\d*)/),
  60. e = parseInt((i && i[1]) ? i[1] : 1),
  61. m = function (r, q) {
  62. if (q) {
  63. a.masonry("appended", r)
  64. } else {
  65. a.masonry({
  66. columnWidth: {text:Index Column Width}, // Changes to column width (here) should be accompanied by changes to index post padding and/or margins
  67. itemSelector: "div.post",
  68. isFitWidth: true
  69. })
  70. }
  71. r.removeClass("invisible");
  72. if (p && (f || q)) {
  73. if (k) {
  74. r.addClass("opaque")
  75. } else {
  76. r.css({
  77. opacity: 0
  78. }).animate({
  79. opacity: 1
  80. }, 400)
  81. }
  82. }
  83. }, h = function (r, q) {
  84. if (!a.find(q).length) {
  85. return
  86. }
  87. if (p && !tessellate.mobile) {
  88. a.on("mouseenter mouseleave", r, function (s) {
  89. if (s.type === "mouseenter") {
  90. $(this).find(q).stop(true, true).slideDown(200)
  91. } else {
  92. $(this).find(q).stop(true, true).slideUp(200)
  93. }
  94. })
  95. }
  96. }, g = function (r) {
  97. var q = r.filter(".audio").find("div.the-audio");
  98. if (!q.length) {
  99. return
  100. }
  101. q.find("embed").attr({
  102. wmode: "opaque"
  103. });
  104. q.removeClass("hideflash")
  105. }, b = function (u) {
  106. var t = u.filter(".video").find("div.the-video"),
  107. s, q = t.length,
  108. w, v, r = t.outerWidth();
  109. if (!q) {
  110. return
  111. }
  112. for (s = 0; s < q; s++) {
  113. w = t.eq(s);
  114. v = w.find("embed, iframe");
  115. if (v.length) {
  116. if (v.is("embed")) {
  117. v.attr({
  118. wmode: "opaque"
  119. })
  120. }
  121. v.height(Math.round(v[0].height * r / v[0].width)).width(r)
  122. }
  123. w.removeClass("hideflash")
  124. }
  125. }, c = {
  126. fadein: function () {
  127. l.stop(true, true).fadeIn(400)
  128. },
  129. fadeout: function () {
  130. l.stop(true, true).fadeOut(400)
  131. }
  132. };
  133. $("#search").children().on({
  134. focus: function () {
  135. if (this.value === d) {
  136. $(this).addClass("typing").val("")
  137. }
  138. },
  139. blur: function () {
  140. if (!this.value) {
  141. $(this).removeClass("typing").val(d)
  142. }
  143. }
  144. });
  145. if (!o.length || $("#no-results").length) {
  146. return
  147. }
  148. g(o);
  149. b(o);
  150. if ($("#index").length) {
  151. if (f) {
  152. c.fadein()
  153. }
  154. if (!k) {
  155. h("div.post", "div.meta")
  156. }
  157. o.find("img").not(".the-album-art").imagesLoaded(function () {
  158. m(o, false);
  159. if (f) {
  160. c.fadeout()
  161. }
  162. if (tessellate.infscr) {
  163. a.infinitescroll({
  164. debug: false,
  165. navSelector: "#foot-nav",
  166. nextSelector: "li.next a",
  167. itemSelector: "div.post",
  168. loading: {
  169. img: "",
  170. finishedMsg: "",
  171. msgText: ""
  172. },
  173. state: {
  174. currPage: e
  175. },
  176. pathParse: (j) ? [j, ""] : null
  177. }, function (q) {
  178. var u = $(q),
  179. t, s, r;
  180. if (tessellate.analytics) {
  181. t = n.pathname;
  182. s = t.match(/\/.*page\//);
  183. if (s) {
  184. r = s
  185. } else {
  186. r = (t + (t.charAt(t.length - 1) === "/" ? "page/" : "/page/"))
  187. }
  188. r += (++e);
  189. _gaq.push(["_trackPageview", r])
  190. }
  191. a.infinitescroll("pause");
  192. c.fadein();
  193. $.when(u.addClass("invisible infscr").filter(".audio, .video").flashFix(), u.find('.photo-slideshow').pxuPhotoset(), u.find("img").not(".the-album-art").imagesLoaded()).always(function () {
  194. g(u);
  195. b(u);
  196. m(u, true);
  197. c.fadeout();
  198. a.infinitescroll("resume");
  199. a.infinitescroll("scroll")
  200. })
  201. });
  202. a.infinitescroll("scroll");
  203. $().UItoTop({
  204. text: "",
  205. easingType: "easeOutQuad"
  206. })
  207. }
  208. })
  209. } else {
  210. o.find("li.tag").last().find("span").remove();
  211. /*if (o.hasClass("photoset")) { o.find("div.the-photoset").resizePhotoset({ selector: "span.photoset-image" }); h("span.photoset-image", "span.caption-outer") } else */
  212. {
  213. if (o.hasClass("audio")) {
  214. o.find("ul.audio-meta").not(":has(li)").remove()
  215. }
  216. }
  217. }
  218. });
  219. </script>
  220.  
  221. <!-- begin fancybox code -->
  222. {block:IfUseFancyboxforImages}
  223. <script type="text/javascript" src="http://static.tumblr.com/jxydchg/hwklxo929/jquery.fancybox.pack.js"></script>
  224. <script>
  225. $(document).ready(function() {
  226. $('.photo-slideshow').pxuPhotoset({
  227. // options go here
  228. }, function() {
  229. // callback
  230. }); // end photoset code
  231. $(".fancybox").fancybox({
  232. closeBtn:false,
  233. loop:false,
  234. margin:{text:Fancybox Margin},
  235. padding:{text:Fancybox Padding},
  236. wrapCSS:"fancybox-custom",
  237. helpers : {
  238. overlay : {
  239. opacity : '{text:Opacity Fancybox}',
  240. css : {
  241. 'background-color' : '{color:Fancybox Overlay}'
  242. }
  243. },
  244. title: null
  245. }
  246. });
  247. });
  248. </script>
  249. {/block:IfUseFancyboxforImages}
  250. <!-- end fancybox code -->
  251.  
  252. <script>if($.browser.msie){
  253. $('.post').live('mouseenter',function() {
  254. $(this).addClass('hover');
  255. });
  256. $('.post iframe').live('hover',function() {
  257. $(this).parents(".item").addClass('hover');
  258. });
  259. $(".post").live('mouseleave',function() {
  260. $(this).removeClass('hover');
  261. });
  262. }</script>
  263.  
  264. <script>
  265. function goToPage(){
  266. var page=document.getElementById("jump-page").value; // value of input box
  267. page=page*1; // ensures page is numeric only
  268. location.href='/page/'+page; // redirect to new url
  269. }
  270. </script>
  271.  
  272. <script>
  273. // $ = jQuery.noConflict();
  274. $('.toggle-notes').toggle(
  275. function() {
  276. $('.notes').slideDown('400');
  277. $(this).html('Hide Notes');
  278. },
  279. function() {
  280. $('.notes').slideUp('200');
  281. $(this).html('Show Notes');
  282. }
  283. );
  284. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement