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('' + j1(obj123).html() + '').prependTo(j1('table tr#header_ls')); j1('.headbarsub').css('color', '#113F6D'); if (window.location.href.search("page=oem") > -1 ){ //&& window.location.href.search(home_path) == -1) || j1('#menu').css('display') == 'none') { j1('#menu').hide(); j1('#oem_menu').show(); j1('li#oem_only').hide(); j1('#topleft_nav #personal a').attr("class", ""); j1('#topleft_nav #oem a').addClass("current"); j1('a').each(function (i, v) { if(j1(v).parent().attr('id') != "personal" && j1(v).parent().attr('class') != "logo"){ var url = j1(v).attr("href"); if (url != undefined) { if ((url.search('#') < 0 || url.search('page=oem') < 0) || url.search('/') < 0) if((url.search('javascript:') && url.search('mailto:')) < 0 && url.search('page=oem') < 0) { if (url.search("\\?") == -1) { j1(v).attr("href", url + '?page=oem'); } else { j1(v).attr("href", url + '&page=oem'); } } } } } ); if(j1('.productdetails_img1').length > 0){ j1("#oem_menu li a.products").parent().attr('class', 'current'); } }else{ //hide the oem bottom links when not in oem pages. j1('.oem_bottomcase').hide(); } if(j1('#menu').css('display') == 'none'){ j1('.product_featuredcase_img').css('background-position','0 -68px'); j1('.productdetailsBG').css('background-position','0 -68px'); j1('.product_featuredcase_img').addClass('product_featuredcase_bg'); j1('.productdetailsBG').addClass('product_featuredcase_bg'); }else{ if (window.location.href.search(homepage_url) > -1) { j1('li#oem_only').show(); j1('a').each(function (i, v) { var url = j1(v).attr("href"); if (url != undefined) { if (url.search('javascript:') == -1 || url.search('mailto:') == -1) { if (url.search("page=oem") > -1 && j1(v).parent('li').attr('id') != "oem") { j1(v).attr("href", url.replace('page=oem', '')); } } } }); j1('#menu').show(); j1('#oem_menu').hide(); //j1('#topleft_nav #personal a').attr("class","current"); //j1('#topleft_nav #oem a').attr("class",""); } } j1('.oem_slideimg2').hover(function () { pause_random(); }, function () { resume_random(); }); j1('#oem_sprite1 li').hover(function () { j1(this).css('cursor', 'pointer'); var idname = j1(this).attr('class'); productnum = idname.replace('sprite', ''); productnum = productnum.replace('-inactive', ''); productnum = productnum.replace('-active', ''); currentItem = parseInt(productnum); if (parseInt(productnum) < 5) { 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('#oem_product_detail1').css('display', 'none'); j1('#oem_product_detail2').css('display', 'none'); j1('#oem_product_detail3').css('display', 'none'); j1('#oem_product_detail4').css('display', 'none'); j1('#sprite' + productnum + '-list').attr("class", 'sprite' + productnum + '-active'); j1('#oem_product_detail' + pre_rand).hide(); j1('#oem_product_detail' + productnum).show(); pause_random(); } }, function () { resume_random(); }); setInterval(function () { random_products(); }, duration); j1('.dept').each(function (itr, obj) { j1(obj).find('.positions div a').each(function (itr1, obj1) { j1(this).click(function () { j1(obj).find('.positions .table:eq(' + itr1 + ')').toggle(100); return false; }); }); }); j1('.dept .positions .table table tr').each(function (itr, obj) { if (j1(obj).find('td:first').attr('colspan') == '2') { } else { j1(obj).find('td:first').css('width', '30%'); } }); j1('.name a').each(function (itr, obj) { j1(obj).click(function () { j1('.positions:eq(' + itr + ')').toggle(100); return false; }); }); j1('.name a').click(function() { j1(this).parent().toggleClass('highlight'); j1(this).toggleClass('faq_selected'); //this will eliminate bug on a:focus, a:active in css j1(this).toggle( function(){ j1(this).css('color', '#3E91C6'); },function(){ j1(this).css('color', '#F69319'); } ); }); if (j1('.logo-840 .product_bottomtext1').length > 0) { if (j1('.logo-840 .product_bottomtext1').html() == "DVD & Blu-ray Burners") { j1('.logo-840 .product_bottomtext1').html("DVD &
Blu-ray Burners") } } if (j1('.addthis_button').length > 0) { j1('.addthis_button').each(function (i, v) { j1(v).attr('href', 'http://www.addthis.com/bookmark.php?v=250&username=digistor') }); } if (j1('#handle_loginMainPortlet').length > 0 || j1('#body_checkout').length > 0 || j1('#handle_portlet_-519').length > 0) { var parentDOM = j1('#content').parent(); var html = j1(parentDOM).contents(); j1(parentDOM).children().remove(); j1(parentDOM).append('
'); j1('#login_curve_gradient').html(html); //j1('#login_curve_gradient td').attr('valign','middle'); j1('.labelSpanEdit').each(function(i, elem){ j1(elem).parent('td').attr('width', '150px'); }); } if (j1('#body_account #main_form').length > 0 && (j1('#body_account #main_form input[value="pwdreset"]').length > 0 || j1('#body_account #main_form input[value="emailpwd"]').length > 0)) { var parentDOM = j1('#body_account #main_form').parent(); var html = j1(parentDOM).contents(); j1('#body_account #main_form').remove(); j1(parentDOM).append('
'); j1('#login_curve_gradient').html(html); //j1('#login_curve_gradient td').attr('valign','middle'); j1('.labelSpanEdit').each(function(i, elem){ j1(elem).parent('td').attr('width', '150px'); }); } if(j1('#carttable').length > 0){ j1('#carttable tr#carttableheader td').removeAttr('width'); } if(j1('#body_checkout').length > 0){ j1('#body_checkout #content tr.portletHandle td:first').attr('id','content_right_td'); j1('#body_checkout #content tr.portletHandle:first').prepend('
'); if(window.location.href.search("category.billing") >= 0){ j1('#option1').attr('class','current'); } if(window.location.href.search("category.shipping") >= 0){ j1('#option2').attr('class','current'); } if(window.location.href.search("category.paymeth") >= 0){ j1('#option3').attr('class','current'); } if(window.location.href.search("category.confirm") >= 0){ j1('#option4').attr('class','current'); } j1("#body_checkout #content_right_td #main_form").show(); //append the verisign logo hacks because the tag checkout page is not appending the inserting the added tag properly j1('.checkoutprogresstext').parent('tr').parent('tbody').append('Verisign Secure

'); } if(j1('#tllistcol_-47_-519_1').length > 0){ j1("#tllistcol_-47_-519_1").parent('tr').prepend(j1('#leftdefault')); j1("#leftdefault").show(); j1('td[bgcolor="#000000"]').parent().remove(); j1('td[bgcolor="#939393"]').parent().remove(); j1('td[bgcolor="#D0D0D0"]').parent().remove(); j1('#leftdefault').show(); //j1('#tllistcol_-47_-519_1').prepend('
'); } if(j1('#zip_fs_lbl').length > 0){ j1('#zip_fs_lbl').prepend(''); } 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; }*/ });