This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXX-X']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); | |
ga.src = ('https:' == document.location.protocol ? | |
'https://ssl' : 'http://www') + | |
'.google-analytics.com/ga.js'; | |
ga.setAttribute('async', 'true'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var to12Hr = function(n, r /* round to nearest r minutes */) { | |
if (!n || n >= 24) return '12:00 AM'; | |
var m = (Math.round(n%1*(r = (r ? 60/r : 60)))/r)*60; | |
return ((n = (m>59 ? n+1 : n))>=13 ? (n|0)-12 : n|0) + ':' + (m>9 ? (m>59 ? '00' : m) : '0'+m) + (n>=12 && m<60 ? ' PM' : ' AM'); | |
} | |
// to12Hr(6.5) => "6:30 AM" | |
// to12Hr(13.19) => "1:11 PM" | |
// to12Hr(13.19, 15) => "1:15 PM" (rounds to 15 mins) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!navigator.geolocation) { | |
navigator.geolocation = (function (window) { | |
function getCurrentPosition(callback) { | |
// NOTE: for some reason, chaging the url is *allowed* with this service. Useful, but random | |
// source: http://www.maxmind.com/app/javascript_city | |
// The source is open source, as per: http://www.maxmind.com/app/api, but doesn't discuss specific license use. Hopefully it's just free to use - yay internet! | |
var geourl = 'http://j.maxmind.com/app/geoip.js_' + Math.random(), | |
iframe = document.createElement('iframe'), | |
doc, win; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!navigator.geolocation) { | |
navigator.geolocation = (function (window) { | |
function getCurrentPosition(callback) { | |
// NOTE: for some reason, chaging the url is *allowed* with this service. Useful, but random | |
// source: http://www.maxmind.com/app/javascript_city | |
// The source is open source, as per: http://www.maxmind.com/app/api, but doesn't discuss specific license use. Hopefully it's just free to use - yay internet! | |
var geourl = 'http://j.maxmind.com/app/geoip.js_' + Math.random(), | |
iframe = document.createElement('iframe'), | |
doc, win; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *_svn*') DO RMDIR /S /Q "%%G" | |
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// jQuery defaultBlur - v0.1 - 3/11/2010 | |
// http://ralphwhitbeck.com | |
// | |
// Copyright (c) 2010 Ralph Whitbeck | |
// Dual licensed under the MIT and GPL licenses. | |
// | |
// Description: use to make a input/textarea have a setable default | |
// value and a setable class that act as a label then will disappear | |
// when the user goes to enter a real value into the textbox. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.fadeToggle = function(speed, easing, callback) { | |
return this.animate({opacity: 'toggle'}, speed, easing, callback); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("#masthead ul").imageSwap(); | |
}); | |
$.fn.imageSwap = function() { | |
var $parentElement = this; | |
var cache = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fx.speeds.SlowAsFatCat = 10000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rgbToHex(rgb) { | |
if (rgb.match(/^#[0-9A-Fa-f]{6}$/)) { | |
return rgb; | |
} | |
var rgbvals = /rgb\((.+),(.+),(.+)\)/i.exec(rgb); | |
if (!rgbvals) { | |
return rgb; | |
} | |
var rval = parseInt(rgbvals[1]); | |
var gval = parseInt(rgbvals[2]); |
OlderNewer