/* Author: Andrew Fleming
*/
$(document).ready(function() {
	
	/* Links to audio triger Flash audio embedding - uses the SWFObject plugin
	*/
  $('a.audio').click(function(){
	  var audioSource = $(this).attr('href');
	  $('<div class="audio-player">').flash({
		  swf: '../js/dewplayer/dewplayer.swf',
		  height: '20',
		  width: '200',
		  flashvars: {
			  mp3: audioSource,
			  autostart: '1'
		  }
	  }).insertAfter($(this));
	  $(this).fadeOut();
	  return false
  });
	/* Autofocus support for browsers which do not support html5 autofocus attricbute
	*/
	inputEl = document.createElement('input');
		if (!('autofocus' in inputEl)) {
		$('input[autofocus="true"]').eq(0).focus();
	};
	
	/* Calling slider
	*/
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		controlsShow: false,
		pause: 4000,
		speed: 1200
	});

});
