Advertisement
Guest User

Untitled

a guest
Jan 4th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.29 KB | None | 0 0
  1. $(document).ready(function() {
  2. var url = document.referrer;
  3. var dec= decodeURIComponent(url.replace(/\+/g, '%20'));
  4. //var url = document.referrer;
  5. var hash = url.substring(url.indexOf('?')+1);
  6.  
  7. console.log(hash + " ready!");
  8.  
  9.  
  10. if(hash=="ChargePort")
  11. {
  12. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  13. $(".box").not(".power").hide();
  14. $(".power").show();
  15. $('input:radio[name="qr2_product"][value="ChargePort"]').attr('checked',true);
  16. $(".top").not(".chargeport").hide();
  17. $(".chargeport").show();
  18.  
  19. }
  20.  
  21. if (hash=="ChargeTime")
  22. {
  23.  
  24. $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
  25. $(".box").not(".clocks").hide();
  26. $(".clocks").show();
  27. $('input:radio[name="qr2_product"][value="ChargeTime"]').attr('checked',true);
  28. $(".top").not(".chargetime").hide();
  29. $(".chargetime").show();
  30.  
  31. }
  32.  
  33.  
  34. if (hash=="PowerHub with USB")
  35. {
  36.  
  37. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  38. $(".box").not(".power").hide();
  39. $(".power").show();
  40. $('input:radio[name="qr2_product"][value="PowerHub with USB"]').attr('checked',true);
  41. $(".top").not(".powerhub_usb").hide();
  42. $(".powerhub_usb").show();
  43.  
  44. }
  45.  
  46. if (hash=="PowerHub")
  47. {
  48.  
  49. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  50. $(".box").not(".power").hide();
  51. $(".power").show();
  52. $('input:radio[name="qr2_product"][value="PowerHub"]').attr('checked',true);
  53. $(".top").not(".powerhub").hide();
  54. $(".powerhub").show();
  55.  
  56. }
  57.  
  58.  
  59. if (hash=="Universal Charging Station")
  60. {
  61.  
  62. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  63. $(".box").not(".power").hide();
  64. $(".power").show();
  65. $('input:radio[name="qr2_product"][value="Universal Charging Station"]').attr('checked',true);
  66. $(".top").not(".universalchargingstation").hide();
  67. $(".universalchargingstation").show();
  68.  
  69. }
  70.  
  71. if (hash=="DiscGo")
  72. {
  73.  
  74. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  75. $(".box").not(".power").hide();
  76. $(".power").show();
  77. $('input:radio[name="qr2_product"][value="DiscGo"]').attr('checked',true);
  78. $(".top").not(".discgo").hide();
  79. $(".discgo").show();
  80.  
  81. }
  82.  
  83. if (hash=="GIZGO Tower")
  84. {
  85.  
  86. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  87. $(".box").not(".power").hide();
  88. $(".power").show();
  89. $('input:radio[name="qr2_product"][value="GIZGO Tower"]').attr('checked',true);
  90. $(".top").not(".gizgotower").hide();
  91. $(".gizgotower").show();
  92.  
  93. }
  94.  
  95. if (hash=="GIZGO Charger")
  96. {
  97.  
  98. $('input:radio[name="colorRadio"][value="power"]').attr('checked',true);
  99. $(".box").not(".power").hide();
  100. $(".power").show();
  101. $('input:radio[name="qr2_product"][value="GIZGO Charger"]').attr('checked',true);
  102. $(".top").not(".gizgocharger").hide();
  103. $(".gizgocharger").show();
  104.  
  105. }
  106.  
  107. if (hash=="MediaHub Mini")
  108. {
  109.  
  110. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  111. $(".box").not(".mediahubs").hide();
  112. $(".mediahubs").show();
  113. $('input:radio[name="qr2_product"][value="MediaHub Mini"]').attr('checked',true);
  114. $(".top").not(".mediahubmini").hide();
  115. $(".mediahubmini").show();
  116.  
  117. }
  118.  
  119. if (hash=="MediaHub Mini Desktop")
  120. {
  121. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  122. $(".box").not(".mediahubs").hide();
  123. $(".mediahubs").show();
  124. $('input:radio[name="qr2_product"][value="MediaHub Mini Desktop"]').attr('checked',true);
  125. $(".top").not(".mediahubmini_desktop").hide();
  126. $(".mediahubmini_desktop").show();
  127.  
  128. }
  129.  
  130. if (hash=="MediaHub Mini Extender")
  131. {
  132. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  133. $(".box").not(".mediahubs").hide();
  134. $(".mediahubs").show();
  135. $('input:radio[name="qr2_product"][value="MediaHub Mini Extender"]').attr('checked',true);
  136. $(".top").not(".mediahubmini_extender").hide();
  137. $(".mediahubmini_extender").show();
  138.  
  139. }
  140.  
  141. if (hash=="MediaHub Mini Clip Range")
  142. {
  143. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  144. $(".box").not(".mediahubs").hide();
  145. $(".mediahubs").show();
  146. $('input:radio[name="qr2_product"][value="MediaHub Mini Clip Range"]').attr('checked',true);
  147. $(".top").not(".mediahub_minicliprange").hide();
  148. $(".mediahub_minicliprange").show();
  149.  
  150. }
  151.  
  152. if (hash=="MediaHub TLiX")
  153. {
  154. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  155. $(".box").not(".mediahubs").hide();
  156. $(".mediahubs").show();
  157. $('input:radio[name="qr2_product"][value="MediaHub TLiX"]').attr('checked',true);
  158. $(".top").not(".mediahub_tlix").hide();
  159. $(".mediahub_tlix").show();
  160.  
  161. }
  162.  
  163. if (hash=="MediaHub SL+")
  164. {
  165. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  166. $(".box").not(".mediahubs").hide();
  167. $(".mediahubs").show();
  168. $('input:radio[name="qr2_product"][value="MediaHub SL+"]').attr('checked',true);
  169. $(".top").not(".mediahub_sl_plus").hide();
  170. $(".mediahub_sl_plus").show();
  171.  
  172. }
  173.  
  174. if (hash=="MediaHub SL+ Desktop")
  175. {
  176. $('input:radio[name="colorRadio"][value="mediahubs"]').attr('checked',true);
  177. $(".box").not(".mediahubs").hide();
  178. $(".mediahubs").show();
  179. $('input:radio[name="qr2_product"][value="MediaHub SL+ Desktop"]').attr('checked',true);
  180. $(".top").not(".mediahub_sl_plus_desktop").hide();
  181. $(".mediahub_sl_plus_desktop").show();
  182.  
  183. }
  184.  
  185. if (hash=="JBL Horizon Hotel")
  186. {
  187. $('input:radio[name="colorRadio"][value="clocks"]').prop('checked',true);
  188. $(".box").not(".clocks").hide();
  189. $(".clocks").show();
  190. $('input:radio[name="qr2_product"][value="JBL Horizon Hotel"]').prop('checked',true);
  191. $(".top").not(".jbl_horizon").hide();
  192. $(".jbl_horizon").show();
  193.  
  194. }
  195.  
  196. if (hash=="iHome HBN21")
  197. {
  198. $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
  199. $(".box").not(".clocks").hide();
  200. $(".clocks").show();
  201. $('input:radio[name="qr2_product"][value="iHome HBN21"]').attr('checked',true);
  202. $(".top").not(".ihome_hbn21").hide();
  203. $(".ihome_hbn21").show();
  204.  
  205. }
  206.  
  207. if (hash=="iHome HDL39")
  208. {
  209. $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
  210. $(".box").not(".clocks").hide();
  211. $(".clocks").show();
  212. $('input:radio[name="qr2_product"][value="iHome HDL39"]').attr('checked',true);
  213. $(".top").not(".ihome_hdl39").hide();
  214. $(".ihome_hdl39").show();
  215.  
  216. }
  217.  
  218. if (hash=="iHome HDL50")
  219. {
  220. $('input:radio[name="colorRadio"][value="clocks"]').attr('checked',true);
  221. $(".box").not(".clocks").hide();
  222. $(".clocks").show();
  223. $('input:radio[name="qr2_product"][value="iHome HDL50"]').attr('checked',true);
  224. $(".top").not(".ihome_hdl50").hide();
  225. $(".ihome_hdl50").show();
  226.  
  227. }
  228.  
  229. if (hash=="Sound Spot")
  230. {
  231. $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
  232. $(".box").not(".wirelessaudio").hide();
  233. $(".wirelessaudio").show();
  234. $('input:radio[name="qr2_product"][value="Sound Spot"]').attr('checked',true);
  235. $(".top").not(".sound_spot").hide();
  236. $(".sound_spot").show();
  237.  
  238. }
  239.  
  240. if (hash=="Sound Kick")
  241. {
  242. $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
  243. $(".box").not(".wirelessaudio").hide();
  244. $(".wirelessaudio").show();
  245. $('input:radio[name="qr2_product"][value="Sound Kick"]').attr('checked',true);
  246. $(".top").not(".sound_kick").hide();
  247. $(".sound_kick").show();
  248.  
  249. }
  250.  
  251. if (hash=="Sound Rise Hotel")
  252. {
  253. $('input:radio[name="colorRadio"][value="wirelessaudio"]').attr('checked',true);
  254. $(".box").not(".wirelessaudio").hide();
  255. $(".wirelessaudio").show();
  256. $('input:radio[name="qr2_product"][value="Sound Rise Hotel"]').attr('checked',true);
  257. $(".top").not(".sound_risehotel").hide();
  258. $(".sound_risehotel").show();
  259.  
  260. }
  261.  
  262. if (hash=="Pull-Through Pro")
  263. {
  264. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  265. $(".box").not(".wiredinternet").hide();
  266. $(".wiredinternet").show();
  267. $('input:radio[name="qr2_product"][value="Pull-Through Pro"]').attr('checked',true);
  268. $(".top").not(".pull_throughpro").hide();
  269. $(".pull_throughpro").show();
  270.  
  271. }
  272.  
  273. if (hash=="DeskSpool Pro")
  274. {
  275. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  276. $(".box").not(".wiredinternet").hide();
  277. $(".wiredinternet").show();
  278. $('input:radio[name="qr2_product"][value="DeskSpool Pro"]').attr('checked',true);
  279. $(".top").not(".deskspool_pro").hide();
  280. $(".deskspool_pro").show();
  281.  
  282. }
  283.  
  284. if (hash=="Pull-Through Classic")
  285. {
  286. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  287. $(".box").not(".wiredinternet").hide();
  288. $(".wiredinternet").show();
  289. $('input:radio[name="qr2_product"][value="Pull-Through Classic"]').attr('checked',true);
  290. $(".top").not(".pull_throughclassic").hide();
  291. $(".pull_throughclassic").show();
  292.  
  293. }
  294.  
  295. if (hash=="DeskSpool")
  296. {
  297. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  298. $(".box").not(".wiredinternet").hide();
  299. $(".wiredinternet").show();
  300. $('input:radio[name="qr2_product"][value="DeskSpool"]').attr('checked',true);
  301. $(".top").not(".deskspool").hide();
  302. $(".deskspool").show();
  303.  
  304. }
  305.  
  306. if (hash=="Mini Access Point")
  307. {
  308. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  309. $(".box").not(".wiredinternet").hide();
  310. $(".wiredinternet").show();
  311. $('input:radio[name="qr2_product"][value="Mini Access Point"]').attr('checked',true);
  312. $(".top").not(".mini_access").hide();
  313. $(".mini_access").show();
  314.  
  315. }
  316.  
  317. if (hash=="ConferenceHub USB")
  318. {
  319. $('input:radio[name="colorRadio"][value="wiredinternet"]').attr('checked',true);
  320. $(".box").not(".wiredinternet").hide();
  321. $(".wiredinternet").show();
  322. $('input:radio[name="qr2_product"][value="ConferenceHub USB"]').attr('checked',true);
  323. $(".top").not(".conferencehub_usb").hide();
  324. $(".conferencehub_usb").show();
  325.  
  326. }
  327.  
  328. if (hash=="DeskPointPro")
  329. {
  330. $('input:radio[name="colorRadio"][value="wirelessinternet"]').attr('checked',true);
  331. $(".box").not(".wirelessinternet").hide();
  332. $(".wirelessinternet").show();
  333. $('input:radio[name="qr2_product"][value="DeskPointPro"]').attr('checked',true);
  334. $(".top").not(".DeskPointPro").hide();
  335. $(".DeskPointPro").show();
  336.  
  337. }
  338.  
  339. if (hash=="DeskPoint Pro Under Desk")
  340. {
  341. $('input:radio[name="colorRadio"][value="wirelessinternet"]').attr('checked',true);
  342. $(".box").not(".wirelessinternet").hide();
  343. $(".wirelessinternet").show();
  344. $('input:radio[name="qr2_product"][value="DeskPoint Pro Under Desk"]').attr('checked',true);
  345. $(".top").not(".DeskPoint_Pro_Under_Desk").hide();
  346. $(".DeskPoint_Pro_Under_Desk").show();
  347.  
  348. }
  349.  
  350. if (hash=="ZVOX 350")
  351. {
  352. $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
  353. $(".box").not(".tvaudio").hide();
  354. $(".tvaudio").show();
  355. $('input:radio[name="qr2_product"][value="ZVOX 350"]').attr('checked',true);
  356. $(".top").not(".zvox_350").hide();
  357. $(".zvox_350").show();
  358.  
  359. }
  360.  
  361. if (hash=="ZVOX 450")
  362. {
  363. $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
  364. $(".box").not(".tvaudio").hide();
  365. $(".tvaudio").show();
  366. $('input:radio[name="qr2_product"][value="ZVOX 450"]').attr('checked',true);
  367. $(".top").not(".zvox_450").hide();
  368. $(".zvox_450").show();
  369.  
  370. }
  371.  
  372. if (hash=="ZVOX 570")
  373. {
  374. $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
  375. $(".box").not(".tvaudio").hide();
  376. $(".tvaudio").show();
  377. $('input:radio[name="qr2_product"][value="ZVOX 570"]').attr('checked',true);
  378. $(".top").not(".zvox_570").hide();
  379. $(".zvox_570").show();
  380.  
  381. }
  382.  
  383. if (hash=="ZVOX 670")
  384. {
  385. $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
  386. $(".box").not(".tvaudio").hide();
  387. $(".tvaudio").show();
  388. $('input:radio[name="qr2_product"][value="ZVOX 670"]').attr('checked',true);
  389. $(".top").not(".zvox_670").hide();
  390. $(".zvox_670").show();
  391.  
  392. }
  393.  
  394. if (hash=="ZVOX 770")
  395. {
  396. $('input:radio[name="colorRadio"][value="tvaudio"]').attr('checked',true);
  397. $(".box").not(".tvaudio").hide();
  398. $(".tvaudio").show();
  399. $('input:radio[name="qr2_product"][value="ZVOX 770"]').attr('checked',true);
  400. $(".top").not(".zvox_770").hide();
  401. $(".zvox_770").show();
  402.  
  403. }
  404.  
  405. if (hash=="ConnectKit-1")
  406. {
  407. $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
  408. $(".box").not(".retails").hide();
  409. $(".retails").show();
  410. $('input:radio[name="qr2_product"][value="ConnectKit-1"]').attr('checked',true);
  411. $(".top").not(".connectkit_1").hide();
  412. $(".connectkit_1").show();
  413.  
  414. }
  415.  
  416. if (hash=="ConnectKit-3")
  417. {
  418. $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
  419. $(".box").not(".retails").hide();
  420. $(".retails").show();
  421. $('input:radio[name="qr2_product"][value="ConnectKit-3"]').attr('checked',true);
  422. $(".top").not(".connectkit_3").hide();
  423. $(".connectkit_3").show();
  424.  
  425. }
  426.  
  427. if (hash=="World Power Adapter")
  428. {
  429. $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
  430. $(".box").not(".retails").hide();
  431. $(".retails").show();
  432. $('input:radio[name="qr2_product"][value="World Power Adapter"]').attr('checked',true);
  433. $(".top").not(".world_power").hide();
  434. $(".world_power").show();
  435.  
  436. }
  437.  
  438. if (hash=="Individual Power Adaptors")
  439. {
  440. $('input:radio[name="colorRadio"][value="retails"]').attr('checked',true);
  441. $(".box").not(".retails").hide();
  442. $(".retails").show();
  443. $('input:radio[name="qr2_product"][value="Individual Power Adaptors"]').attr('checked',true);
  444. $(".top").not(".individaul_power").hide();
  445. $(".individaul_power").show();
  446. }
  447. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement