	$(document).ready(function() { 
        $('ul#main-menu-list').supersubs({ 
            minWidth:    7,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish({ 
            delay:       500,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: false                            // disable drop shadows 
        });
		$("a[rel='single']").colorbox({
			maxWidth:"90%"
		});
		$("a[rel='gallery']").colorbox({
			maxWidth:"90%", loop:false
		});
    });
	$(document).ready(function() {
	$("#archive-tab .tab-list li").click(function () {
		// this is the dom element clicked
		var index = $("#archive-tab .tab-list li").index(this);
		$("#archive-tab li").each(function() { $(this).removeClass("active-tab"); });  
		$("#archive-tab div").each(function() { $(this).removeClass("active-tab"); });  
		$(this).addClass("active-tab");  
		$("#archive-tab div:eq("+index+")").addClass("active-tab");  
		});
	});
	$(document).ready(function() {
		$('.post-content img').each(function() {
			var maxWidth = 448; // Max width for the image
			var ratio = 0;  // Used for aspect ratio
			var width = $(this).width();    // Current image width
			var height = $(this).height();  // Current image height
 
        // Check if the current width is larger than the max
			if(width > maxWidth){
				ratio = maxWidth / width;   // get ratio for scaling image
				$(this).css("width", maxWidth); // Set new width
				$(this).css("height", height * ratio);  // Scale height based on ratio
				height = height * ratio;    // Reset height to match scaled image
				width = width * ratio;    // Reset width to match scaled image
			}
		});
	});
