//3dCart specific additions and client settings

//Namespace for all 4-Tell code
(function( _4TellBoost, $, undefined ) {

	//Client settings
	_4TellBoost.SiteInfo = new _4TellBoost.Site({
		baseURL:'www.AirStrikeInc.com',
		alias: 'AirStrik',
		GATrackingType: '_gaq', //valid types are 'none', 'pageTracker', '_gaq'
		GATrackID: '4TellRecs',
		rotateTopSellers: true,
		showLogo: false,
		addCartMethod: '/add_cart.asp?quick=1&item_id=',
		addCartBtnAtts: "input type='button' value='Add to Cart' class='btn' onmouseout=this.className='btn' onmouseover=this.className='btn_over'", 
		//addCartBtnAtts: "img alt='Add to Cart'",
		addCartImage: '', //'assets/images/buy.gif',
		includeBase: false
	});


	// Page Settings
	// Defaults	
	_4TellBoost.FirstTout.orientation = 'vertical';
 	_4TellBoost.FirstTout.newDivID = 'main4TellContainer';
 	_4TellBoost.FirstTout.divSelect = '#main4TellContainer'; // if class use '.' -- if id use '#'
 	_4TellBoost.FirstTout.divPosition = 'append'; //valid settings are 'append', 'replace', 'above', or 'below'
	_4TellBoost.FirstTout.captionStyle = 'menu-headers product4TCaption';
	_4TellBoost.FirstTout.productStyle = 'product4T';
	_4TellBoost.FirstTout.imageSize = "&maxx=130&maxy=68";
	_4TellBoost.SecondTout.orientation = 'horizontal';
 	_4TellBoost.SecondTout.newDivID = 'second4TellContainer';
 	_4TellBoost.SecondTout.divSelect = '#second4TellContainer'; // if class use '.' -- if id use '#'
 	_4TellBoost.SecondTout.divPosition = 'append'; //valid settings are 'append', 'replace', 'above', or 'below'
	_4TellBoost.SecondTout.captionStyle = 'titles product4TCaption2';
	_4TellBoost.SecondTout.productStyle = 'product4T product4T2';
	_4TellBoost.SecondTout.imageSize = "&maxx=130&maxy=68";

	_4TellBoost.getPageSettings = function(pageType) {
		var inCart = false;
		
		// These are the tout settings for different pages of the site. 
		// You may add or remove page types here to match your site architecture.
		// Any settings not specified here will use the default values listed above
		switch (pageType) {
			case 'Home': //home page
				_4TellBoost.FirstTout.enable = true;
				_4TellBoost.FirstTout.resultType = 4; //Top-sellers
				_4TellBoost.FirstTout.numItems = 6;
				if (_4TellBoost.SiteInfo.rotateTopSellers) {
					var d = new Date();	
					_4TellBoost.FirstTout.startPos = d.getDay() + 1; //roatate start position by day of week
				}
				_4TellBoost.FirstTout.caption = 'Top Sellers';
				_4TellBoost.SecondTout.enable = false;
				break;		
			case 'ProductDetail': //product detail page (PDP)
				_4TellBoost.FirstTout.enable = true;
				_4TellBoost.FirstTout.resultType = 0; //Cross-sell
				_4TellBoost.FirstTout.numItems = 6;
				_4TellBoost.FirstTout.caption = 'Our customers also bought...';
				_4TellBoost.SecondTout.enable = true;
				_4TellBoost.SecondTout.resultType = 3; //Similar
				_4TellBoost.SecondTout.numItems = 6;
				_4TellBoost.SecondTout.caption = 'Similar items...';
				break;		
			case 'Category': //category landing page 
				_4TellBoost.FirstTout.enable = true;
				_4TellBoost.FirstTout.resultType = 3; //Similar
				_4TellBoost.FirstTout.numItems = 6;
				_4TellBoost.FirstTout.caption = 'Related top sellers...';
				_4TellBoost.SecondTout.enable = false;
				break;
			case 'Search': //search results page 
				_4TellBoost.FirstTout.enable = true;
				_4TellBoost.FirstTout.resultType = 0; //Cross-sell
				_4TellBoost.FirstTout.numItems = 6;
				_4TellBoost.FirstTout.caption = 'Related top sellers...';
				_4TellBoost.SecondTout.enable = false;
				break;		
			case 'AddToCart': //intermediate add to cart page
				_4TellBoost.FirstTout.enable = false;
				_4TellBoost.SecondTout.enable = true;
				_4TellBoost.SecondTout.resultType = 0; //Cross-sell
				_4TellBoost.SecondTout.numItems = 4;
				_4TellBoost.SecondTout.caption = 'You may also like...';
				inCart = true;
				break;
			case 'OrderShipping': //intermediate add to cart page
				_4TellBoost.FirstTout.enable = false;
				_4TellBoost.SecondTout.enable = true;
				_4TellBoost.SecondTout.resultType = 2; //Blended
				_4TellBoost.SecondTout.numItems = 4;
				_4TellBoost.SecondTout.caption = 'You may also like...';
				inCart = true;
				break;
			default: //any page not listed
				_4TellBoost.FirstTout.enable = true;
				_4TellBoost.FirstTout.resultType = 2; //Blended
				_4TellBoost.FirstTout.numItems = 4;
				_4TellBoost.SecondTout.enable = false;
				break;
		}
		//setup toutType for GA tracking
		_4TellBoost.FirstTout.setToutType(pageType);
		_4TellBoost.SecondTout.setToutType(pageType);
		return inCart
	};




}( window._4TellBoost = window._4TellBoost || {}, jQuery )); 
//self-invoked namespace that protects $ and undefined internally


