// JavaScript Document
var theText = new Array() 
var image = new Array()
var talkingHeads = new Array()

theText[0] = 'We ran a little short this paycheck, it was great to be able to go to CheckCity.com . I was able to cover my bills in less than an hour. Check City is fast, friendly and convenient and the small fee I paid was so much better than being late on my car payment which would affect my credit and cost me about twice as much.  <br /><br />  <b>Janet J. <br /> McPherson, KS </b>';
image[0] = "./images/contentBackground_03.jpg";
talkingHeads[0] = "./images/smallTestimonials1_03.png";
theText[1] = 'My wife and I dropped the ball on handling a blown tire on her way to work and she wound up using the debit card to pay for the repairs. That night I realized what had happened and went to Check City. The small loan helped us avoid at least four $20.00 overdraft fees from our bank.  <br /><br /> <b>Derek C.<br />Seattle, WA </b>';
image[1] = "./images/contentBackground2_03.jpg";
talkingHeads[1] = "./images/smallTestimonials2_03.png";
theText[2] = 'With four children unexpected bills just seem to pop up.  With school, scouting trips, and medical visits sometimes I just can&apos;t plan far enough ahead. Check City is a great option when I need just a few hundred dollars this week instead of next week when my husband gets paid.  <br /><br />  <b>Kathy B. <br />Sacramento, CA</b> ';
image[2] = "./images/contentBackground3_03.jpg";
talkingHeads[2] = "./images/smallTestimonials3_03.png";
theText[3] = 'It seems like every year we wind up getting into a fender bender. I always get it taken care of, but of course there is a deductible that I could never have budgeted for. While it is nice that our insurance covers the brunt of the costs, it is great that Check City is there when I need it. <br /><br /> <b>Michael J. <br />Chicago, IL</b> ';
image[3] = "./images/contentBackground4_03.jpg";
talkingHeads[3] = "./images/smallTestimonials4_03.png";

var p = theText.length;  
var whichText = Math.round(Math.random()*(p-1));

function  showText(){
$('#contentBG').css('background-image','url('+image[whichText]+')');
document.write('<div id="testimonialText">'+theText[whichText]+'</div>');
}
function showTalkingHeads(){
document.write('<img src="'+talkingHeads[whichText]+'" border=0 />');
}

// changes position of header
 $(document).ready( function(){
    var header = $("#header");
  $("#headerspace").append(header);    
  });
  
 $(document).ready( function(){
    $(".navSlide").hover( function(){
        var a = "#"+$(this).attr('id')+"box";
          if($(a).is(":hidden")){
            $(a).slideDown("fast");
          }
    },
    function(){
        var a = "#"+$(this).attr('id')+"box"; 
        if($(a).is(":visible")){ 
            $(a).slideUp("fast");
          }       
    });
    $('.myTrigger').click( function(){
        $("#box").slideToggle("fast"); 
      }, 
    function(){
    });
    $('.collapseButton').click( function(){
        $("#box").slideUp();   
    });
    
    var pathname = window.location.pathname;
    pathname = pathname.split('/');
    pathname = pathname[(pathname.length -1)];    
    switch(pathname){
        case 'services.aspx':
            $('#service').find('a').removeClass('static');
            $('#service').find('a').addClass('active');
            break;
        case 'faqs.aspx':
            $('#faq').find('a').removeClass('static');
            $('#faq').find('a').addClass('active');
            break;
        case 'resources.aspx':
            $('#resources').find('a').removeClass('static');
            $('#resources').find('a').addClass('active');
            break;
        case 'company.aspx':
            $('#company').find('a').removeClass('static');
            $('#company').find('a').addClass('active');
            break;
        case 'alllocations.aspx':
            $('#locations').find('a').removeClass('static');
            $('#locations').find('a').addClass('active');
            break;
        case 'media.aspx':
            $('#media').find('a').removeClass('static');
            $('#media').find('a').addClass('active');
            break;
     }
}); 


 
