$(document).ready(function() {

	$('#logo').click(
		function() {
			var homepage = "http://www.lifepotentials.net";
			window.open(homepage, '_self');
		});
	
	$('#homepage_book').click(
		function() {
			var simplybook = "http://www.lifepotentials.net/publications/books.php";
			window.open(simplybook, '_blank');
		});
		
	$('#homepage_davinci').click(
		function() {
			var davinci = "http://www.lifepotentials.net/chakra.html";
			window.open(davinci, '_blank');
		});
		
	$('#navbox_akashic').click(
		function() {
			var section1link = "http://lifepotentials.net/akashicrecords/whatareakrecs.php";
			window.open(section1link, '_blank');
		});
		
	$('#navbox_color').click(
		function() {
			var section2link = "http://lifepotentials.net/color/colorcards.php";
			window.open(section2link, '_blank');
		});
		
	$('#navbox_fengshui').click(
		function() {
			var section3link = "http://lifepotentials.net/fengshui/fengshuiclasses.php";
			window.open(section3link, '_blank');
		});
		
	$('#navbox_publications').click(
		function() {
			var section4link = "http://lifepotentials.net/publications/books.php";
			window.open(section4link, '_blank');
		});
		
	$('#navbox_etcetera').click(
		function() {
			var section5link = "http://lifepotentials.net/etcetera/aboutdiantha.php";
			window.open(section5link, '_blank');
		});
		
	$('#woc_logo').click(
		function() {
			var woc_url = "http://www.wheelofcolour.com";
			window.open(woc_url, '_blank');
		});
		
	$('#lpn_footerlogo').click(
		function() {
			var lpnfooter = "http://www.lifepotentials.net";
			window.open(lpnfooter, '_self');
		});
		
	$('#youtube').click(
		function() {
			var yt = "http://www.youtube.com/dbsharris";
			window.open(yt, '_blank');
		});
		
	$('#facebook').click(
		function() {
			var fb = "http://www.facebook.com/pages/Life-Potentials-Network/137806089621291";
			window.open(fb, '_blank');
		});
		
	$('#twitter').click(
		function() {
			var tw = "http://twitter.com/lifepnet";
			window.open(tw, '_blank');
		});
		
	$('#wordpress').click(
		function() {
			var wpurl = "http://lifepotentials.wordpress.com/";
			window.open(wpurl, '_blank');
		});
		
	//jQuery Navigation Scheme
	$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
 	$("ul.topnav li span, a.sublink").click(function() { //When trigger is clicked...  
   
    //Following events are applied to the subnav itself (moving subnav up and down)  
    $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
 
    $(this).parent().hover(function() {  
    }, function(){  
             $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
         });  
   
         //Following events are applied to the trigger (Hover events for the trigger)  
         }).hover(function() {  
            $(this).addClass("subhover"); //On hover over, add class "subhover"  
         }, function(){  //On Hover Out  
             $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
    });


});
