// JavaScript Document
  // The following function is called once the rest of the document is fully loaded
        $(document).ready(function()
        {
                //if this is not the first tab, hide it
                        jQuery(".tab:not(:first)").hide();

                        //to fix u know who
                        jQuery(".tab:first").show();

                        //when we click one of the tabs
                        jQuery(".htabs a").click(function(evt){
                                evt.preventDefault();
                                //get the ID of the element we need to show
                                stringref = jQuery(this).attr("href").split('#')[1];

                                //hide the tabs that doesn't match the ID
                                jQuery('.tab:not(#'+stringref+')').hide();

                                //fix
                                if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0") {
                                        jQuery('.tab#' + stringref).show();
                                }
                                else
                                //display our tab fading it in
                                jQuery('.tab#' + stringref).fadeIn();
                                //stay with me
                                return false;
                        });

            $("#TabCnt .cardone-Tab1").click(function() {
                                if ($("#TabCnt")[0].active == 0) { return false; }
                            $("#TabCnt")[0].active = 0;
                                $("#TabCnt li")
                                        .removeClass("cardone-Tab1-active")
                                        .removeClass("cardone-Tab2-active");
                                $(".cardone-Tab1")
                                        .addClass("cardone-Tab1-active");
                                $(".content1, .content2").hide();
                                $(".content1").fadeIn('slow');
                                return false;
                        });
            $("#TabCnt .cardone-Tab2").click(function() {
                                if ($("#TabCnt")[0].active == 1) { return false; }
                            $("#TabCnt")[0].active = 1;
                                $("#TabCnt li")
                                        .removeClass("cardone-Tab1-active")
                                        .removeClass("cardone-Tab2-active");
                                $(".cardone-Tab2")
                                        .addClass("cardone-Tab2-active");
                                $(".content1, .content2").hide();
                                $(".content2").fadeIn('slow');
                                return false;
                        });

                        $(".subtab a").click(function() {
                                if ($(this).parent().is(".subtab-active")) { return false; }
                                $(this).parents('.subtabcontainer').find(".subtab-active").removeClass("subtab-active");
                                $(this).parent().addClass("subtab-active");
                                content_id = $(this).parent().attr('id').split('subtab').join('subcontent');
                                $(this).parents('.subtabcontainer').find('.subcontent').hide();
                                $('#'+content_id).fadeIn('slow');
                                return false;
                        });
        });