123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- $(document).ready(function () {
-
-
-
- function activateTab($tab) {
- var $activeTab = $tab.closest('dl').find('a.active'),
- contentLocation = $tab.attr("href") + 'Tab';
-
- $activeTab.removeClass('active');
- $tab.addClass('active');
-
- $(contentLocation).closest('.tabs-content').children('li').hide();
- $(contentLocation).show();
- }
- $('dl.tabs').each(function () {
-
- var tabs = $(this).children('dd').children('a');
- tabs.click(function (e) {
- activateTab($(this));
- });
- });
- if (window.location.hash) {
- activateTab($('a[href="' + window.location.hash + '"]'));
- }
-
- $(".alert-box").delegate("a.close", "click", function(event) {
- event.preventDefault();
- $(this).closest(".alert-box").fadeOut(function(event){
- $(this).remove();
- });
- });
-
-
- $('input, textarea').placeholder();
-
-
- var currentFoundationDropdown = null;
- $('.nav-bar li a').each(function() {
- $(this).data('clicks', 0);
- });
- $('.nav-bar li a').on('click', function(e) {
- e.preventDefault();
- if (currentFoundationDropdown !== $(this).index() || currentFoundationDropdown === null) {
- $(this).data('clicks', 0);
- currentFoundationDropdown = $(this).index();
- }
- $(this).data('clicks', ($(this).data('clicks') + 1));
- var f = $(this).siblings('.flyout');
- if (!f.is(':visible') && $(this).parent('.has-flyout').length > 1) {
- $('.nav-bar li .flyout').hide();
- f.show();
- } else if (($(this).data('clicks') > 1) || ($(this).parent('.has-flyout').length < 1)) {
- window.location = $(this).attr('href');
- }
- });
- $('.nav-bar').on('click', function(e) {
- e.stopPropagation();
- if ($(e.target).parents().is('.flyout') || $(e.target).is('.flyout')) {
- e.preventDefault();
- }
- });
-
-
-
-
-
-
-
- });
|