$(document).ready(function() {
    /* add some custom styling for crappy browser known as IE7 */
	/* $("#main-nav > ul > li > ul").parent().addClass("ieflyout"); */
	/* fix the z-index stacking order for crappy browser known as IE7 */
	$(function() {
    	var zIndexNumber = 1000;
    	$('div').each(function() {
    		$(this).css('zIndex', zIndexNumber);
    		zIndexNumber -= 10;
    	});
    }); 
    
    $('#cos-content').hide();
    $('.cos-bt').bt({
        trigger:['focus mouseover', 'blur mouseout'],
        closeWhenOthersOpen:true,
        contentSelector:"$('#cos-content')",
        fill:'rgb(208,208,208)',
        width:'350px',
        spikeGirth:20, 
        killTitle:true,
        cornerRadius:10,
        centerPointX:.7,
        centerPointY:.7,
        strokeWidth:1,
        strokeStyle:"#fff",
        shadow:true,
        shadowColor:'rgba(0,0,0,.9)',
        shadowOverlap:false,
        noShadowOpts:{strokeStyle:'#fff', strokeWidth:4}
    });
    $('#cot-content').hide();
    $('.cot-bt').bt({
        trigger:['focus mouseover', 'blur mouseout'],
        closeWhenOthersOpen:true,
        contentSelector:"$('#cot-content')",
        fill:'rgb(208,208,208)',
        width:'350px',
        spikeGirth:20, 
        killTitle:true,
        cornerRadius:10,
        centerPointX:.7,
        centerPointY:.7,
        strokeWidth:1,
        strokeStyle:"#fff",
        shadow:true,
        shadowColor:'rgba(0,0,0,.9)',
        shadowOverlap:false,
        noShadowOpts:{strokeStyle:'#fff', strokeWidth:4}
    });
    
    $('.add-more-friends').click(function(){
        $(this).parents('.nested-nightmare').children('.nested-nightmare').show();
        $(this).parent().parent().hide();
    });
});// end document ready function