var swap_text_boxes = []; function init_swap_text_boxes(){ //Store the default value for each box $('input[type=text][value].swaptextbox').each(function() { swap_text_boxes[$(this).attr('id')] = $(this).attr('value'); }); //Add focus and blur events to set or clear the value $('input[type=text][value].swaptextbox').bind('focus', function() { if($(this).val() == swap_text_boxes[$(this).attr('id')]) { $(this).css('color', '#000'); $(this).css('font-style', 'normal'); $(this).val(''); } }); $('input[type=text][value].swaptextbox').bind('blur', function() { if($(this).val() == '') { $(this).css('color', '#ababab'); $(this).css('font-style', 'italic'); $(this).val(swap_text_boxes[$(this).attr('id')]); } }); } /**************************************** Barebones Lightbox Template by Kyle Schaeffer kyleschaeffer.com * requires jQuery ****************************************/ // display the lightbox function lightbox(insertContent, ajaxContentUrl){ // add lightbox/shadow
's if not previously added if($('#lightbox').size() == 0){ var theLightbox = $('