$(document).ready(function(){$('#gallery a').lightBox();$(".autoselect").select();$(".sliderPos").click(function(){$("#productNav .selected").removeClass('selected');$(this).parent().addClass('selected');$("#slider").animate({left:$(this).attr('rel')});$("#banners").animate({'margin-left':$(this).attr('rev')});return false;});$(".slideToggle").click(function(event){$("#"+$(this).attr('rel')).slideToggle();if($(this).is("a")){event.preventDefault();}});$("#os").change(function(){if($("#os").val()=='CentOS_5'){$("#plesk").removeAttr('disabled');} else{$("#plesk").attr('disabled','disabled');$("#plesk").val(0);}});$("#package").change(function(){if($("#plesk").length>0){$("#plesk option[value='10']").remove();$("#plesk option[value='100']").remove();$("#plesk option[value='unlimited']").remove();if($("#package").val()>1){$("#plesk").append('');} if($("#package").val()>2){$("#plesk").append('');} if($("#package").val()>3){$("#plesk").append('');}}});$(".paymentMethodRadio").click(function(){$(".paymentMethod").slideUp();$("#"+$(this).attr('rel')).slideDown();});if(!$("#alternate_address").is(':checked')){$("#alternateAddress").slideUp();} if($(".scrollLoader").length>0){$(window).scroll(function(){if($(window).scrollTop()+100>=$(document).height()-$(window).height()){$.getJSON('/'+pageName+'?id='+$(".scrollLoader").attr('rel'),function(data){$(".scrollLoader").attr('rel',data.nextId);$.each(data.content,function(key,value){$(".scrollLoader").append(value);});});}});} $("#number").keyup(function(){if($("#number").val().match(/^(5018|5020|5038|6304|6759|6761|6763|4026|417500|4508|4844|4913|4917)/)&&$("#issueContainer:not(:visible)").length>0){$("#issueContainer").slideDown();} else if(!$("#number").val().match(/^(5018|5020|5038|6304|6759|6761|6763|4026|417500|4508|4844|4913|4917)/)&&$("#issueContainer:visible").length>0){$("#issueContainer").slideUp();}});$(".other").change(function(){if($(this).val()=='Other'){$("#other_"+$(this).attr('rel')).slideDown();$("#other_"+$(this).attr('rel')).select();} else{$("#other_"+$(this).attr('rel')).slideUp();}});$(".profileList li .icon").mouseover(function(){$(this).siblings('div.position').fadeIn();});$(".profileList li .icon").mouseout(function(){$(this).siblings('div.position').fadeOut();});var sliding=false;var slideSteps=10;var increment=0;var sliderOffset=0;$(".specs li:nth-child(4) input").live('click',function(){var i=1;var handleOffset=$(".sliderHandle").offset();var numLicenses=$(this).val().toLowerCase();for(var position=sliderOffset.left;position<(sliderOffset.left+$(".slider").width());position+=increment){i++;if(handleOffset.left>=(position+increment)){$(".price h2").html(currencySymbol+((priceUnit*i)+window['pleskPrice'+numLicenses]));} else if(i==2){$(".price h2").html(currencySymbol+((priceUnit*(i-1))+window['pleskPrice'+numLicenses]));}}});$(".nodes li").click(function(e){increment=$(".slider").width()/slideSteps;sliderOffset=$(".slider").offset();var offset=$(this).offset();var i=1;var target=0;for(var position=$(".slider").offset().left;position<(offset.left+$(".slider").width());position+=increment){i++;if(offset.left>=(position+increment)){$(".nodes li:nth-child("+i+")").removeClass("off");$(".nodes li:nth-child("+i+")").addClass("on");$("#package").val(i);$(".specs li:nth-child(1) h2").html((memoryUnit*i)+"MB");$(".specs li:nth-child(2) h2").html((spaceUnit*i)+"GB");$(".specs li:nth-child(3) h2").html((transferUnit*i)+"GB");if(i<3){$(".specs li:nth-child(4)").html("