

$(document).ready(function() {

	// hide btn
	$('input.button').hide();
	// hide search		
	if ($('input#s').val() == '')
	{
		$('input#s').val('Search');
	}
	
	// get ridder text in box if it says search, show button
	$('input#s').bind('focus', function() {
		$('input#s').addClass('s-active');
		$('input.button').show();
		if ($('input#s').val() == 'Search')
		{
			$('input#s').val('');
		}
	});
	
	$('input#s').bind('focusout', function() {
		$('input#s').removeClass('s-active');
		if ($('input#s').val() == '')
		{
			$('input#s').val('Search');
			$('input.button').hide();
		}
	});

// jQuery player

	
	$(function() { // executed when $(document).ready()
	  $("#jpId").jPlayer( {
		ready: function () {
		  this.element.jPlayer("setFile", "http://frijsfo.com/wordpress/wp-content/files_flutter/1273415549_13_2_1_5_Preview.mp3"); // Auto-Plays the file
		},
		swfPath: "http://frijsfo.com/wordpress/wp-content/themes/frijsfo/script/jplayer",
		customCssIds: false,
		errorAlerts: true
	  });
	});
	

	$('a[href$=mp3]').each(function(index) {
	    $(this).attr('rel', $(this).attr('href'));
  	})
	
	.attr('href', '#')
	
	.bind('click', function() 
	{
		$("#jpId").jPlayer( "setFile", $(this).attr('rel') ).jPlayer("play");
	});
	
	
	 
	$('.entry-content a, #primary a').wrap('<span class="a-underline" />');



	







  });
