");
$("#TB_overlay").click(tb_remove);
}
}
if(caption===null){caption="";}
$("body").append("
");//add loader to the page
$('#TB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
TB_PrevCaption = "";
TB_PrevURL = "";
TB_PrevHTML = "";
TB_NextCaption = "";
TB_NextURL = "";
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
if(imageGroup){
TB_TempArray = $("a[rel="+imageGroup+"]").get();
for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
if (!(TB_TempArray[TB_Counter].href == url)) {
if (TB_FoundURL) {
TB_NextCaption = TB_TempArray[TB_Counter].title;
TB_NextURL = TB_TempArray[TB_Counter].href;
TB_NextHTML = "
Next >";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[TB_Counter].href;
TB_PrevHTML = "
< Prev";
}
} else {
TB_FoundURL = true;
TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = tb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
if(params['modal'] != "true"){
$("#TB_window").append("
");
}
$("#TB_window").append("
");
$("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML === "")) {
function goPrev(){
if($(document).off("click",goPrev)){$(document).off("click",goPrev);}
$("#TB_window").remove();
$("body").append("
");
tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
return false;
}
$("#TB_prev").click(goPrev);
}
if (!(TB_NextHTML === "")) {
function goNext(){
$("#TB_window").remove();
$("body").append("
");
tb_show(TB_NextCaption, TB_NextURL, imageGroup);
return false;
}
$("#TB_next").click(goNext);
}
document.onkeydown = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
} else if(keycode == 190){ // display previous image
if(!(TB_NextHTML == "")){
document.onkeydown = "";
goNext();
}
} else if(keycode == 188){ // display next image
if(!(TB_PrevHTML == "")){
document.onkeydown = "";
goPrev();
}
}
};
tb_position();
$("#TB_load").remove();
$("#TB_ImageOff").click(tb_remove);
$("#TB_window").css({display:"block"}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html pages
var queryString = url.replace(/^[^\?]+\??/,'');
var params = tb_parseQuery( queryString );
TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
ajaxContentW = TB_WIDTH - 30;
ajaxContentH = TB_HEIGHT - 45;
if(url.indexOf('TB_iframe') != -1){
urlNoQuery = url.split('TB_');
$("#TB_window").append("
");
}else{
if($("#TB_window").css("display") != "block"){
if(params['modal'] != "true"){
$("#TB_window").append("
");
}else{
$("#TB_overlay").off();
$("#TB_window").append("
");
}
}else{
$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#TB_ajaxContent")[0].scrollTop = 0;
$("#TB_ajaxWindowTitle").html(caption);
}
}
$("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
$("#TB_ajaxContent").html($('#' + params['inlineId']).html());
tb_position();
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
if(frames['TB_iframeContent'] === undefined){//be nice to safari
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
$(document).on('keyup', function(e){ var key = e.keyCode; if(key == 27){tb_remove();}});
}
}else{
$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
$("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
$("#TB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
function tb_remove() {
$("#TB_imageOff").off("click");
$("#TB_overlay").off("click");
$("#TB_closeWindowButton").off("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
return false;
}
function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
// Script for dropdown and fly menu for product category page
(function($){
$.fn.superfish = function(o){
var defaults = {
hoverClass : "sfHover",
delay : 800,
animation : {opacity:"show"},
speed : "normal"
},
over = function(){
var $$ = $(this);
clearTimeout(this.sfTimer);
if (!$$.is("."+o.hoverClass)) {
$$.addClass(o.hoverClass)
.find("ul")
.animate(o.animation,o.speed)
.end()
.siblings()
.removeClass(o.hoverClass);
}
},
out = function(){
var $$ = $(this);
this.sfTimer=setTimeout(function(){
$$.removeClass(o.hoverClass)
.find("iframe", this)
.remove();
},o.delay);
};
o = $.extend(defaults, o || {});
var sfHovAr=$("li",this)
.on("mouseenter",over).on("mouseleave",out)
.find("a").each(function() {
var $a = $(this), $li = $a.parents("li");
$a.on('focus',function(){ $li.each(over); })
.on('blur',function(){ $li.each(out); });
}).end();
$(window).on('unload',function() {
sfHovAr.off("mouseover").off("mouseout");
});
return this;
};
})(jQuery);
// Script for product preview box on category page
$(function(){
doc = function(){
if (self.innerHeight) {
doc.pageYOffset = self.pageYOffset;
doc.pageXOffset = self.pageXOffset;
doc.innerHeight = self.innerHeight;
doc.innerWidth = self.innerWidth;
} else if (document.documentElement && document.documentElement.clientHeight) {
doc.pageYOffset = document.documentElement.scrollTop;
doc.pageXOffset = document.documentElement.scrollLeft;
doc.innerHeight = document.documentElement.clientHeight;
doc.innerWidth = document.documentElement.clientWidth;
} else if (document.body) {
doc.pageYOffset = document.body.scrollTop;
doc.pageXOffset = document.body.scrollLeft;
doc.innerHeight = document.body.clientHeight;
doc.innerWidth = document.body.clientWidth;
}
return doc;
}
var docObj = new doc();
var scrollHeight = docObj.pageYOffset;
var windowHeight = docObj.innerHeight;
var startingPos = 0;
var windowArea = scrollHeight + windowHeight;
var prodTable = document.getElementById("prod_data");
var pixelHeight = $("#category_wrapper").height();
var pixelHeightHeader = $("#header-ta").height();
if ($(".toggle_container").css("display") == 'block') {
var topPageContent = $("#top-page-content").height()- $(".toggle_container").height();
} else {
var topPageContent = $("#top-page-content").height();
}
if (topPageContent < 200) {
var totalPixelsTopOfPage = topPageContent + pixelHeightHeader + 72;
} else {
var totalPixelsTopOfPage = topPageContent + pixelHeightHeader + 22;
}
if (pixelHeight > 650) {
window.onscroll = moveMenuBar;
document.onscroll = moveMenuBar;
}
function moveMenuBar() {
var object=document.getElementById('product_preview');
if(object != null){
var newObj = new doc();
var y = newObj.pageYOffset;
var endOfPage = pixelHeight - 550;
var desiredOffset = y - totalPixelsTopOfPage;
if ($(".toggle_container").css("display") != 'none') { desiredOffset=desiredOffset- $(".toggle_container").height();
if (y < (totalPixelsTopOfPage+$(".toggle_container").height())){ desiredOffset = 0; }
else if (y > (endOfPage + totalPixelsTopOfPage+$(".toggle_container").height())) { desiredOffset = endOfPage; }}
else {
if (y < totalPixelsTopOfPage){ desiredOffset = 0; }
else if (y > (endOfPage + totalPixelsTopOfPage)) { desiredOffset = endOfPage; }
}
object.style.display = 'none';
object.style.top = desiredOffset + 'px';
object.style.display = 'block';
}
}
});
/* Script for Pop up Windows for Category Page */
var cb_pathToImage = "/product_finder/loadingAnimation.gif";
//add catbox to href & area elements that have a class of .catbox
function cb_init(domChunk){
$(domChunk).click(function(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
cb_show(t,a,g);
this.blur();
return false;
});
}
function cb_show(caption, url, imageGroup) {//function called when the user clicks on a catbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("CB_HideSelect") === null) {//iframe to hide select elements in ie6
$("body").append("
");
$("#CB_overlay").click(cb_remove);
}
}else{//all others
if(document.getElementById("CB_overlay") === null){
$("body").append("
");
$("#CB_overlay").click(cb_remove);
}
}
if(caption===null){caption="";}
$("body").append("
");//add loader to the page
$('#CB_load').show();//show loader
var baseURL;
if(url.indexOf("?")!==-1){ //ff there is a query string involved
baseURL = url.substr(0, url.indexOf("?"));
}else{
baseURL = url;
}
var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;
var urlType = baseURL.toLowerCase().match(urlString);
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
CB_PrevCaption = "";
CB_PrevURL = "";
CB_PrevHTML = "";
CB_NextCaption = "";
CB_NextURL = "";
CB_NextHTML = "";
CB_imageCount = "";
CB_FoundURL = false;
if(imageGroup){
CB_TempArray = $("a[rel="+imageGroup+"]").get();
for (CB_Counter = 0; ((CB_Counter < CB_TempArray.length) && (CB_NextHTML === "")); CB_Counter++) {
var urlTypeTemp = CB_TempArray[CB_Counter].href.toLowerCase().match(urlString);
if (!(CB_TempArray[CB_Counter].href == url)) {
if (CB_FoundURL) {
CB_NextCaption = CB_TempArray[CB_Counter].title;
CB_NextURL = CB_TempArray[CB_Counter].href;
CB_NextHTML = "
Next >";
} else {
CB_PrevCaption = CB_TempArray[CB_Counter].title;
CB_PrevURL = CB_TempArray[CB_Counter].href;
CB_PrevHTML = "
< Prev";
}
} else {
CB_FoundURL = true;
CB_imageCount = "Image " + (CB_Counter + 1) +" of "+ (CB_TempArray.length);
}
}
}
imgPreloader = new Image();
imgPreloader.onload = function(){
imgPreloader.onload = null;
// Resizing large images - orginal by Christian Montoya edited by me.
var pagesize = cb_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
// End Resizing
CB_WIDTH = imageWidth + 30;
CB_HEIGHT = imageHeight + 60;
$("#CB_window").append("
" + "
"+caption+"
" + CB_imageCount + CB_PrevHTML + CB_NextHTML + "
");
$("#CB_closeWindowButton").click(cb_remove);
if (!(CB_PrevHTML === "")) {
function goPrev(){
if($(document).off("click",goPrev)){$(document).off("click",goPrev);}
$("#CB_window").remove();
$("body").append("
");
cb_show(CB_PrevCaption, CB_PrevURL, imageGroup);
return false;
}
$("#CB_prev").click(goPrev);
}
if (!(CB_NextHTML === "")) {
function goNext(){
$("#CB_window").remove();
$("body").append("
");
cb_show(CB_NextCaption, CB_NextURL, imageGroup);
return false;
}
$("#CB_next").click(goNext);
}
document.onkeydown = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
cb_remove();
} else if(keycode == 190){ // display previous image
if(!(CB_NextHTML == "")){
document.onkeydown = "";
goNext();
}
} else if(keycode == 188){ // display next image
if(!(CB_PrevHTML == "")){
document.onkeydown = "";
goPrev();
}
}
};
cb_position();
$("#CB_load").remove();
$("#CB_ImageOff").click(cb_remove);
$("#CB_window").css({display:"block"}); //for safari using css instead of show
};
imgPreloader.src = url;
}else{//code to show html pages
var queryString = url.replace(/^[^\?]+\??/,'');
var params = cb_parseQuery( queryString );
CB_WIDTH = (params['width']*1) + 30 || 555; //defaults to 630 if no paramaters were added to URL
CB_HEIGHT = (params['height']*1) + 40 || 595; //defaults to 440 if no paramaters were added to URL
ajaxContentW = CB_WIDTH - 30;
ajaxContentH = CB_HEIGHT - 45;
if(url.indexOf('CB_iframe') != -1){
urlNoQuery = url.split('CB_');
$("#CB_window").append("
");
}else{
if($("#CB_window").css("display") != "block"){
if(params['modal'] != "true"){
$("#CB_window").append("
");
}else{
$("#CB_overlay").off();
$("#CB_window").append("
");
}
}else{
$("#CB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#CB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#CB_ajaxContent")[0].scrollTop = 0;
$("#CB_ajaxWindowTitle").html(caption);
}
}
$("#CB_closeWindowButton").click(cb_remove);
if(url.indexOf('CB_inline') != -1){
$("#CB_ajaxContent").html($('#' + params['inlineId']).html());
cb_position();
$("#CB_load").remove();
$("#CB_window").css({display:"block"});
}else if(url.indexOf('CB_iframe') != -1){
cb_position();
if(frames['CB_iframeContent'] === undefined){//be nice to safari
$("#CB_load").remove();
$("#CB_window").css({display:"block"});
$(document).on('keyup', function(e){ var key = e.keyCode; if(key == 27){cb_remove();}});
}
}else{
$("#CB_ajaxContent").load(url,function(){//to do a post change this load method
cb_position();
$("#CB_load").remove();
cb_init("#CB_ajaxContent a.catbox");
$("#CB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
cb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function cb_showIframe(){
$("#CB_load").remove();
$("#CB_window").css({display:"block"});
}
function cb_remove() {
$("#CB_imageOff").off("click");
$("#CB_overlay").off("click");
$("#CB_closeWindowButton").off("click");
$("#CB_window").fadeOut("fast",function(){$('#CB_window,#CB_overlay,#CB_HideSelect').remove();});
$("#CB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
return false;
}
function cb_position() {
$("#CB_window").css({marginLeft: '-' + parseInt((CB_WIDTH / 2),10) + 'px', width: CB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6
$("#CB_window").css({marginTop: '-' + parseInt((CB_HEIGHT / 2),10) + 'px'});
}
}
function cb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function cb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
//TOG
function addItemToSavedItems(formId){
$("#saving").show();
var path = "/user/add_item_to_saveditems_async.cmd";
$.get(
path,
$(formId).formSerialize(),
function(data) {
try{
var successMessage = $(".save_item_success",data);
if (successMessage != null ) {
$('#saveditem_message').css({ "display": "block" });
$('#itemnotsaved_link').css({ "display": "none" });
var origSaveItemsStr = $("#savedItemsNumber").html();
var origSaveItemsNum = parseInt(origSaveItemsStr);
var saveItemNum = origSaveItemsNum +1;
$("#savedItemsNumber").html(saveItemNum);
}
$("#saving").hide();
}catch(err){
$("#saving").hide();
}
}
);
}
//TOG
function addToSavedItems(pVarId, pId, pSubCatId, pCatId, pQty, source, pIncludedProductVariantId){
$("#saving").show();
var path = "/user/add_item_to_saveditems_async.cmd";
$.get(
path,
{ productVariantId: pVarId, productId: pId, categoryId: pSubCatId, parentCategoryId: pCatId, quantity: pQty, includedProductVariantId: $.param(pIncludedProductVariantId), time: (new Date().getTime()) },
function(data) {
try{
var successMessage = $(".save_item_success",data);
if (successMessage != null ) {
$('#saveditem_message').css({ "display": "block" });
$('#itemnotsaved_link').css({ "display": "none" });
var origSaveItemsStr = $("#savedItemsNumber").html();
var origSaveItemsNum = parseInt(origSaveItemsStr);
var saveItemNum = origSaveItemsNum +1;
$("#savedItemsNumber").html(saveItemNum);
}
$("#saving").hide();
}catch(err){
$("#saving").hide();
}
}
);
}
//TOG
function addToSavedItems(pVarId, pId, pSubCatId, pCatId, pQty, source, pIncludedProductVariantId){
$("#saving").show();
var path = "/user/add_item_to_saveditems_async.cmd";
$.get(
path,
{ productVariantId: pVarId, productId: pId, categoryId: pSubCatId, parentCategoryId: pCatId, quantity: pQty, time: (new Date().getTime()) },
function(data) {
try{
var successMessage = $(".save_item_success",data);
if (successMessage != null ) {
$('#saveditem_message').css({ "display": "block" });
$('#itemnotsaved_link').css({ "display": "none" });
var origSaveItemsStr = $("#savedItemsNumber").html();
var origSaveItemsNum = parseInt(origSaveItemsStr);
var saveItemNum = origSaveItemsNum +1;
$("#savedItemsNumber").html(saveItemNum);
}
$("#saving").hide();
}catch(err){
$("#saving").hide();
}
}
);
}
function injectProcessing(el,cssDisplay,state,classIt) {
if (state == true) {
$(el).css("display","none");
$("
Processing...").insertAfter($(el));
} else {
$(el).next().remove();
$(el).css("display",cssDisplay);
}
}
/** Frame source should be the location to load in the IFrame once it is made visible */
function zoomLinkClicked(frameSrc){
$("#zoomPopup_loading_preview").html('
')
$("#zoomPopup_loading_preview").show();
// Force the IFRAME to reload itself. This is required to fix
// a bug with how FireFox 1.5 and 2.0 handle page initialization
// for a hidden IFRAME.
var zoomFrame = top.document.getElementById("catZoomFrame");
if (zoomFrame.attachEvent){
zoomFrame.attachEvent("onload", function(){
$("#zoomPopup_loading_preview").hide();
$("#catZoomPopup").show();
});
} else {
zoomFrame.onload = function(){
$("#zoomPopup_loading_preview").hide();
$("#catZoomPopup").show();
};
}
zoomFrame.src = frameSrc;
}
function closeZoomWindow(){
$("#catZoomPopup").hide();
}
/** */
var emailPopupLoaded = false;
function emailLinkClicked(frameSrc){
if(emailPopupLoaded == false)
$("#emailSignUpContent").load('email_signup_popup.jsp',
function(data){$("#emailSignUpPopUp").show(); emailPopupLoaded = true;})
else
$("#emailSignUpPopUp").show();
}
function closeZoomWindow(){
$("#catZoomPopup").hide();
}
// correctly handle PNG transparency in Win IE 5.5 & 6.
function correctPNG()
{
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (version < 7) && (document.body.filters))
{
for(var i=0; i
"
img.outerHTML = strNewHTML
i = i-1
}
}
}
};
$(correctPNG);
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-11 23:14:51 -0500 (Wed, 11 Jul 2007) $
* $Rev: 2323 $
*
* Version 2.1
*/
(function($){
/**
* The bgiframe is chainable and applies the iframe hack to get
* around zIndex issues in IE6.
* @cat Plugins/bgiframe
* @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
*/
$.fn.bgIframe = $.fn.bgiframe = function(s) {
return this;
};
})(jQuery);
/* This function makes two elements the same height, whichever of the two is greater. */
/* it has two id's as parameters */
function setEqualHeight(firstElem, secondElem){
var firstHeight = $(firstElem).css('height');
var secondHeight = $(secondElem).css('height');
if (firstHeight < secondHeight){
$(firstElem).css('height', secondHeight)
}
else {
$(secondElem).css('height', firstHeight);
}
}
/* This function sets the left nav height in the */
function setLeftNavHeight(){
newHeight= $('.bottom-page').get(0).offsetTop - $('.left-nav-box').get(0).offsetTop;
$('.left-nav-box').css('height',newHeight);
}
/* -- 2012/01/18, by xhji -- */
/* This function set the user-wrapper div's height in my account pages */
function setUserWrapDivHeight() {
var userWrapperHeight = $('#user-wrapper').height();
var defaultUserWrapperHeight = 400;
if (userWrapperHeight < defaultUserWrapperHeight) {
$('#user-wrapper').css('height', defaultUserWrapperHeight);
}
}
/* ----------------------------------------- */