var j1 = jQuery.noConflict(); var duration = 5000; //5 secs var randomnumber = 0; var currentItem = 1; var pre_rand = 1; var pause = 0; var productnum = 0; var home_path = ""; function random_products() { if (pause == 0) { // Sequence Number // Emerson Barrion j1('#oem_product_detail' + currentItem).fadeOut('fast'); randomnumber = randomnumber + 1; if (randomnumber > 4) { randomnumber = 1; } j1('#sprite1-list').attr("class", 'sprite1-inactive'); j1('#sprite2-list').attr("class", 'sprite2-inactive'); j1('#sprite3-list').attr("class", 'sprite3-inactive'); j1('#sprite4-list').attr("class", 'sprite4-inactive'); j1('#sprite' + pre_rand + '-list').attr("class", 'sprite' + pre_rand + '-inactive'); j1('#sprite' + randomnumber + '-list').attr("class", 'sprite' + randomnumber + '-active'); j1('#oem_product_detail' + pre_rand).fadeOut('fast', function () { j1('#oem_product_detail' + randomnumber).fadeIn('fast', function () {}); }); if (j1('a.share').length > 0) { j1('a.share').css('z-index', '1'); } if (j1('#at15s').length > 0) { j1('#at15s').css('z-index', '10000000000'); } pre_rand = randomnumber; } } function pause_random() { pause = 1; } function resume_random() { pause = 0; } function cartButtonEvent(val) { j1('#form' + val).submit(); } function learnButtonEvent(val) { setTimeout(function () { document.location.href = j1('#linkfor-' + val).attr('href'); }, 200); } function shareButtonEvent(val) { //set share button position var butleft = parseInt(j1('#flashcontent').offset().left); var buttop = parseInt(j1('#flashcontent').offset().top); var scrollTop = parseInt(j1('#flashcontent').scrollTop()); var scrollLeft = parseInt(j1('#flashcontent').scrollLeft()); j1('.at300m').css('left', (butleft + 70) + 'px'); j1('.at300m').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('left', (butleft + 70) + 'px'); if(navigator.appName == "Microsoft Internet Explorer") { /* j1('.at300m').css('left', (butleft + 80) + 'px'); j1('.at300m').css('top', (buttop - 212 - scrollTop ) + 'px'); j1('#at20mc').css('top', (buttop - 212 - scrollTop) + 'px'); j1('#at20mc').css('left', (butleft + 80) + 'px');*/ } j1("a.addthis_button_compact").css('visibility', 'visible'); j1("a.addthis_button_compact").click(); } function hideShareButton() { //j1("a.addthis_button_compact").css('visibility', 'hidden'); } function showShareButton() { /*var butleft = j1('#flashcontent').offset().left; var buttop = j1('#flashcontent').offset().top; j1('.at300m').css('left', (butleft + 70) + 'px'); j1('.at300m').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('left', (butleft + 70) + 'px'); j1("a.addthis_button_compact").css('visibility', 'visible'); j1("a.addthis_button_compact").hover();*/ } j1('document').ready(function () { if (j1('#flashcontent').length > 0) { var butleft = j1('#flashcontent').offset().left; var buttop = j1('#flashcontent').offset().top; j1('.at300m').css('left', (butleft + 70) + 'px'); j1('.at300m').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('top', (buttop + 262) + 'px'); j1('#at20mc').css('left', (butleft + 70) + 'px'); //hide the empty bottom table j1('#linkfor-577').next('table:first').hide(); //for IE j1('.home_productBG').next('table:first').hide(); } if (j1('a.share').length > 0) { j1('a.share').live('hover', function () { j1(this).css('z-index', '1'); j1('#at15s').css('z-index', '10000000000'); }); } if (limit1 >= 3457 && limit1 <= 3490) { j1('#menu').hide(); j1('#breadcrumb').hide(); } else { j1('#oem_menu').hide(); } /*j1("#righttop_nav li a.smalltext").each(function (i, val) { if (j1(val).html() == "Register") { j1(val).remove(); } j1(val).css('display', 'inline'); });*/ var obj123 = j1('#crumb_home_link').clone(); j1('#crumb_home_link').remove(); j1('

');
}
if (j1('#handle_itemMainPortlet').length > 0) {
j1('.productdetails_float2 a').each(function (i, el) {
if (j1(el).children('img').attr('src') == '/site/images/blanktn.gif') {
j1(el).remove();
}
});
}
j1("#searchbox").keyup(function(event){
if(event.keyCode == 13){
j1("#searchportlet").submit();
}
});
/* Menu Activation for OEM */
/* actives Products menu */
/* Commented for debuggig --
if((window.location.href.search("menu=products") >=0 || window.location.href.search("category.3631") >=0 || window.location.href.search("OEM-Products") >= 0) &&
(window.location.href.search("it.A") > 0 && window.location.href.search("page=oem") >= 0)){*/
if((window.location.href.search("menu=products") >=0 || window.location.href.search("OEM-Products") >= 0)){
j1("#oem_menu li a.products").parent().attr('class', 'current');
}
/* actives Services menu */
if(window.location.href.search("id.33") >=0 || window.location.href.search("id.27") >=0 ||
window.location.href.search("id.23") >=0 || window.location.href.search("id.24") >=0){
j1("#oem_menu li a.services").parent().attr('class', 'current');
}
/* actives Establish an Account menu */
if(window.location.href.search("id.25") >=0){
j1("#oem_menu li a.account").parent().attr('class', 'current');
}
/* actives Establish an Contact menu */
if(window.location.href.search("id.22") >=0){
j1("#oem_menu li a.contact").parent().attr('class', 'current');
}
/*My Account Wrapper Hacks*/
j1('#div__header').next('table').attr('width', '952');
j1('#div__header').next('table').css('margin', '0 auto 0 auto');
j1('#div__header').next('table').next('table').attr('width', '952');
j1('.rptfindboxrow').find('td:first').remove();
/*Fix category table links when clicked*/
j1('a.category_item_list_table').each(function(i, el){
j1(el).attr('onclick', 'location.href='+j1(el).attr('href')+';return false;');
j1(el).children('table.product_bottomcase').click(function(){
location.href = j1(el).attr('href');
});
});
//IE hack for reloading the page using f5
/*document.onkeydown = function(e) //attach to key down event to detect the F5 key
{
if (!e) //Firefox and Safari gets argument directly.
{
e = window.event;
}
var key = e.keyCode ? e.keyCode : e.which;
try //try
{
if (key == 116) //F5 Key detected
{
e.preventDefault();
var refreshURL = window.location.href;
window.location.href = refreshURL;
}
}
catch (ex) { }
return false;
}*/
});