function AMC(){function l(){var o=!!("placeholder" in document.createElement("input"));if(o){return}$("input[placeholder]").each(function(){var p=$(this).attr("placeholder");if($(this).val()==""){$(this).addClass("placeholder").val(p)}$(this).focus(function(){if($(this).val()==p){$(this).removeClass("placeholder").val("")}return false}).blur(function(){if($(this).val()==""){$(this).addClass("placeholder").val(p)}})});$("#aspnetForm").submit(function(){$("input[placeholder]").each(function(){var p=$(this).attr("placeholder");if($(this).val()==p){$(this).val("")}})})}function d(o){var p=$(o.currentTarget).parents("fieldset");var q=true;p.find(":input").each(function(r,s){if(!$(s).valid()){q=false}});if(!q){o.preventDefault()}}jQuery.validator.addMethod("validPhoneNumber",function(r,p,s){var o=$(p).parent();var q=/^\({0,1}((0|\+61)(2|4|3|7|8)){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3}$/;if(r.match(q)!=null){o.removeClass("error");o.find("label.error").remove();$(p).removeClass("error");return true}o.addClass("error");return false},jQuery.validator.format("Please enter a valid phone number"));jQuery.validator.addMethod("dateAU",function(s,q){var o=false;var u=/^\d{1,2}\/\d{1,2}\/\d{4}$/;if(u.test(s)){var w=s.split("/");var r=parseInt(w[0],10);var p=parseInt(w[1],10);var t=parseInt(w[2],10);var v=new Date(t,p-1,r);if((v.getFullYear()==t)&&(v.getMonth()==p-1)&&(v.getDate()==r)){o=true}else{o=false}}else{o=false}return this.optional(q)||o},"Please enter a correct date in the format DD/MM/YYYY");jQuery.validator.addMethod("validPostcode",function(r,p,s){var o=$(p).parent();if(r.length==0){return true}var q=/^\d{4}$/;if(r.match(q)!=null){o.removeClass("error");o.find("label.error").remove();$(p).removeClass("error");return true}o.addClass("error");return false},jQuery.validator.format("Please enter a valid postcode 4 digits in length"));function h(){$("#aspnetForm").validate({errorPlacement:function(o,p){$(p).parents("li").prepend(o)},highlight:function(p,o){$(p).parents("li").addClass(o)},unhighlight:function(p,o){$(p).parents("li").removeClass(o)},onsubmit:false,onkeyup:false,focusInvalid:true,ignoreTitle:true});$(".validateForm").click(d);if($(".validPhoneNumber").length!=0){$(".validPhoneNumber").rules("add",{validPhoneNumber:true})}$("fieldset :text").keydown(function(o){if(o.keyCode==13){d(o)}})}function i(){Cufon.replace(".cufon-normal",{fontFamily:"gotham-normal",hover:true});Cufon.replace(".cufon-book",{fontFamily:"gotham-book"});Cufon.replace(".cufon-light",{fontFamily:"gotham-light"});Cufon.replace(".cufon-book-shadow",{fontFamily:"gotham-book",textShadow:"1px 1px #000",hover:true});Cufon.replace(".cufon-light-shadow",{fontFamily:"gotham-light",textShadow:"1px 1px #000"})}function f(){if($(".sendToFriend").length==0){return}$(".sendToFriend").attr("href",$(".sendToFriend").attr("href").replace("_NoJS",""));$(".sendToFriend").fancybox({type:"iframe",width:725,height:288,overlayShow:true,padding:0})}function n(){if(!$("#scrollbar").length){return}var s=this;var r={timer:false,liwidth:136};var u={intervalId:function(){},carouselMoveBy:0,carouselMoveSpeed:0,carouselMoveSpeedModifier:0.2,carouselMaxRight:0,scrollBarWidth:0,scrollBarMaxLeft:0};function t(){u.carouselMoveBy=10;u.carouselMoveSpeed=1;u.carouselMaxRight=$("ul.items").width()-588+30;u.scrollBarWidth=$("#sb_track .wrapper").width();u.scrollBarMaxLeft=588-u.scrollBarWidth;u.initialCarouselMoveBy=3;setTimeout(function(){s.initialScrollToRight()},1500)}this.initialScrollToRight=function(){u.intervalId=setInterval(function(){s.startScrollRight()},50)};this.scrollRight=function(){var v=$("ul.items:visible");var w=v.css("marginLeft").split("px")[0];if(w<(-u.carouselMaxRight+u.carouselMoveBy*u.carouselMoveSpeed)){v.css("marginLeft",(-u.carouselMaxRight));$("#sb_track .wrapper").css("left",u.scrollBarMaxLeft)}else{v.css("marginLeft",w-u.carouselMoveBy*u.carouselMoveSpeed);$("#sb_track .wrapper").css("left",(-(v.css("marginLeft").split("px")[0])/u.carouselMaxRight)*u.scrollBarMaxLeft);u.carouselMoveSpeed=u.carouselMoveSpeed+u.carouselMoveSpeedModifier}};this.startScrollRight=function(){var v=$("ul.items:visible");var w=v.css("marginLeft").split("px")[0];if(w<(-u.carouselMaxRight+u.initialCarouselMoveBy*u.carouselMoveSpeed)){v.css("marginLeft",(-u.carouselMaxRight));$("#sb_track .wrapper").css("left",u.scrollBarMaxLeft)}else{v.css("marginLeft",w-u.initialCarouselMoveBy*u.carouselMoveSpeed);$("#sb_track .wrapper").css("left",(-(v.css("marginLeft").split("px")[0])/u.carouselMaxRight)*u.scrollBarMaxLeft)}};this.scrollLeft=function(){var v=$("ul.items:visible");var w=v.css("marginLeft").split("px")[0];if(w>(-u.carouselMoveBy)*u.carouselMoveSpeed){v.css("marginLeft",0);$("#sb_track .wrapper").css("left",0)}else{v.css("marginLeft",w-(-u.carouselMoveBy)*u.carouselMoveSpeed);$("#sb_track .wrapper").css("left",(-(v.css("marginLeft").split("px")[0])/u.carouselMaxRight)*u.scrollBarMaxLeft);u.carouselMoveSpeed=u.carouselMoveSpeed+u.carouselMoveSpeedModifier}};$("#carousel ul.items li:last-child").addClass("last");var q=$("ul.items > li").length;var p=(q*r.liwidth);$("ul.items").width(p);var o=15;$("#sb_track .wrapper").css("left",0);$("#sb_track .wrapper").find("#sbt").width($("#sbt").width()-($("#viewport ul > li").length*o));if(!$("#viewport").hasClass("loading")){r.timer=setTimeout(function(){$("#viewport ul").fadeIn(100);t()},100)}else{r.timer=setTimeout(function(){$("#viewport").removeClass("loading");$("#viewport ul").fadeIn(500);t()},1500)}$("#sb_track .wrapper").bind("mousedown",function(){clearInterval(u.intervalId);$(this).find("#sbt").addClass("active")}).bind("mouseup",function(){$(this).find("#sbt").removeClass("active")}).bind("dragstart",function(){$("body").css("cursor","pointer")}).bind("dragend",function(){$(this).find("#sbt").removeClass("active");$("body").css("cursor","")}).bind("drag",function(z){clearInterval(u.intervalId);var y=$("#sb_track .wrapper").width(),x=588-y;z.offsetX-=$("#scrollbar").offset().left;var A=z.offsetX>x?x:Math.max(0,z.offsetX);$(this).css({left:A});var w=$("ul.items:visible");var v=(-A*(w.outerWidth()-588))/($("#sb_track .wrapper").width()-588);w.css("marginLeft",-v)});$("#sb_left a, #sb_right a").click(function(v){v.preventDefault()});$("#sb_left a, #sb_right a").mousedown(function(v){clearInterval(u.intervalId);if($(this).parent().attr("id")=="sb_left"){u.intervalId=setInterval(function(){s.scrollLeft()},50)}else{u.intervalId=setInterval(function(){s.scrollRight()},50)}}).mouseup(function(v){clearInterval(u.intervalId);u.carouselMoveSpeed=1}).mouseout(function(v){clearInterval(u.intervalId);u.carouselMoveSpeed=1})}function g(){if($("#gallery").length==0){return}$("#gallery").after('<div class="nav">').cycle({fx:"turnDown",delay:0,timeout:7000,pager:".nav",before:j})}var a=true;function j(q,o,p){$("#gallery-wrapper h1").fadeOut(900);if(a==true){$("#gallery-wrapper h1:first-child").fadeIn(1000);a=false}else{$("#gallery-wrapper h1").eq(p.nextSlide).fadeIn(1000)}}function e(){if($("div.only-item").length==0){return}$("div.only-item").cycle({fx:"turnDown",delay:-4000})}function c(){if($("#big-carousel").length==0){return}if($("#big-carousel ul.window li").length==1){return}$("#big-carousel ul.window").cycle({fx:"scrollLeft",next:".next",prev:".prev",timeout:0})}function b(){if($(".group-gallery").length==0){return}$(".group-gallery").fancybox({padding:0,transitionIn:"elastic",transitionOut:"elastic",onComplete:function(){$("#fancybox-left-ico").css({left:"-12px"});$("#fancybox-right-ico").css({right:"-12px",left:"auto"})}})}function k(){if($(".subscribeForm").length==0){return}$("#industry").change(function(){$("#industry option:selected").each(function(){if($(this).text()=="Other"){$("#industry-specify").show()}else{$("#industry-specify").hide()}})});$("#state").change(function(){$("#state option:selected").each(function(){if($(this).text()=="International"){$("#state-specify").show()}else{$("#state-specify").hide()}})});var o=$("#email").val();$("#subForm").validate({rules:{email:{required:true,email:true},messages:{email:"Please enter a valid email address"}}})}(function m(){h();l();i();f();n();g();e();b();c();k()}())}$(document).ready(function(){AMC()});
