function setup_notifications(){

}

jQuery.noConflict();

jQuery(document).ready(function($){

    // Content box tabs
    $('.content-box .content-box-content div.tab-content').hide();
    $('.content-box-content div.default-tab').show();
    $('ul.content-box-tabs li a.default-tab').addClass('current');

    $('.content-box ul.content-box-tabs li a').click(
            function() {
                $(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs
                $(this).addClass('current'); // Add class "current" to clicked tab
                var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
                $(currentTab).siblings().hide(); // Hide all content divs
                $(currentTab).show(); // Show the content div with the id equal to the id of clicked tab
                return false;
            }
    );

    //Close button:
    $(".notification").css({ "cursor":"pointer" });
    $(".notification").click(
            function () {
                    $(this).fadeTo(400, 0, function () {
                            $(this).slideUp(600);
                    });
                    return false;
            }
    );

    $(".close").click(
            function () {
                    $(this).parent().fadeTo(400, 0, function () { // Links with the class "close" will close parent
                            $(this).slideUp(600);
                    });
                    return false;
            }
    );

    // Alternating table rows:
		
    $('tbody tr:even').addClass("even"); // Add class "alt-row" to even table rows

    // Check all checkboxes when the one in a table head is checked:
		
    $('.check-all').click(
            function(){
                    $(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked', $(this).is(':checked'));
            }
    )

    // Initialise Facebox Modal window:
		
    $('a[rel*=modal]').facebox(); // Applies modal window to any link with attribute rel="modal"

    $('a[rel*=facebox]').facebox();
		
    // Initialise jQuery WYSIWYG:
		
        //$(".wysiwyg").wysiwyg();

    //RUBYSOCCER CUSTOM
	
    $(".drop-down").click(function() {
            $(this).parent().find("div").slideToggle("fast");
            return false;
    });

    $(".drop-down-content a").click(function(){
            $(this).parent().slideToggle("fast");
    });

	
    /* IE6 Navbar fix */
    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
            var ieversion=new Number(RegExp.$1);
            if(ieversion < 7.0){
                $("li.nav").hover(
                    function () {
                            var subnav = $(this).find(".subnav");
                            subnav.show();
                    },
                    function () {
                            $(this).find(".subnav").hide();
                    }
                );
            }
        }
	
    /* Javascript for modal windows */
    $(document).bind('reveal.facebox', function() {

    //Settings - change styles on-the-fly
    $(".style-change").click(function() {
            var rel = $(this).attr("rel").split("|");
            var type = rel[0];
            var value = rel[1];
            $("#"+type+"-css").attr("href","resources/css/"+value+".css");
    });

    //Modal content box tabs

    $('.content-box .content-box-content div.tab-content').hide(); // Hide the content divs
    $('.content-box-content div.default-tab').show(); // Show the div with class "default-tab"
    $('ul.content-box-tabs li a.default-tab').addClass('current'); // Set the class of the default tab link to "current"

    $('.content-box ul.content-box-tabs li a').click( //When a tab is clicked...
        function() {
            var styleSet = $(".tabbed").find("#tab1").find("td").attr("style");
            if(!styleSet){
                    var h = $(".tabbed").find("#tab1").find("td").height();
                    if(h > 0){
                            //h += 10;
                            $(".tabbed").find("td").attr("style","height:"+h+"px");
                    }
            }
            $(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs
            $(this).addClass('current'); // Add class "current" to clicked tab

            var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
            currentTab = currentTab.substr(currentTab.lastIndexOf("#"));//IE fix (RubySoccer)
            $(currentTab).siblings().hide(); // Hide all content divs
            $(currentTab).show(); // Show the content div with the id equal to the id of clicked tab

            return false;
            }
        );
    });

	
});
  
function miniaturize(){
		
    $("#rs-output").html("");

    $(".subnav a").each(function(){
            var myClass = $(this).attr("class");
            var myHref = $(this).attr("href");
            var myCaption = $(this).html();
            var myRel = $(this).attr("rel");
            var str = '<a href="'+myHref+'" class="'+myClass+'" title="'+myCaption+'" rel="'+myRel+'">&nbsp;<span>'+myCaption+'</span></a>';
            $("#rs-output").append(str);
    });

    $("#rs-output a").hover(
                    function(){
                            $(this).find("span").attr("style","display:inline;");
                    },
                    function(){
                            $(this).find("span").attr("style","display:none;");
                    }
    );

    $('#rs-output a[rel*=modal]').facebox();
    $('#rs-output a[rel*=facebox]').facebox();

    $(".shortcut-buttons-set").hide();
    $("#navbar").hide();
    $("#logo").hide();
    $("#turn-info").attr("style","position:absolute;left:40px;top:13px;margin:0;text-align:left;");
    $("#sidebar").attr("style","position:fixed;min-width:890px;width:100%;height:36px;z-index:49;");
    $("#main-content").attr("style","padding:70px 0 0 30px;");
}
  