$(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("

Plesk Licences



");} else if(i<4){$(".specs li:nth-child(4)").html("

Plesk Licences




");} else{$(".specs li:nth-child(4)").html("

Plesk Licences





");} $(".price h2").html(currencySymbol+(priceUnit*i));target=i;} else{$(".nodes li:nth-child("+i+")").removeClass("on");$(".nodes li:nth-child("+i+")").addClass("off");if(i==2){$("#package").val(i-1);$(".specs li:nth-child(1) h2").html((memoryUnit*(i-1))+"MB");$(".specs li:nth-child(2) h2").html((spaceUnit*(i-1))+"GB");$(".specs li:nth-child(3) h2").html((transferUnit*(i-1))+"GB");$(".specs li:nth-child(4)").html("

Plesk Licences

N/A

");$(".price h2").html(currencySymbol+(priceUnit*(i-1)));target=1;}}} $(".sliderHandle").animate({left:$(".slider").offset().left+(increment*(target-1))+25},100);return e.preventDefault();});$(".sliderHandle").mousedown(function(){sliding=true;increment=$(".slider").width()/slideSteps;sliderOffset=$(".slider").offset();$("body").bind('mousedown',function(e){return e.preventDefault();});});$(document).mousemove(function(e){if(sliding&&e.pageX>sliderOffset.left&&e.pageX<(sliderOffset.left+$(".slider").width())){$(".sliderHandle").css("left",e.pageX-($(".sliderHandle").width()/2));var i=1;var handleOffset=$(".sliderHandle").offset();for(var position=sliderOffset.left;position<(sliderOffset.left+$(".slider").width());position+=increment){i++;if(handleOffset.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("

Plesk Licences



");} else if(i<4){$(".specs li:nth-child(4)").html("

Plesk Licences




");} else{$(".specs li:nth-child(4)").html("

Plesk Licences





");} $(".price h2").html(currencySymbol+(priceUnit*i));} else{$(".nodes li:nth-child("+i+")").removeClass("on");$(".nodes li:nth-child("+i+")").addClass("off");if(i==2){$("#package").val(i-1);$(".specs li:nth-child(1) h2").html((memoryUnit*(i-1))+"MB");$(".specs li:nth-child(2) h2").html((spaceUnit*(i-1))+"GB");$(".specs li:nth-child(3) h2").html((transferUnit*(i-1))+"GB");$(".specs li:nth-child(4)").html("

Plesk Licences

N/A

");$(".price h2").html(currencySymbol+(priceUnit*(i-1)));}}}} return e.preventDefault();});$(document).mouseup(function(){sliding=false;$("body").unbind('mousedown');var position=0;var handleOffset=$(".sliderHandle").offset();for(var position=sliderOffset.left;position<(sliderOffset.left+$(".slider").width());position+=increment){if(handleOffset.left<=(position+increment)){$(".sliderHandle").animate({left:position+25},100);break;}}});if($(".profileList").length>0){var konami={input:"",pattern:"38384040373937396665",load:function(){$(document).keydown(function(e){konami.input+=e?e.keyCode:event.keyCode;if(konami.input.indexOf(konami.pattern)!=-1){konami.input="";if($(".profileList li .stats").is(":visible")){$(".profileList li .stats").slideUp();$("h1 span").html("Meet the 34SP.com Team");} else{$(".profileList li .stats").slideDown();$("h1 span").html("34SP.com Top Trumps");} return;}});}} konami.load();}});