/*
 * Config for product_colorSizeSelect.js
 */
 
if(typeof jsImageSrcPrepend=='undefined')
	var jsImageSrcPrepend = '';
if(typeof jsImageTagPrepend=='undefined')
	var jsImageTagPrepend = '';
if(typeof jsContextRoot=='undefined')
	var jsContextRoot = 'web';

var product = {};

product.enabled = true;

product.config = {};
product.config.site = 'mao';
product.config.debug = false;
product.config.quickView = false;

product.config.useSingleSizeLabel = false;
product.config.combineSizeLabels = false;

product.config.swapCartImageOn = 'hover'; // 'click' or 'hover'

product.config.element = {}; // id value for containers
product.config.element.debug = 'debug';
product.config.element.sizeLabel = 'sizeLabel';
product.config.element.addToBag = 'order_btns_prod > input[type="submit"]';
product.config.element.addToWishList = 'wishlist_add > input[type="submit"]';
product.config.element.bundlePageSkuInputPrefix = 'check_'; // the name prefix of the hidden input on the bundle page that holds the selected sku ('check_' for M+O)
product.config.element.bundlePageAdditionalSkuInputPrefix = 'sku_'; // the name prefix of the hidden input on the bundle page that holds the selected sku ('sku_' for M+O)
product.config.element.bundlePageLocateInStoreSkuInputPrefix = 'findItSize_'; // the name prefix of the hidden input on the bundle page that holds the selected sku for locate in store
product.config.element.bundlePageProdIdPrefix = 'prodId_'; // the name prefix of the hidden input on the bundle page that holds the selected color id ('prodId_' for M+O)
product.config.element.cartFormName = 'addToCart';
product.config.element.pdpFormName = 'addToCart';
product.config.element.colorsContainer = '.colors_'; // plus class_style
product.config.element.colors = 'color_'; // plus productIndex_class_style_color
product.config.element.sizes = 'sizes_'; // plus class_style

product.config.cssClass = {}; // css class definitions
product.config.cssClass.unavailable = 'unavailable';
product.config.cssClass.available = 'available';
product.config.cssClass.unavailableSelected = 'unavailable-selected';
product.config.cssClass.availableSelected = 'available-selected';

product.config.cssClass.color = 'color';
product.config.cssClass.size = 'size';

product.config.productPrefix = 'product_';
product.config.colorPrefix = 'color_';
product.config.sizePrefix = 'size_';

product.config.sizeLabels = [];
product.config.sizeLabels[0] = 'W';
product.config.sizeLabels[1] = 'L';

product.config.msgs = {};
product.config.msgs.noSelection = 'Select a size  ';
product.config.msgs.outOfStock = 'Out of stock  ';
product.config.msgs.available = 'In stock     ';

product.config.msgs.toolTips = {};
product.config.msgs.toolTips.enabled = true;
product.config.msgs.toolTips.available = 'Selection is in stock';
product.config.msgs.toolTips.noSelection = 'Please choose a size';
product.config.msgs.toolTips.outOfStock = 'Selection is not in stock';

product.config.enableWebOnlyStatus = false;

product.config.folders = {};
product.config.folders.akamai = jsImageSrcPrepend+'/Images/mao/';
product.config.folders.gradient = product.config.folders.akamai+'pdp/pdpGradientBg.jpg';
product.config.folders.scene7 = jsS7ImageSrcPrepend+'/';
//Pre-S7: product.config.folders.baseDirectory = product.config.folders.akamai+'l-a-y-d-o-w-n-s/';
product.config.folders.baseDirectory = product.config.folders.scene7+'';
//Pre-S7: product.config.folders.full = ['517x532_Front','517x532_Back','517x532_CU1','517x532_CU2','517x532_CU3','517x532_CU4','517x532_CU5','517x532_CU6'];
product.config.folders.full = ['_f?$pdp-517$','_b?$pdp-517$','_d1?$pdp-517$','_d2?$pdp-517$','_d3?$pdp-517$','_of?$pdp-517$','_ob?$pdp-517$','_os?$pdp-517$'];
//Pre-S7: product.config.folders.thumbs = ['44x45_Front','44x45_Back','44x45_CU1','44x45_CU2','44x45_CU3','44x45_CU4','44x45_CU5','44x45_CU6'];
product.config.folders.thumbs = ['_f?$pdp-44$','_b?$pdp-44$','_d1?$pdp-44$','_d2?$pdp-44$','_d3?$pdp-44$','_of?$pdp-44$','_ob?$pdp-44$','_os?$pdp-44$'];
//Pre-S7: product.config.folders.quickView = ['396x408_QV_Front','396x408_QV_Back','396x408_QV_CU1','396x408_QV_CU2','396x408_QV_CU3','396x408_QV_CU4','396x408_QV_CU5','396x408_QV_CU6'];
product.config.folders.quickView = ['_f?$qv-396$','_b?$qv-396$','_d1?$qv-396$','_d2?$qv-396$','_d3?$qv-396$','_of?$qv-396$','_ob?$qv-396$','_os?$qv-396$'];
//Pre-S7: product.config.folders.catThumb = '178x183'; // this will be replaced by category template page (eg. 313x322 3-across)
product.config.folders.catThumb = '_f?$cat-178$'; // this will be replaced by category template page (eg. 313x322 3-across)
//Pre-S7: product.config.folders.featureCatThumb = '375x386';
product.config.folders.featureCatThumb = '_f?$cat-375$';
//Pre-S7: product.config.folders.swatches = product.config.folders.akamai+'swatches/';
product.config.folders.swatches = product.config.folders.scene7;
product.config.folders.swatchThumb = '_s?$swatch-16$';
//Pre-S7: product.config.folders.cartThumb = product.config.folders.baseDirectory+'54x56/';
product.config.folders.cartThumb = '_f?$cart-54$';
//Pre-S7: product.config.folders.bpLargeThumb = '95x98/';
product.config.folders.bpLargeThumb = '_f?$cat-95$';
//Pre-S7: product.config.folders.bpLargeDetail = '375x386/';
product.config.folders.bpLargeDetail = '_f?$cat-375$';
product.config.defaultSwatchColor = "transparent";

product.cacheData = function(productIndex)
{
	product.config.pageWrapper = product.config.quickView ? $('#content-'+products[productIndex].classStyle) : $('#content');
	product.config.productImage = $('#product_image');
	// for all pages
	
	// page dependent
	switch(product.config.page)
	{
		case 'pdp':
			
			products[productIndex].overviewWrapper = product.config.quickView ? product.config.pageWrapper.find('#productOverviewQV-'+products[productIndex].classStyle) : product.config.pageWrapper.find('#productOverview-'+products[productIndex].classStyle);
			products[productIndex].containerNameSuffix = product.getContainerNameSuffix(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].requiredDimensions = product.getRequiredDimensions(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].colorsContainer = products[productIndex].overviewWrapper.find(product.config.element.colorsContainer+products[productIndex].classStyle);
			products[productIndex].msg = products[productIndex].overviewWrapper.find('.inventoryMessage');
			products[productIndex].colorNameLabel = products[productIndex].overviewWrapper.find('#color_name_'+products[productIndex].classStyle);
			products[productIndex].equityTable = products[productIndex].overviewWrapper.find('.equity_table');
			products[productIndex].imageNav = product.config.pageWrapper.find('.image_menu');
			
			break;
		case 'cart':
			
			product.config.pageWrapper = $('#cartStuff');
			products[productIndex].overviewWrapper = product.config.pageWrapper.find('.editProduct');
			products[productIndex].containerNameSuffix = product.getContainerNameSuffix(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].requiredDimensions = product.getRequiredDimensions(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].colorsContainer = products[productIndex].overviewWrapper.find(product.config.element.colorsContainer+products[productIndex].containerNameSuffix);
			products[productIndex].msg = products[productIndex].overviewWrapper.find('.inventoryMessage');
			products[productIndex].colorNameLabel = products[productIndex].overviewWrapper.find('#color_name_'+products[productIndex].containerNameSuffix);
			
			break;
		case 'bp':
		
			products[productIndex].overviewWrapper = product.config.pageWrapper.find('#expanded'+(productIndex+1)+' .sizeColorBox');
			products[productIndex].containerNameSuffix = product.getContainerNameSuffix(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].requiredDimensions = product.getRequiredDimensions(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].colorsContainer = products[productIndex].overviewWrapper.find('#colors_'+products[productIndex].classStyle);
			products[productIndex].msg = products[productIndex].overviewWrapper.find('#message_'+(productIndex-1));
			products[productIndex].colorNameLabel = products[productIndex].overviewWrapper.find('#color_name_'+products[productIndex].containerNameSuffix);
		
			break;
		case 'fi':

			products[productIndex].overviewWrapper = product.config.pageWrapper.find('#productOverview-'+products[productIndex].classStyle);
			products[productIndex].containerNameSuffix = product.getContainerNameSuffix(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].requiredDimensions = product.getRequiredDimensions(productIndex); // products[productIndex].overviewWrapper must be defined first
			products[productIndex].colorsContainer = products[productIndex].overviewWrapper.find(product.config.element.colorsContainer+products[productIndex].classStyle);
			products[productIndex].msg = products[productIndex].overviewWrapper.find('.inventoryMessage');
			products[productIndex].colorNameLabel = products[productIndex].overviewWrapper.find('#color_name_'+products[productIndex].classStyle);
			products[productIndex].equityTable = products[productIndex].overviewWrapper.find('.equity_table');
			products[productIndex].imageNav = product.config.pageWrapper.find('.image_menu');
			
			break;			
	}
	
	// for all pages
	products[productIndex].addToBagToolTipMsg = products[productIndex].overviewWrapper.find('.addToBagToolTipMsg');
	products[productIndex].wishListToolTipMsg = products[productIndex].overviewWrapper.find('.wishListToolTipMsg');
	products[productIndex].addToBagToolTipBg = products[productIndex].overviewWrapper.find('.addToBagToolTipBg');
	products[productIndex].wishListToolTipBg = products[productIndex].overviewWrapper.find('.wishListToolTipBg');
	products[productIndex].sizesContainer = products[productIndex].overviewWrapper.find('.sizeContainer');
			products[productIndex].size = products[productIndex].overviewWrapper.find('#size');
			products[productIndex].findItSize = products[productIndex].overviewWrapper.find('#findItSize');
}
