/**
 * Javascript - jQuery enabled
 * 
 * @package WPFramework
 * @subpackage Media
 */

/* Example jQuery
jQuery(document).ready(function($) {
	alert('jQuery + screen.js is loaded and ready to go!');
});
*/

// Dropdown menu using superfish
jQuery(document).ready(function($) {
	$(document).pngFix();
	$('#cm-top-nav-subnav').mouseout( function(){ $(this).hide(); } ).mouseover( function(){ $(this).show(); } );
	$('#cm-top-nav-ct a').each(function()
	{
		if($('ul', $(this).parent()).length > 0)
		{
			$(this).mouseover(function()
			{
				$('#cm-top-nav-subnav').empty().hide();
				$('ul li', $(this).parent()).each(function()
				{
					$(this).clone().appendTo( $('#cm-top-nav-subnav') );
				});
				$('#cm-top-nav-subnav li:last').css('border-right', 'none 0px');
				$('#cm-top-nav-subnav').fadeIn();
			});
		}
	});
	$('.cm-sidebar-cats').change(function()
	{
		var newCategory = $(this).val();
		window.location = "/blog/?cat=" + newCategory;
	});
	$('#cm-footer-nav-right li:last').css('border-right', 'none 0px');
	$('#cm-top-nav-subnav li:last').css('border-right', 'none 0px');
});