/**
 * PShelper.com
 * Base Store Version javascript
 * @author Derek Decker derek@visioncourse.com
 * @author Andrew Maxwell andrew@visioncourse.com
 * @author Bryant Young bryant@visioncourse.com
 *
 * Notes:
 *
 * When creating text box inputs, always apply both
 * a value and default attribute (the same value)
 *
 * For rollovers use attribute 'hoversrc' to define the
 * rollover image source
 *
 **/

	var trace = function(t){ if("console" in window)console.log(t); }

$(document).ready(function(){
/**
 * INPUT TYPE=TEXT HANDLING
 */
	//input textbox handling
    $('input[type="text"]').focus(function(){
        if($(this).val()==$(this).attr('alt'))
        {
            $(this).val('');
        }
    }).blur(function(){
        if($(this).val()=='')
        {
            $(this).val($(this).attr('alt'));
        }
    });


/**
 * OPEN EXTERNAL LINKS IN NEW WINDOW
 * (Looks for the 'rel' attribute with a value of 'external' on clicked links)
 * @author Andrew Maxwell andrew@visioncourse.com
 * @version 1.0
 */

	$('a[rel="external"]').attr('target','_blank');


/**
 * Prevent # Links from executing.
 */
	
	$('a[href="#"]').click(function(event){
		event.preventDefault();
		return false;
	});
});	

