Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var url = document.referrer;
- var dec= decodeURIComponent(url.replace(/\+/g, '%20'));
- //var url = document.referrer;
- var hash = url.substring(url.indexOf('?')+1);
- console.log(hash + " ready!");
- if(hash=="ChargePort")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="ChargePort"]').attr('checked',true);
- $(".top").not(".chargeport").hide();
- $(".chargeport").show();
- }
- if (hash=="ChargeTime")
- {
- $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
- $(".box").not(".clocks").hide();
- $(".clocks").show();
- $('input:radio[name="qr2_product"][value="ChargeTime"]').attr('checked',true);
- $(".top").not(".chargetime").hide();
- $(".chargetime").show();
- }
- if (hash=="PowerHub with USB")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="PowerHub with USB"]').attr('checked',true);
- $(".top").not(".powerhub_usb").hide();
- $(".powerhub_usb").show();
- }
- if (hash=="PowerHub")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="PowerHub"]').attr('checked',true);
- $(".top").not(".powerhub").hide();
- $(".powerhub").show();
- }
- if (hash=="Universal Charging Station")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="Universal Charging Station"]').attr('checked',true);
- $(".top").not(".universalchargingstation").hide();
- $(".universalchargingstation").show();
- }
- if (hash=="DiscGo")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="DiscGo"]').attr('checked',true);
- $(".top").not(".discgo").hide();
- $(".discgo").show();
- }
- if (hash=="GIZGO Tower")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="GIZGO Tower"]').attr('checked',true);
- $(".top").not(".gizgotower").hide();
- $(".gizgotower").show();
- }
- if (hash=="GIZGO Charger")
- {
- $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
- $(".box").not(".power").hide();
- $(".power").show();
- $('input:radio[name="qr2_product"][value="GIZGO Charger"]').attr('checked',true);
- $(".top").not(".gizgocharger").hide();
- $(".gizgocharger").show();
- }
- if (hash=="MediaHub Mini")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub Mini"]').attr('checked',true);
- $(".top").not(".mediahubmini").hide();
- $(".mediahubmini").show();
- }
- if (hash=="MediaHub Mini Desktop")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub Mini Desktop"]').attr('checked',true);
- $(".top").not(".mediahubmini_desktop").hide();
- $(".mediahubmini_desktop").show();
- }
- if (hash=="MediaHub Mini Extender")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub Mini Extender"]').attr('checked',true);
- $(".top").not(".mediahubmini_extender").hide();
- $(".mediahubmini_extender").show();
- }
- if (hash=="MediaHub Mini Clip Range")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub Mini Clip Range"]').attr('checked',true);
- $(".top").not(".mediahub_minicliprange").hide();
- $(".mediahub_minicliprange").show();
- }
- if (hash=="MediaHub TLiX")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub TLiX"]').attr('checked',true);
- $(".top").not(".mediahub_tlix").hide();
- $(".mediahub_tlix").show();
- }
- if (hash=="MediaHub SL+")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub SL+"]').attr('checked',true);
- $(".top").not(".mediahub_sl_plus").hide();
- $(".mediahub_sl_plus").show();
- }
- if (hash=="MediaHub SL+ Desktop")
- {
- $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
- $(".box").not(".mediahubs").hide();
- $(".mediahubs").show();
- $('input:radio[name="qr2_product"][value="MediaHub SL+ Desktop"]').attr('checked',true);
- $(".top").not(".mediahub_sl_plus_desktop").hide();
- $(".mediahub_sl_plus_desktop").show();
- }
- if (hash=="JBL Horizon Hotel")
- {
- $('input:radio[name="colorRadio"][value="clocks"]').prop('checked',true);
- $(".box").not(".clocks").hide();
- $(".clocks").show();
- $('input:radio[name="qr2_product"][value="JBL Horizon Hotel"]').prop('checked',true);
- $(".top").not(".jbl_horizon").hide();
- $(".jbl_horizon").show();
- }
- if (hash=="iHome HBN21")
- {
- $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
- $(".box").not(".clocks").hide();
- $(".clocks").show();
- $('input:radio[name="qr2_product"][value="iHome HBN21"]').attr('checked',true);
- $(".top").not(".ihome_hbn21").hide();
- $(".ihome_hbn21").show();
- }
- if (hash=="iHome HDL39")
- {
- $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
- $(".box").not(".clocks").hide();
- $(".clocks").show();
- $('input:radio[name="qr2_product"][value="iHome HDL39"]').attr('checked',true);
- $(".top").not(".ihome_hdl39").hide();
- $(".ihome_hdl39").show();
- }
- if (hash=="iHome HDL50")
- {
- $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
- $(".box").not(".clocks").hide();
- $(".clocks").show();
- $('input:radio[name="qr2_product"][value="iHome HDL50"]').attr('checked',true);
- $(".top").not(".ihome_hdl50").hide();
- $(".ihome_hdl50").show();
- }
- if (hash=="Sound Spot")
- {
- $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
- $(".box").not(".wirelessaudio").hide();
- $(".wirelessaudio").show();
- $('input:radio[name="qr2_product"][value="Sound Spot"]').attr('checked',true);
- $(".top").not(".sound_spot").hide();
- $(".sound_spot").show();
- }
- if (hash=="Sound Kick")
- {
- $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
- $(".box").not(".wirelessaudio").hide();
- $(".wirelessaudio").show();
- $('input:radio[name="qr2_product"][value="Sound Kick"]').attr('checked',true);
- $(".top").not(".sound_kick").hide();
- $(".sound_kick").show();
- }
- if (hash=="Sound Rise Hotel")
- {
- $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
- $(".box").not(".wirelessaudio").hide();
- $(".wirelessaudio").show();
- $('input:radio[name="qr2_product"][value="Sound Rise Hotel"]').attr('checked',true);
- $(".top").not(".sound_risehotel").hide();
- $(".sound_risehotel").show();
- }
- if (hash=="Pull-Through Pro")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="Pull-Through Pro"]').attr('checked',true);
- $(".top").not(".pull_throughpro").hide();
- $(".pull_throughpro").show();
- }
- if (hash=="DeskSpool Pro")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="DeskSpool Pro"]').attr('checked',true);
- $(".top").not(".deskspool_pro").hide();
- $(".deskspool_pro").show();
- }
- if (hash=="Pull-Through Classic")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="Pull-Through Classic"]').attr('checked',true);
- $(".top").not(".pull_throughclassic").hide();
- $(".pull_throughclassic").show();
- }
- if (hash=="DeskSpool")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="DeskSpool"]').attr('checked',true);
- $(".top").not(".deskspool").hide();
- $(".deskspool").show();
- }
- if (hash=="Mini Access Point")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="Mini Access Point"]').attr('checked',true);
- $(".top").not(".mini_access").hide();
- $(".mini_access").show();
- }
- if (hash=="ConferenceHub USB")
- {
- $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
- $(".box").not(".wiredinternet").hide();
- $(".wiredinternet").show();
- $('input:radio[name="qr2_product"][value="ConferenceHub USB"]').attr('checked',true);
- $(".top").not(".conferencehub_usb").hide();
- $(".conferencehub_usb").show();
- }
- if (hash=="DeskPointPro")
- {
- $('input:radio[name="colorRadio"][value="wirelessinternet"]').attr('checked',true);
- $(".box").not(".wirelessinternet").hide();
- $(".wirelessinternet").show();
- $('input:radio[name="qr2_product"][value="DeskPointPro"]').attr('checked',true);
- $(".top").not(".DeskPointPro").hide();
- $(".DeskPointPro").show();
- }
- if (hash=="DeskPoint Pro Under Desk")
- {
- $('input:radio[name="colorRadio"][value="wirelessinternet"]').attr('checked',true);
- $(".box").not(".wirelessinternet").hide();
- $(".wirelessinternet").show();
- $('input:radio[name="qr2_product"][value="DeskPoint Pro Under Desk"]').attr('checked',true);
- $(".top").not(".DeskPoint_Pro_Under_Desk").hide();
- $(".DeskPoint_Pro_Under_Desk").show();
- }
- if (hash=="ZVOX 350")
- {
- $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
- $(".box").not(".tvaudio").hide();
- $(".tvaudio").show();
- $('input:radio[name="qr2_product"][value="ZVOX 350"]').attr('checked',true);
- $(".top").not(".zvox_350").hide();
- $(".zvox_350").show();
- }
- if (hash=="ZVOX 450")
- {
- $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
- $(".box").not(".tvaudio").hide();
- $(".tvaudio").show();
- $('input:radio[name="qr2_product"][value="ZVOX 450"]').attr('checked',true);
- $(".top").not(".zvox_450").hide();
- $(".zvox_450").show();
- }
- if (hash=="ZVOX 570")
- {
- $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
- $(".box").not(".tvaudio").hide();
- $(".tvaudio").show();
- $('input:radio[name="qr2_product"][value="ZVOX 570"]').attr('checked',true);
- $(".top").not(".zvox_570").hide();
- $(".zvox_570").show();
- }
- if (hash=="ZVOX 670")
- {
- $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
- $(".box").not(".tvaudio").hide();
- $(".tvaudio").show();
- $('input:radio[name="qr2_product"][value="ZVOX 670"]').attr('checked',true);
- $(".top").not(".zvox_670").hide();
- $(".zvox_670").show();
- }
- if (hash=="ZVOX 770")
- {
- $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
- $(".box").not(".tvaudio").hide();
- $(".tvaudio").show();
- $('input:radio[name="qr2_product"][value="ZVOX 770"]').attr('checked',true);
- $(".top").not(".zvox_770").hide();
- $(".zvox_770").show();
- }
- if (hash=="ConnectKit-1")
- {
- $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
- $(".box").not(".retails").hide();
- $(".retails").show();
- $('input:radio[name="qr2_product"][value="ConnectKit-1"]').attr('checked',true);
- $(".top").not(".connectkit_1").hide();
- $(".connectkit_1").show();
- }
- if (hash=="ConnectKit-3")
- {
- $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
- $(".box").not(".retails").hide();
- $(".retails").show();
- $('input:radio[name="qr2_product"][value="ConnectKit-3"]').attr('checked',true);
- $(".top").not(".connectkit_3").hide();
- $(".connectkit_3").show();
- }
- if (hash=="World Power Adapter")
- {
- $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
- $(".box").not(".retails").hide();
- $(".retails").show();
- $('input:radio[name="qr2_product"][value="World Power Adapter"]').attr('checked',true);
- $(".top").not(".world_power").hide();
- $(".world_power").show();
- }
- if (hash=="Individual Power Adaptors")
- {
- $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
- $(".box").not(".retails").hide();
- $(".retails").show();
- $('input:radio[name="qr2_product"][value="Individual Power Adaptors"]').attr('checked',true);
- $(".top").not(".individaul_power").hide();
- $(".individaul_power").show();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement