//search box type selectors
	$('#wow_search a').click(function(event) {
			frm = document.forms.search_form;
			$('#wow_search a').removeClass();
			$(this).addClass('active');
			
			frm.action = $(this).attr('href');
			return false;
									  
	});
	
	$('#wow_search button').click(function(event) {
			frm = document.forms.search_form;
			frm.query.value = frm.q.value;
			frm.submit();
			return false;
	});
	
	//focus on the subject field of message form
	str = window.document.URL;
	if( str.match('#message') != null ) document.forms.message_form.title.focus();
	
	
	
	$('.jTip').each(function() {
						if(this.id == '') {
							this.innerHTML = '<img src="http://dev.wow.com/images/item-placeholder_img.jpg" class="gear_tn"/>';
							this.className = '';
							this.href = '';
							
						}
								 });
	
	 $('#user_status').hover(
      function () {
        $('#edit_status').show();
      }, 
      function () {
        $('#edit_status').hide();
      }
    );


	
	$('#leftStat select').change( function() {
		$("#leftStat option:selected").each(function () {
            	val = '#'+$(this).attr('value');
				$("#leftStatDiv").html($(val).html());
              });
      
	});
	$('#rightStat select').change( function() {
		$("#rightStat option:selected").each(function () {
            	val = '#'+$(this).attr('value');
				$("#rightStatDiv").html($(val).html());
              });
      
	});
	
	
	$('.gear_tn').click(function() {
				window.location = $(this).attr('alt');	
				return false;
									   });