/******************************************************************************
 **                     LP CONFIGURATION v4.0.r100521                        **
 **       Standard Version.  ©2010 Mediagistic.  All rights reserved.        **
 **                   http://www.mediagisticpageone.com                      **
 *****************************************************************************/

formExtEmail = 'randy.chollar*candjair.com;sadams*mediagistic.com;jlittle*candjair.com';
formIntEmail = 'semannualplans*mediagisticleads.com';
formLeadCampaign = '166';
formAcctNumber = '116269';
GoogleAnalyticsUA = 'UA-6058692-61';
CallTrackNum = '210-428-6709';

function MG_FormOptions() {
	this.isScheduler = false; // true opens scheduler section upon loading. false is default.
	this.showDate = true;
	this.showTime = true;
	this.showSaturday = true;
	this.showSunday = true;
	this.richAlerts = true;
}

// only modify these if we have conversion codes
function MG_ConversionData(){
	this.useCD = false;							// <', src: 'change to true if using WV conversion codes
	this.gID = 0000000000;						// <', src: 'should be a 10-digit INTEGER
	this.gLabel = "00000000000000000";			// <', src: 'format as STRING
	this.gValue = 0;							// <', src: 'will likely always be 0
	this.yID = "000000000000000000000000000";	// <', src: 'format as STRING
	this.mID = 587765;							// <', src: 'do not change
	this.mCP = 5050;							// <', src: 'do not change
	this.mParams = "dedup=1";					// <', src: 'do not change
}

function MG_RelevantCopy(){
	this.content = new Array;		
	this.content[0]  = 'nothing'; // if none, wipe out all other indices and set [0] as 'nothing'
}

var testimonials_options = {
	auto:3000,
	speed:1000,
	vertical: true,
	visible: 3
};

var testimonials = [
    { txt: 'Ryan came today - Great young man, very professional.', src: 'Gary' },
	{ txt: 'I want to thank your technician for his patience & help killing a wasp nest at my door - a trusted worker, neat and clean.', src: 'LMC' },
	{ txt: 'All of my expectation were either met or exceeded.', src: 'JM' },
	{ txt: 'We were very impressed with Joe, he did an excellent job - he is a keeper!', src: 'CM' },
	{ txt: 'Overall very satisfied with our first experience with C&J.', src: 'JA' },
	{ txt: 'The men who came to my house are excellent with knowledge, courtesy, and trouble shooting.', src: 'CE' },
	{ txt: 'I\'ve been a customer of C&J for more than 40 years; I appreciate the manner in which C&J took care of my needs.', src: 'GV' },
	{ txt: 'Thank you for the very professional manner in which you installed our new system.  It was done with very little disruption.', src: 'FH' },
	{ txt: 'I was very impressed with the professionalism that C&J displayed. As a single woman, I felt very safe and comfortable in their presence.', src: 'SR' },
	{ txt: 'Ronnie, thanks for your professional service.', src: 'Chris' },
	{ txt: 'I wanted to thank you for a job well done and to commend Paul for the exceptional service we received.', src: 'JF' },
	{ txt: 'I am returning the carrier questionnaire to the Carrier Company with a "Very Satisfied" in all categories.', src: 'PD' },
	{ txt: 'For ten years, I\'ve been a very satisfied C&J customer, I recently bought my first annual maintenance contract.', src: 'TR' },
	{ txt: 'We received such excellent service from C&J air conditioning and your technician, Paul Watson.', src: '' },
	{ txt: 'I called to have C&J look into my air conditioning problems, the response was quick, efficient and professional. I will call C&J again in the future.', src: 'Phil' },
	{ txt: 'The service technician sent out to do the installation did a wonderful job, my thanks to them.', src: 'Elizabeth' },
	{ txt: 'I can always rely on you for good work.  Thanks again.', src: 'Ruth' },
	{ txt: 'Thank you for a great unit at a great price.  May the Lord continue to bless your family and business abundantly', src: 'Phil and Pam' },	
	{ txt: 'Thank you for your service.', src: 'Micheal' },
	{ txt: 'Many thanks for installing my ac so promptly & efficiently- for Adolf\'s expert workmanship and for the "goodie bag" Stacy brought me!', src: 'Ann' },
	{ txt: 'Thank you for your good help.', src: 'Frances' },
	{ txt: 'A quick note on the AC repair- the unit has been working great. Thanks again to you, Paul and your company for great service.', src: 'Ray' },
	{ txt: 'We are SO pleased.  We have told people about ya\'ll already. Having such wonderful employees reflects well on your Company.', src: 'Sheila' },	
	{ txt: 'Thanks for the efficient manner in which Paul installed the new coil and for your dependable service and timely service. ', src: 'HT' },
	{ txt: 'Thank you for the extra help you gave concerning my air conditioning.', src: 'PP' },
	{ txt: 'Thank you for a job well done.', src: 'RW' },
	{ txt: 'Thanks you for the kind and capable way you help us.', src: 'PM' },
	{ txt: 'Your service is excellent! Why would I go to someone else!', src: 'JP' },
	{ txt: 'Prompt service - Great PR', src: 'MS' }

];

var testimonials_load = function() {
	var container = $('#testimonials');
	if (container.length == 0 || !(jQuery.fn.jCarouselLite)) return;
	
	var div_hml = '<div class="area"></div>';
	var ul_html = '<ul></ul>';
	var li_html = '<li><span class="txt">{0}</span><span class="src">- {1}</span></li>';
	
	var div = $(div_hml).appendTo(container);
	var ul = $(ul_html).appendTo(div);
	
	for (var i=0; i<testimonials.length; i++) {
		var t = testimonials[i];
		var html = li_html.replace('{0}', t.txt).replace('{1}', t.src);
		$(html).appendTo(ul);
	}
	
	$(div).jCarouselLite(testimonials_options);
};

$(document).ready(function() {                
                var num = $('#ctn').text();
                $('body *').replaceText( num, CallTrackNum );
});

(function($){
'$:nm'; 
 $.fn.replaceText = function( search, replace, text_only ) {
	 if(!search)return false;
    return this.each(function(){
      var node = this.firstChild,
        val,
        new_val,
        remove = [];
      if ( node ) {        
        // Loop over all childNodes.
        do {
          if ( node.nodeType === 3 ) {
            val = node.nodeValue;
            new_val = val.replace( search, replace );
            if ( new_val !== val ) {              
              if ( !text_only && /</.test( new_val ) ) {
                $(node).before( new_val );                
                remove.push( node );
              } else {
                node.nodeValue = new_val;
              }
            }
          }          
        } while ( node = node.nextSibling );
      }
      remove.length && $(remove).remove();
    });
  };  
})(jQuery);

