$(document).ready(function() {
	        	    //  Make all parts of a menu component clickable
	    $('.topmenuitem, .sidemenuiteminner').bind('click', function() {
			var destURL = $(this).children('a:first').attr('href');
			if (destURL)
	        	window.location = destURL;
		});
		//  Make all parts of a menu component highlight on browsers like IE6
		$('.topmenuitem, .sidemenuiteminner').bind('mouseover', function() {
		    $(this).addClass('topmenuitemhover');
		}).bind('mouseout', function() {
		    $(this).removeClass('topmenuitemhover');
		});
		$('.topmenuitem, .sidemenuiteminner').each(function() {
			if ($(this).children('a:first').attr('href'))
				$(this).css('cursor', 'pointer');
		});
        $('.sundaytickbox').click(function() {
            ischecked = $(this).attr("checked");
 
            if (typeof(ischecked) == "undefined")
            {
                selector = $(this).parents('tr').next('.sundayoptions').children('td').children('div');
                selector.slideUp('fast');
                $('.sundayamoption').attr("checked", "");
                $('.sundaypmoption').attr("checked", "");
                $(this).attr("checked", "");
            }
            else
            {
                selector = $(this).parents('tr').next('.sundayoptions').children('td').children('div');
                selector.slideDown('fast');
                $('.sundayamoption').attr("checked", "");
                $('.sundaypmoption').attr("checked", "");
                $(this).attr("checked", "checked");
            }
        });
        $('.sundayamoption').click(function() {
            $('.sundayamoption').attr("checked", "");
            $(this).attr("checked", "checked");
        });
        $('.sundaypmoption').click(function() {
            $('.sundaypmoption').attr("checked", "");
            $(this).attr("checked", "checked");
        });
        $('.sundaytickbox2').click(function() {
            ischecked = $(this).attr("checked");
 
            if (typeof(ischecked) == "undefined")
            {
                selector = $(this).parents('tr').next('.sundayoptions').children('td').children('div');
                selector.slideUp('fast');
                $('.sundayamoption2').attr("checked", "");
                $('.sundaypmoption2').attr("checked", "");
                $(this).attr("checked", "");
            }
            else
            {
                selector = $(this).parents('tr').next('.sundayoptions').children('td').children('div');
                selector.slideDown('fast');
                $('.sundayamoption2').attr("checked", "");
                $('.sundaypmoption2').attr("checked", "");
                $(this).attr("checked", "checked");
            }
        });
        $('.sundayamoption2').click(function() {
            $('.sundayamoption2').attr("checked", "");
            $(this).attr("checked", "checked");
        });
        $('.sundaypmoption2').click(function() {
            $('.sundaypmoption2').attr("checked", "");
            $(this).attr("checked", "checked");
        });
            $(".sundayoptions").children("td").children("div").hide();
        
            $(".sundaytickbox").attr("checked", "");
        		});