|
Visit the other Gap Inc. Brands:
//DO NOT REMOVE!! - Global WCD Variable
var ABTestVariables = {};
// 0 && !restore) {
this.insertCSS();
this.walkThroughProductGrid();
}
else {
this.restoreCSS();
}
},
insertCSS: function() {
var headID = document.getElementsByTagName("head")[0];
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = '/Asset_Archive/GPWeb/content/0001/447/546/assets/ThreeAcross.css';
cssNode.media = 'screen';
headID.appendChild(cssNode);
this.restoreCSS();
},
restoreCSS: function() {
//show tabTable now
var headID = document.getElementsByTagName("head")[0];
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = '/Asset_Archive/GPWeb/content/0001/447/546/assets/ThreeAcross_Restore.css';
cssNode.media = 'screen';
headID.appendChild(cssNode);
if ($('tabTable') != null) {
$('tabTable').style.visibility = "visible";
}
},
/**
* walkThroughProductGrid
* Grab every product image for every "brandX imgDiv".
* Then change it's src to the appropriate quickLook/p01 image path
*/
walkThroughProductGrid: function() {
var thisClass = this.brandProductItem[this.brandID];
var allProducts = $$("div[class=" + thisClass + "]");
var i = 0;
var counter = 0;
while (i < allProducts.length) {
//check if previous sibling is a 'divider' (sub category)
//if NOT then increment counter
//else this is the beginning of a row and should set counter to 1
prevNode = allProducts[i].previous();
if (prevNode.className != 'divider1') {
counter++;
//allProducts[counter].style.border = "1px solid red";
}
else {
counter = 1;
}
//insert a 'clear' break after every third product (row)
//OR for the last productItem
//check the 'next' node to see if it is 'productToolsLine' (last product)
//skip 'clear5' classes
var nextNodeClassName = allProducts[i].next().className;
if (nextNodeClassName == 'clear5') {
nextNodeClassName = allProducts[i].next().next().className;
}
if (counter == 3 || nextNodeClassName.indexOf('productToolsLine') >= 0) {
clearBreak = document.createElement('div');
clearBreak.setAttribute('class', 'threeAcrossClearFix');
if (clientBrowser.isIE6 == null) {
hiddenText = document.createTextNode(' ');
clearBreak.appendChild(hiddenText);
}
else {
clearBreak.innerHTML = ". ";
}
allProducts[i].parentNode.insertBefore(clearBreak, allProducts[i].nextSibling);
counter = 0;
}
i++;
}
}
}
// ]]>
//
//
// 0 ) {
/**
* OVERRIDE
* need to adjust left positioning of the
* crossLink module for larger VI images
**/
crossLink.setPos = (function() {
if(!(crossLink.mainContent && crossLink.moduleDim)) return;
crossLink.mainContentPos = Position.cumulativeOffset(crossLink.mainContent);
var browserOffset = clientBrowser.isIE6 ? window.pageYOffset || document.documentElement.scrollTop : 0;
//change crossLink.moduleDim to 95 since crossLink is not always readable
//change crossLink.mainContentDim.width to 770 since this is not always available (IE6 only?)
var crossLinkPos = crossLink.modulePos = crossLink.modulePos = [770 + crossLink.mainContentPos[0],
(window.innerHeight || document.documentElement.clientHeight) + browserOffset - 95 - 10];
//sometimes crossLink.module is undefined
if (typeof crossLink.module != 'undefined') {
if (!crossLink.isShown) {
crossLink.module.setStyle({ opacity: '0', left: crossLinkPos[0] + 'px', top: crossLinkPos[1] + 'px' });
crossLink.isShown = new Effect.Appear(crossLink.module.id, { duration: 1.0 });
}
else {
crossLink.module.setStyle({ left: crossLinkPos[0] + 'px', top: crossLinkPos[1] + 'px' });
}
}
});
if (clientBrowser.isIE6 && top.location.href.indexOf('/browse/category.do?') > 0) {
Event.observe(window, 'scroll', crossLink.setPos);
} else if (top.location.href.indexOf('/browse/category.do?') > 0) {
Event.observe(window, 'resize', crossLink.setPos);
}
}
// ]]>
//
|
|
첫댓글 상품에 대한 정보가 안나와있네요..부탁드릴께요^^