/*function setSelectedColor(imgElem, productId, color,prodImg,skuId, pColorName, isLeaderProduct, pSizeName,itemdescription,itemCount,sortProperties,navAction,parentid,navCount){
     changeColor(productId, color, prodImg,skuId, pColorName, isLeaderProduct, pSizeName,itemdescription,itemCount,sortProperties,navAction,parentid,navCount);
 imgClicked(imgElem.id,imgElem); 
}*/
 
 
function setSelectedColorandLink(imgElem, productId, color,prodImg,skuId, pColorName, isLeaderProduct,itemdescription,itemCount,sortProperties,navAction,parentid,navCount ){
     var productSelector = getProductSelector(productId, false, isLeaderProduct);
   
    if(productSelector != null){
        productSelector.setSelectedColorCode(color);
        initializeAllProducts(isLeaderProduct);
    }
    //changeColorandLink(productId, color, prodImg,skuId, pColorName, isLeaderProduct,itemdescription,itemCount,sortProperties,navAction,parentid,navCount );
	//imgClicked(imgElem.id,imgElem); 
	changeColorForSwatches(productId,prodImg,color,pColorName);
}
function setSelectedColorandLink1(imgElem, productId, color,prodImg,skuId, pColorName, isLeaderProduct,itemdescription,itemCount,sortProperties,navAction,parentid,navCount ){
	
	   
	   var productSelector = getProductSelector(productId, false, isLeaderProduct);
   
    if(productSelector != null){
        
        productSelector.setSelectedColorCode(color);
        initializeAllProducts(isLeaderProduct);
    }
     changeColorandLink(productId, color, prodImg,skuId, pColorName, isLeaderProduct,itemdescription,itemCount,sortProperties,navAction,parentid,navCount );
 	 imgClicked(imgElem.id1,imgElem);
}