/* slideshow */
$(document).ready(function() {
    $('.slideshow ul.first ').cycle({
		fx: 'fade' ,
		timeout:	 2000 // choose speed
	});

    $('.slideshow ul.second ').cycle({
		fx: 'fade' ,
		timeout:	 4000 // choose speed
	});

    $('.slideshow ul.third ').cycle({
		fx: 'fade' ,
		timeout:	 6000// choose speed
	});
	
	if ($('#jplayer').length>0) { 
    $('a.video-link').ytchromeless();
	
	$("#jplayer").jPlayer({

		ready: function () {

			$(this).jPlayer("setMedia", {

				mp3: "http://marklemaire.com/mp3/main-medley.mp3"

			}).jPlayer("play");

		},

		ended: function (event) {

			$(this).jPlayer("play");

		},

		swfPath: "js",

		supplied: "mp3"

	});
	}

  
});

/* ticker */
$(function () {
		$('#js-news').ticker({
							 fadeInSpeed: 400,
							 fadeOutSpeed: 400,
							 displayType: 'fade',
							 controls: false,
							 titleText: false,
							 pauseOnItems: 9000
							 });
	});




/* back button */
$(function () {
  var tabContainers = $('#home,#video,#recordings, #houseconcerts, #press, #bio, #contact');
  tabContainers.hide().filter(':#home').show();
  
  $(window).bind('hashchange', function () {
    var hash = window.location.hash || '#home';
    
    tabContainers.hide();
    tabContainers.filter(hash).show();
    $('ul#main-nav a').removeClass('selected');
    $('a[hash=' + hash + ']').addClass('selected');
  });
  
  $(window).trigger( "hashchange" );
});



/* show hide */
$(document).ready(function () {
            $('a#showhidetrigger').click(function () {
                $('#houseconcerts').show();
				$('#home').hide();
            });
        });

$(document).ready(function () {
            $('a#hometab').click(function () {
				$('#home').show();
            });
        });

