$("

Your Name
Friend's Name
Friend's Email
 
 
Connect
Share
 
 
").insertAfter($('body').children(':last')); var sCurrentButton = ""; var nWindowTimeoutCount = 0; var nWindowTimeoutTimer = 0; function buttonWindowTimer() { nWindowTimeoutCount ++; if (nWindowTimeoutCount >= 5) { $('#button_window').hide(); $('#' + sCurrentButton + ' .button_state_image').attr('src', '/ocg_/images/2009/buttons/up_arrow.png'); $('#' + sCurrentButton).removeClass('button_on'); sCurrentButton = ""; nWindowTimeoutTimer = 0; nWindowTimeoutCount = 0; } else { nWindowTimeoutTimer = setTimeout(buttonWindowTimer, 1000); } } $(document).ready(function() { $('#button_window').mousemove(function() { nWindowTimeoutCount = 0; }); $('#button_window input').keypress(function() { nWindowTimeoutCount = 0; }); }); $('#buttonbar_connect').click(function() { $('#' + sCurrentButton).removeClass('button_on'); $('#' + sCurrentButton + ' .button_state_image').attr('src', '/ocg_/images/2009/buttons/up_arrow.png'); if ($(this).attr('id') == sCurrentButton) { closeWindow(); return false; } $(this).children('.button_state_image').attr('src', '/ocg_/images/2009/buttons/down_arrow.png'); $('#button_window_content').html(" Twitter LinkedIn Blog Blog RSS News RSS Events RSS"); $('#button_window').css('height', 228 + 'px'); $(this).addClass('button_on'); $('#button_window').css('display', 'block'); sCurrentButton = $(this).attr('id'); nWindowTimeoutCount = 0; if (nWindowTimeoutTimer != 0) { clearTimeout(nWindowTimeoutTimer); } nWindowTimeoutTimer = setTimeout(buttonWindowTimer, 1000); return false; }); $('#buttonbar_share').click(function() { $('#' + sCurrentButton).removeClass('button_on'); $('#' + sCurrentButton + ' .button_state_image').attr('src', '/ocg_/images/2009/buttons/up_arrow.png'); if ($(this).attr('id') == sCurrentButton) { closeWindow(); return false; } $(this).children('.button_state_image').attr('src', '/ocg_/images/2009/buttons/down_arrow.png'); $('#button_window_content').html(" Share By Email Share To Facebook Share To Twitter "); $('#button_window').css('height', 114 + 'px'); $(this).addClass('button_on'); $('#button_window').css('display', 'block'); sCurrentButton = $(this).attr('id'); nWindowTimeoutCount = 0; if (nWindowTimeoutTimer != 0) { clearTimeout(nWindowTimeoutTimer); } nWindowTimeoutTimer = setTimeout(buttonWindowTimer, 1000); return false; }); function closeWindow() { $('#button_window').hide(); $('#_bzx_refer_email_container').hide(); $('#button_window_content').show(); $('#' + sCurrentButton + ' .button_state_image').attr('src', '/ocg_/images/2009/buttons/up_arrow.png'); $('#' + sCurrentButton).removeClass('button_on'); sCurrentButton = ''; } $('#_bzx_refer_email_send').click(function() { var oRoot = $(this).parent().parent().parent(); sSenderName = oRoot.find('._bzx_self_name').val(); sRecipName = oRoot.find('._bzx_refer_name').val(); sRecipEmail = oRoot.find('._bzx_refer_email').val(); sURI = encodeURIComponent(document.location); $.post('/ajax-listener.aspx', { action: 'email', uri: sURI, sender: sSenderName, recipname: sRecipName, recipemail: sRecipEmail }, function(data) { closeWindow(); }); }); function getViewportWidth() { if (typeof window.innerWidth != 'undefined') { return window.innerWidth; } // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document) else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { return document.documentElement.clientWidth; } // older versions of IE else { return document.getElementsByTagName('body')[0].clientWidth; } } function positionBar() { var nLeft = $('#body_container').position().left; if (nLeft == 0 || nLeft == '') { nLeft = $('#body_container').css('margin-left'); } else { nLeft ++; } $("#button_bar").css("left", nLeft); $("#button_window").css("left", nLeft); } positionBar(); $(window).resize(function() { positionBar(); }); function fbs_click() { u=location.href; t=document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t), 'sharer', "toolbar=0,status=0,width=626,height=436"); }