// Disclaimer alert box $j15(document).ready(function () { $j15(".showDisclaimer").click(function () { return confirm('You are now leaving the Department of Veterans Affairs Web site.'); }); }); /* // Section Description Rollover Effect $j15(document).ready(function () { // On hover in/out $j15(".homeNav dt").hover( function () { displayNextMenuItem($j15(this)); }, function () { hideNextMenuItem($j15(this)); }); // On tab over/out $j15(".homeNav dt").focusin(function () { displayNextMenuItem($j15(this)); }); $j15(".homeNav dt").focusout(function () { hideNextMenuItem($j15(this)); }); }); function displayNextMenuItem (ele) { ele.next("dd").addClass('showDesc').animate({ opacity: 1, width: '250px', height: 'auto' }, 300);} function hideNextMenuItem (ele) { ele.next("dd").removeClass('showDesc').animate({ opacity: 0, width: '250px', height: 'auto' }, 300);} // Clear Input Values $j15('document').ready(function () { $j15('input').each(function () { $j15(this).val($j15(this).attr('defaultVal')); $j15(this).css({ color: 'grey' }); }); $j15('.txtClass').focus(function () { if ($j15(this).val() == $j15(this).attr('defaultVal')) { $j15(this).val(''); $j15(this).css({ color: 'black' }); } }); $j15('.txtClass').blur(function () { if ($j15(this).val() == '') { $j15(this).val($j15(this).attr('defaultVal')); $j15(this).css({ color: 'grey' }); } }); }); */ // smooth scroll css-tricks.com var jump = function (e) { //prevent the "normal" behaviour which would be a "hard" jump e.preventDefault(); //Get the target var target = $j15(this).attr("href"); //perform animated scrolling $j15('html,body').animate( { //get top-position of target-element and set it as scroll target scrollTop: $j15(target).offset().top //scrolldelay: 2 seconds }, 500, function () { //attach the hash (#jumptarget) to the pageurl location.hash = target; }); } $j15(document).ready(function () { $j15('a[href*=#]').bind("click", jump); return false; }); // Pull Twitter Feed In // jquery.tweet.js - See http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet // Convert twitter API objects into data available for // constructing each tweet
  • using a template /* function extract_template_data(item) { var o = {}; o.item = item; o.source = item.source; o.screen_name = item.from_user || item.user.screen_name; o.avatar_size = s.avatar_size; o.avatar_url = maybe_https(item.profile_image_url || item.user.profile_image_url); o.retweet = typeof (item.retweeted_status) != 'undefined'; o.join_text = s.join_text == "auto" ? build_auto_join_text(item.text) : s.join_text; o.tweet_time = parse_date(item.created_at); o.tweet_id = item.id_str; o.twitter_base = "http://" + s.twitter_url + "/"; o.user_url = o.twitter_base + o.screen_name; o.tweet_url = o.user_url + "/status/" + o.tweet_id; o.reply_url = o.twitter_base + "intent/tweet?in_reply_to=" + o.tweet_id; o.retweet_url = o.twitter_base + "intent/retweet?tweet_id=" + o.tweet_id; o.favorite_url = o.twitter_base + "intent/favorite?tweet_id=" + o.tweet_id; o.retweeted_screen_name = o.retweet && item.retweeted_status.user.screen_name; o.tweet_relative_time = relative_time(o.tweet_time); o.tweet_raw_text = o.retweet ? ('RT @' + o.retweeted_screen_name + ' ' + item.retweeted_status.text) : item.text; // avoid '...' in long retweets o.tweet_text = $j15([o.tweet_raw_text]).linkUrl().linkUser().linkHash()[0]; o.tweet_text_fancy = $j15([o.tweet_text]).makeHeart().capAwesome().capEpic()[0]; */ // Default spans, and pre-formatted blocks for common layouts /* o.user = t('{screen_name}', o); o.join = s.join_text ? t(' {join_text} ', o) : ' '; o.avatar = o.avatar_size ? t('{screen_name}\'s avatar', o) : ''; o.text = t('{tweet_text_fancy}', o); o.time = t('{tweet_relative_time}', o); o.reply_action = t('reply', o); o.retweet_action = t('retweet', o); o.favorite_action = t('favorite', o); return o; } return this.each(function (i, widget) { var list = $j15('