$(function() {

    var activeLink = window.location;
    $("#navigation a[href$="+activeLink+"]").css("color","#003366");
    
    $.sifr({path:'http://www.intelligentclaims.com/res/fonts'});
	$(".VAGRounded_Bold").sifr({font:'VAGRounded_Bold'});

    /*
	$("#clouds").animate({right: "1800px"}, 200000);
     */

    $("#banner .tabs .tab_one").css("background-position","0 -113px");
	$("#banner .two").hide();
	$("#banner .three").hide();
    $("#banner .four").hide();
    $("#banner .five").hide();
    $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
            });
    

    $("#banner .tabs .tab_one").click(function() {
        $("#banner .one").show();
        $("#banner .two").hide();
        $("#banner .three").hide();
        $("#banner .four").hide();
        $("#banner .five").hide();
        if ($(".one").is(":visible")) {
            $("#banner .tabs .tab_one").css("background-position","0px -113px");
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
		    $("#banner .two").hide();
		    $("#banner .three").hide();
            $("#banner .four").hide();
            $("#banner .five").hide();
            
            $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
            });
	}
    });
    
    
    
     $("#banner .tabs .tab_two").click(function() {
        $("#banner .one").hide();
        $("#banner .two").show();
        $("#banner .three").hide();
        $("#banner .four").hide();
        $("#banner .five").hide();
        if ($(".two").is(":visible")) {
            $("#banner .tabs .tab_one").css("background-position","0px 0px");
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
		    $("#banner .one").hide();
		    $("#banner .three").hide();
            $("#banner .four").hide();
            $("#banner .five").hide();
            
            $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 0");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
            });
	}
    });
    
    $("#banner .tabs .tab_three").click(function() {
        $("#banner .one").hide();
        $("#banner .two").hide();
        $("#banner .three").show();
        $("#banner .four").hide();
        $("#banner .five").hide();
        if ($(".three").is(":visible")) {
            $("#banner .tabs .tab_one").css("background-position","0px 0px");
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
		    $("#banner .one").hide();
		    $("#banner .two").hide();
            $("#banner .four").hide();
            $("#banner .five").hide();
            
            $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 0");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
            });
	}
    });
    
    $("#banner .tabs .tab_four").click(function() {
        $("#banner .one").hide();
        $("#banner .two").hide();
        $("#banner .three").hide();
        $("#banner .four").show();
        $("#banner .five").hide();
        if ($(".four").is(":visible")) {
            $("#banner .tabs .tab_one").css("background-position","0px 0px");
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
		    $("#banner .one").hide();
		    $("#banner .two").hide();
            $("#banner .three").hide();
            $("#banner .five").hide();
            
            $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 0");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px 0px");
            });
	}
    });
    
    $("#banner .tabs .tab_five").click(function() {
        $("#banner .one").hide();
        $("#banner .two").hide();
        $("#banner .three").hide();
        $("#banner .four").hide();
        $("#banner .five").show();
        if ($(".five").is(":visible")) {
            $("#banner .tabs .tab_one").css("background-position","0px 0px");
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
		    $("#banner .one").hide();
		    $("#banner .two").hide();
            $("#banner .three").hide();
            $("#banner .four").hide();
            
            $("#banner .tabs .tab_one").hover(function() {
            $("#banner .tabs .tab_one").css("background-position","0 -113px");
            },function() {
            $("#banner .tabs .tab_one").css("background-position","0 0");
            });
            
            $("#banner .tabs .tab_two").hover(function() {
            $("#banner .tabs .tab_two").css("background-position","-153px -113px");
            },function() {
            $("#banner .tabs .tab_two").css("background-position","-153px 0px");
            });
            
            $("#banner .tabs .tab_three").hover(function() {
            $("#banner .tabs .tab_three").css("background-position","-307px -113px");
            },function() {
            $("#banner .tabs .tab_three").css("background-position","-307px 0px");
            });
            
            $("#banner .tabs .tab_four").hover(function() {
            $("#banner .tabs .tab_four").css("background-position","-462px -113px");
            },function() {
            $("#banner .tabs .tab_four").css("background-position","-462px 0px");
            });
            
            $("#banner .tabs .tab_five").hover(function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            },function() {
            $("#banner .tabs .tab_five").css("background-position","-616px -113px");
            });
	}
    });
    
    $(".content_right form table, .apply_now table").addClass("emm").addClass("MMDataCaptureForm_Table");
    
    $(".emm tr").each(function(){
        $("td:first",this).addClass("MMDataCaptureForm_LabelTD");
    });
    $(".emm tr").each(function(){
        $("td:last",this).addClass("MMDataCaptureForm_FieldTD");
    });   
   
     
    $(".emm tr .MMDataCaptureForm_LabelTD").wrapInner("<span></span>");
     $(".emm tr .MMDataCaptureForm_FieldTD input").addClass("MMDataCaptureForm_Input");
    $(".emm tr textarea").parent().addClass("MMDataCaptureForm_TextArea");
    $(".emm .textarea").removeClass("MMDataCaptureForm_Input");
    
    $(".emm").each(function(){
        $("tr:last td:first",this).addClass("MMDataCaptureForm_ButtonEmptyTD").removeClass("MMDataCaptureForm_LabelTD");
        $("tr:last td:last",this).addClass("MMDataCaptureForm_ButtonTD").removeClass("MMDataCaptureForm_FieldTD");
    }); 
    $(".emm .MMDataCaptureForm_ButtonTD input").addClass("MMDataCaptureForm_SubmitButton");
    
    
});

