$(document).ready(function(){
	$('.submenuActive').click(function(e){
		e.preventDefault();
		$('.subsection').hide();
		$(this).parent().find('.subsection').show();
	});
	/*
	$page = $.url.attr("file");
	if(!$page) {
		$page = 'index.php';
	}
	console.log('href:'+ $href );
	$('#menu li a').each(function(){
		var $href = $(this).attr('href');
		console.log('href:'+ $href );
		if ( ($href == $page) || ($href == '') ) {
			$(this).parent().parent().show();
		} else {
			$(this).removeClass('on');
		}
	});
	var path = $(location).attr('href');;
	console.log('href:'+ path );
	var currentURL = window.location.toString().split("/");
	console.log('currentURL:'+ currentURL );
	var home = "/";
	console.log("#menu a[href='" + [path || home] + "']");
	$("#menu a[href='" + [path || home] + "']").addClass('activeLink');
	*/
	$('li.active').parent().show();
	$('body').prepend('<div id="share"></div>');
	$('#share').append('<a class="facebook" target="_blank"><img src="/imgs/facebook.png" border="0" /></a>');
	$('#share').append('<a class="twitter" target="_blank"><img src="/imgs/twitter.png" border="0" /></a>');
	$('.facebook').attr('href', 'http://www.facebook.com/sharer.php?u='+window.location+'&t='+ $("title").text());
	$('.twitter').attr('href', 'https://twitter.com/share?url='+window.location+'&text='+ $("title").text());
});


