// JavaScript Document


var link_03 = "TypesOfDebt.html#Some-Debts-Are-Handled-Differently";
var link_05 = "BankruptcyInAction.html#Sharks-Are-At-The-Door";
var link_07 = "index.html";
var link_09 = "BankruptcyInAction.html#As-Soon-As-You-Hire-Us";
var link_12 = "MeetTheAttorney.html#Your-Situation-Is-Unique";

function scbeg() {

    if (currentActive != $(this).attr("which").toString()) {
        $("this").attr('src', "images/fp_" + ($(this).attr('which').toString()) + "_active.png");
        
        currentActive = $(this).attr('which').toString();
        $("#topImage").attr('src', "images/tp_" + ($(this).attr('which').toString()) + ".png");
        var whichSlide = "#slide_" + ($(this).attr('which').toString());
        $(whichSlide).attr('class', "showMidRight");
        $("#topImageAnchor").attr('href', eval("link_" + $(this).attr('which').toString() ) );
    
    
    }
    
               
        
        
    
    if ( currentActive != $("#beg0").attr('which') ) {
        $("#beg0").attr('src', "images/fp_" + ($('#beg0').attr('which').toString()) + ".png");
        $("#slide_07").attr('class', "hideMidRight");
        
    }
    if ( currentActive != $("#beg1").attr('which') ) {
        $("#beg1").attr('src', "images/fp_" + ($('#beg1').attr('which').toString()) + ".png");
        $("#slide_05").attr('class', "hideMidRight");
    }
    if ( currentActive != $("#beg2").attr('which') ) {
        $("#beg2").attr('src', "images/fp_" + ($('#beg2').attr('which').toString()) + ".png");
        $("#slide_03").attr('class', "hideMidRight");
    }
    if ( currentActive != $("#beg3").attr('which') ) {
        $("#beg3").attr('src', "images/fp_" + ($('#beg3').attr('which').toString()) + ".png");
        $("#slide_09").attr('class', "hideMidRight");
    }
    if ( currentActive != $("#beg4").attr('which') ) {
        $("#beg4").attr('src', "images/fp_" + ($('#beg4').attr('which').toString()) + ".png");
        $("#slide_12").attr('class', "hideMidRight");
    }
    
    
    
    
}








function freeconsult() {
        $("#beg5").attr('src', "images/fp_15.png");
        var lbl = $("#tplabel").find("img")[0];
        $(lbl).attr("src",'images/fp_15_empty.png');
}














var currentActive = "07";

jQuery.fn.extend({
 enter: function() {//plugins creation
     return this.each(function() {
       var pth = $(this).find("img")[0];
       var lbl = $("#tplabel").find("img")[0];

               $(this).hover(function(){
                    if ( $(pth).attr("which") == currentActive) {
                            $(lbl).attr("src",pth.src.replace(/_active.png/g, '_empty_label.png'));
                    } else {
                            $(pth).attr("src",pth.src.replace(/.png/g, '_active.png'));// mouse over Image
                            $(lbl).attr("src",pth.src.replace(/_active.png/g, '_empty_label.png'));
                    }
                  },function(){
                        $(lbl).attr("src",'images/fp_15_empty.png');// mouse over Image
                        if ( $(pth).attr("which") == currentActive) {
                        } else {
                            $(pth).attr("src",pth.src.replace(/_active.png/g, '.png'));// mouse out image
                            
                        }
                            });
                        
        
    });
  }
});
$(function(){  // Document is ready
 $(".midFloatLeft").enter();// call the function
 $(".midFloatRight").enter();
 $("#beg0").click(scbeg);
 $("#beg1").click(scbeg);
 $("#beg2").click(scbeg);
 $("#beg3").click(scbeg);
 $("#beg4").click(scbeg);
 $("#beg5").click(freeconsult);
});

function start() {
 $("#beg0").attr('src', "images/fp_07_active.png");
}
