2011-05-03 10:36:26 -04:00
|
|
|
/*
|
2011-05-06 16:34:14 -04:00
|
|
|
* Skeleton V1.0
|
2011-05-03 10:36:26 -04:00
|
|
|
* Created by Dave Gamache
|
|
|
|
* www.skeleton.gs
|
|
|
|
* 4/30/2011
|
|
|
|
*/
|
2011-05-04 21:20:56 -04:00
|
|
|
|
2011-05-02 15:17:18 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
2011-05-04 21:20:56 -04:00
|
|
|
/* iPhone fix to scroll away iPhone browser chrome */
|
2011-05-06 16:34:14 -04:00
|
|
|
/*
|
|
|
|
if(window.width < '500px') {
|
2011-05-05 15:41:53 -04:00
|
|
|
setTimeout(function(){window.scrollTo(0, 1);}, 100);
|
|
|
|
}
|
2011-05-06 16:34:14 -04:00
|
|
|
*/
|
2011-05-04 21:20:56 -04:00
|
|
|
|
2011-05-03 10:36:26 -04:00
|
|
|
/* Tabs Activiation
|
|
|
|
================================================== */
|
2011-05-02 15:17:18 -04:00
|
|
|
var tabs = $('ul.tabs');
|
2011-05-01 11:43:13 -04:00
|
|
|
tabsContent = $('ul.tabs-content')
|
|
|
|
|
|
|
|
tabs.each(function(i) {
|
|
|
|
//Get all tabs
|
2011-05-02 15:17:18 -04:00
|
|
|
var tab = $(this).children('li').children('a');
|
2011-05-01 11:43:13 -04:00
|
|
|
tab.click(function(e) {
|
|
|
|
|
|
|
|
//Get Location of tab's content
|
2011-05-04 21:20:56 -04:00
|
|
|
var contentLocation = $(this).attr("href")+"Tab"
|
2011-05-02 15:17:18 -04:00
|
|
|
contentLocation = contentLocation;
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
//Let go if not a hashed one
|
|
|
|
if(contentLocation.charAt(0)=="#") {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
//Make Tab Active
|
|
|
|
tab.removeClass('active');
|
|
|
|
$(this).addClass('active');
|
|
|
|
|
|
|
|
//Show Tab Content
|
|
|
|
$(contentLocation).parent('.tabs-content').children('li').css({"display":"none"});
|
|
|
|
$(contentLocation).css({"display":"block"});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2011-05-03 10:36:26 -04:00
|
|
|
});
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
|
2011-05-03 10:36:26 -04:00
|
|
|
/* Placeholder
|
|
|
|
==================================================
|
2011-05-01 11:43:13 -04:00
|
|
|
$('[placeholder]').focus(function() {
|
|
|
|
var input = $(this);
|
|
|
|
if (input.val() == input.attr('placeholder')) {
|
|
|
|
input.val('');
|
|
|
|
input.removeClass('placeholder');
|
|
|
|
}
|
|
|
|
}).blur(function() {
|
|
|
|
var input = $(this);
|
|
|
|
if (input.val() == '' || input.val() == input.attr('placeholder')) {
|
|
|
|
input.addClass('placeholder');
|
|
|
|
input.val(input.attr('placeholder'));
|
|
|
|
}
|
|
|
|
}).blur();
|
|
|
|
$('[placeholder]').parents('form').submit(function() {
|
|
|
|
$(this).find('[placeholder]').each(function() {
|
|
|
|
var input = $(this);
|
|
|
|
if (input.val() == input.attr('placeholder')) {
|
|
|
|
input.val('');
|
|
|
|
}
|
|
|
|
});
|
2011-05-03 10:36:26 -04:00
|
|
|
}); */
|
2011-05-01 11:43:13 -04:00
|
|
|
|
|
|
|
});
|