$(function() {
	$('#slideshow').cycle({ 
		fx:'fade', 
    	timeout:5000,  
    	speed:2000,
    	delay:-1000
	});

	$.jqm.params.modal = false;
	$.jqm.params.overlay = 80;
	$.jqm.params.closeClass = 'form-close';
	$('#signup').jqm({ajax: 'http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/functions/subscribe.php', trigger: '.m-trigger'});

	var myOpen=function(hash) { hash.o.fadeIn(1000,function(){ hash.w.delay(200).fadeIn(600); }).show(); };	
	var myClose=function(hash) { hash.w.fadeOut(400,function(){ hash.o.fadeOut(400); }); };	
	$('#signup').jqm({onShow:myOpen}); 
	$('#signup').jqm({onHide:myClose});
	
    var menuConfig = {
        interval: 100,
        sensitivity: 2,
        over: showMenu,
        timeout: 300,
        out: hideMenu
    };
	    
	function showMenu() {
		$('#menu-area').fadeIn(300, function() {
     	});
    }

    function hideMenu() {
		$('#menu-area').fadeOut(600, function() {
     	});
    }

    $("#menu-container").hoverIntent(menuConfig)
    
	$('#menu li, #menu-columns li' ).mouseover(
      	function() {
        	$( "#arrows li" ).hide();              
        	$( '#arrow' + $( this ).attr( 'id' ).replace( 'menu', '' ) ).show();
        	$( '#arrow' + $( this ).attr( 'id' ).replace( 'column', '' ) ).show();
    });


	$('#book-glow').pulse({opacity: [0,1]},{
    	duration: 1000,
        times: 999999
    });
     
	$('#book').click(function(){
   		$('#book-glow').stop().hide();
	});
	
	$(".pricing tbody tr").mouseover(function() {
		$(this).addClass("over");}).mouseout(function() {
			$(this).removeClass("over");
	});
	
	$('#bs1').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS01_Katie.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Katie presents Easy Home Tanning</span>");
	});
	
	$('#bs2').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS02_Alex.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Alex presents the Perfect French Manicure</span>");
	});
	
	$('#bs3').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS03_Charlotte.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Charlotte presents Desktop to Dance Floor</span>");
	});
	
	$('#bs4').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS04_Pinja.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Pinja presents Mini Radiance Facial</span>");
	});
	
	$('#bs5').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS05_Kerrie.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Kerrie presents the Quick Quiff</span>");
	});	
	
	$('#bs6').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS06_Emma1.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Emma presents Tips for Winter Skin Damage</span>");
	});		
	
	$('#bs7').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS07_Emma2.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Emma presents Waxing Tips</span>");
	});			

	$('#bs8').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS08_Katie2.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Katie on the Benefits of Nailtiques Manicures</span>");
	});	
	
	$('#bs9').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BS09_Katie3.html');
		$('#vid_title').html("<span class='vid_t_span'>Beauty School - Katie on the benefits of Body Treatments and Body Exfoliation</span>");
	});	
	
		
	

	$('#bd1').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BD01_Aimie.html');
		$('#vid_title').html("<span class='vid_t_span'>How to Blowdry Lessons: Aimie - 'The Big & Beautiful'</span>");
	});
	
	$('#bd2').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BD02_Jess.html');
		$('#vid_title').html("<span class='vid_t_span'>How To Blowdry lessons: Jess - 'The Twist & Curl'</span>");
	});
	
	$('#bd3').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BD03_Tori.html');
		$('#vid_title').html("<span class='vid_t_span'>How to Blowdry lessons: Tori - 'The Sassy Bob'</span>");
	});
	
	$('#bd4').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/BD04_Kerrie.html');
		$('#vid_title').html("<span class='vid_t_span'>How to Blowdry Lessons: Kerrie - 'Short & Choppy'</span>");
	});
	
	$('#st1').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST01_Explore.html');
		$('#vid_title').html("<span class='vid_t_span'>Explore The Stuart Holmes Hair & Beauty Salon, Cheltenham</span>");
	});
	
	$('#st2').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST02_Experts.html');
		$('#vid_title').html("<span class='vid_t_span'>Meet the Experts Evening</span>");
	});
		
	$('#st3').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST03_Loreal.html');
		$('#vid_title').html("<span class='vid_t_span'>L'Oreal Colour Trophy Semi Finalists</span>");
	});
	
	$('#st4').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST04_SOTY.html');
		$('#vid_title').html("<span class='vid_t_span'>Salon of the Year Acceptance Speech</span>");
	});

	$('#st5').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST05_SOTY2.html');
		$('#vid_title').html("<span class='vid_t_span'>The story of our BIG day! Salon of the Year Winners 2010</span>");
	});
		
	$('#st6').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST06_Echo.html');
		$('#vid_title').html("<span class='vid_t_span'>Apprentice Development Award at the Gloucestershire Business Awards 2010</span>");
	});		

	$('#st7').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST07_Scoop.html');
		$('#vid_title').html("<span class='vid_t_span'>We Scoop Two Top Industry Awards</span>");
	});	
	
	$('#st8').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST08_LorealColour.html');
		$('#vid_title').html("<span class='vid_t_span'>L'Oreal Colour Trophy 2011</span>");
	});	

	$('#st9').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST09_HairDoctor.html');
		$('#vid_title').html("<span class='vid_t_span'>Stuart Holmes: Hair Doctor BBC Radio Part 1</span>");
	});	

	$('#st10').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST10_HairDoctor.html');
		$('#vid_title').html("<span class='vid_t_span'>Stuart Holmes: Hair Doctor BBC Radio Part 2</span>");
	});

	$('#st11').click(function() {
		$('#vidbox').load('http://www.stuartholmes.co.uk/wp-content/themes/sholmes/library/videos/ST11_LadiesDay.html');
		$('#vid_title').html("<span class='vid_t_span'>Cheltenham Festival Ladies Day 2011</span>");
	});	
				
});
