$(document).ready(function() {

	$('#nav .search a').click(function() {
//	$('#nav .search a').mouseover(function() {
		$('.searchWrap').show();
		return false;
	});

	$('.searchWrap p.search a, .searchWrap span a').click(function() {
		$('.searchWrap').hide();	
		return false;
	});

	$('.bubble').mouseover(function() {
		$('.bubble2').show();	
	});

	$('.bubble2').mouseout(function() {
		$('.bubble2').hide();	
	});

// 	swaps submit inputs with <a href=""> link for easier button styling with CSS
// 	Degrades nicely for browsers w/o javascript and retains enter key submit trigger
// 	Nested in livequery plugin to bind AJAX added content. Works on current non-AJAX too.

	$('.submitBtn').livequery('', function() { 
      		var $this = $(this);
      		var f = this.form;
      		var link = $('<a class="gfxBtn" href="#">' + $this.val() + '</a>')
         		.bind('click',function() {
              	 		$(f).trigger('submit');
               			return false;
            		});
      		$this.after(link).css({position:'absolute', top:'-2000px'});
    });	

	
	$('form#cm_ajax_shortcode_1 .camspam').livequery('', function() { 
      		var $this = $(this);
      		var f = this.form;
      		var link = $('<a class="gfxBtn" href="#">' + $this.val() + '</a>');
      		$this.after(link).css({position:'absolute', top:'-2000px'});
    });	
	
});  // closing of jQuery load function

		

