var splash_accordion=null;var footer_scroller=null;var search_box=null;var g_drop_downs=null;var dropdown_menu=null;window.addEvent("domready",function(){var f=$$(".accordion_header");if(f&&f.length){var a=new SplashAccordion(f[0])}var h=$$(".rotation_banner");if(h&&h.length){var c=new UsedCarBanner(h[0])}dropdown_menu=new DropdownMenu($$("#nav .nav_tab"),$$("#nav_dropdowns .nav_dropdown"));if($("mr_contact_box")){var g=new ContactAccordion()}if($("mr_parts_box")){var b=new PartsAccordion()}if($("mr_comment_box")){var d=new CommentFormBox()}if($("mr_service_box")){var e=new EasyBookingBox()}setTimeout("delayed_load()",250)});sIFR.replace(hc77,{selector:"h1",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; font-size:31px; }",wmode:"transparent",tuneHeight:-7,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".index_left h2",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; font-size:14px; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".usedcar_summary h2, .section_header h2",css:".sIFR-root { background-color: transparent; color: #FFFFFF; font-weight:bold; cursor: pointer; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:"h2.grey",css:".sIFR-root { background-color: transparent; color: #a3a3a3; font-size:18px; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:"#experience h2",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; font-size:18px; cursor:pointer; width:135px }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".white_content_main h2",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; font-size:18px; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".r_long_header",css:".sIFR-root { background-color: transparent; color: #666666; cursor:pointer }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57o,{selector:".pullout_quote",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".main_quote",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".showroom_item h3",css:".sIFR-root { background-color: transparent; color: #464b4d; cursor: pointer;}",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57,{selector:".showroom_item_expanded_content h3",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; cursor: pointer;}",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57o,{selector:".testimonial_copy",css:".sIFR-root { background-color: transparent; color: #3E4E8E;}",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc77,{selector:"span.testimonial_name",css:".sIFR-root { background-color: transparent; color: #383838; font-size:14px }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc77,{selector:"p.testimonial_name, div.testimonial_name",css:".sIFR-root { background-color: transparent; color: #383838; text-align:right; font-size:14px }",wmode:"transparent",tuneHeight:-6,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc77,{selector:".feature_box .more_link_copy",css:".sIFR-root { background-color: transparent; color: #FFFFFF; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc77,{selector:".more_link_copy",css:".sIFR-root { background-color: transparent; color: #464b4d; cursor:pointer;  }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc77,{selector:".service_location_name",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});function delayed_load(){var p=$$(".showroom_item");var q=$$(".showroom_item_expanded_content");if(p.length&&q.length){var i=new ShowroomToggler($$(".showroom_item"),$$(".showroom_item_expanded_content"),$("showroom_reminder_tab"))}var a=$$(".index_manufacturer");if(a){var l=new IndexManufacturers(a)}var n=$$(".image_hover");if(n.length){var k=new HoverImages(n)}var m=$$(".r_used_car_box");if(m.length){var m=new FeaturedUsedCar(m[0])}if($("mr_testimonial_box")){var f=new TestimonialRotator($("mr_testimonial_box"))}if($("keema_conscious_scroller")){var e=new TextScroller($("keema_conscious_scroller"))}if($("why_keema_scroller")){var h=new TextScroller($("why_keema_scroller"))}new ClearTextInput(document.forms.search.q);var d=document.forms.easy_booking;if(d){new ClearTextInput(d.make);new ClearTextInput(d.model);new ClearTextInput(d.year);new ClearTextInput(d.registration);new ClearTextInput(d.kms);new ClearTextInput(d.name);new ClearTextInput(d.phone);new ClearTextInput(d.email);new ClearTextInput(d.address);new ClearTextInput(d.state);new ClearTextInput(d.suburb);new ClearTextInput(d.postcode);new ClearTextInput(d.preferred_time);new ClearTextInput(d.preferred_date);new ClearTextInput(d.comments)}var b=$$("select");if(b){g_drop_downs=[];b.each(function(r){g_drop_downs[r.form.name+"_"+r.name]=new DropDown(r,r.selectedIndex,{selectText:r.options[r.selectedIndex].text,dropDownImageWidth:14})})}if(document.forms.used_car_search){var o=new UsedSearch(document.forms.used_car_search)}var g=$$(".used_car_item");if(g){new UsedCarItems(g)}if($("knowledgebank_articles")){new KnowledgeBankToggler()}var c=$$(".staff_overlay");if(c.length){new StaffPopup(c[0])}}var IndexManufacturers=new Class({manufacturers:null,initialize:function(a){this.manufacturers=a;this.manufacturers.each(function(b){b.addEvent("mouseenter",function(f){f=new Event(f).stop();var c=$(f.target);if(!c.hasClass("index_manufacturer")){c=$(c.parentNode)}var d=$(c).getElement("img");d.src=d.src.substring(0,d.src.length-5)+"h.gif"}.bind(this));b.addEvent("mouseleave",function(f){f=new Event(f).stop();var c=$(f.target);if(!c.hasClass("index_manufacturer")){c=$(c.parentNode)}var d=$(c).getElement("img");d.src=d.src.substring(0,d.src.length-5)+"s.gif"}.bind(this))}.bind(this))}});var ClearTextInput=new Class({Implements:[Events,Options],options:{},element:null,initialize:function(b,a){this.setOptions(a);this.element=$(b);this.element.addEvent("focus",function(c){if(this.element.value==this.element.defaultValue){this.element.value=""}this.fireEvent("focus",[this.element])}.bind(this));this.element.addEvent("blur",function(c){if(this.element.value==""){this.element.value=this.element.defaultValue}this.fireEvent("blur",[this.element])}.bind(this))}});var StaffPopup=new Class({container:null,bubble:null,blurb:null,blurb_timeout:null,blurb_fx:null,initialize:function(a){this.container=$(a);this.bubble=this.container.getElement(".staff_bubble");this.blurb=this.container.getElement(".staff_blurb");if(this.bubble&&this.blurb){this.bubble.addEvent("mouseenter",function(b){b=new Event(b).stop();this.showBlurb()}.bind(this));this.bubble.addEvent("mouseleave",function(b){b=new Event(b).stop();this.startHideBlurb()}.bind(this));this.blurb.addEvent("mouseenter",function(b){b=new Event(b).stop();this.showBlurb()}.bind(this));this.blurb.addEvent("mouseleave",function(b){b=new Event(b).stop();this.startHideBlurb()}.bind(this));this.blurb_fx=new Fx.Tween(this.blurb,{duration:1000});this.bubble_fx=new Fx.Tween(this.bubble,{duration:1000});this.blurb.setOpacity(0)}},showBlurb:function(){clearTimeout(this.blurb_timout);this.blurb_timeout=null;this.blurb_fx.cancel();this.blurb_fx.start("opacity",1);this.bubble_fx.cancel();this.bubble_fx.start("opacity",0);sIFR.replace(hc57o,{selector:".staff_blurb_content",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; font-size:16px; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]})},hideBlurb:function(){this.bubble_fx.cancel();this.bubble_fx.start("opacity",1);this.blurb_fx.cancel();this.blurb_fx.start("opacity",0)},startHideBlurb:function(){clearTimeout(this.blurb_timout);this.blurb_timeout=null;this.blurb_timout=setTimeout(this.hideBlurb.bind(this),400)}});var HoverImages=new Class({images:null,initialize:function(a){this.images=a;this.images.each(function(c){c.addEvent("mouseenter",function(g){g=new Event(g).stop();var d=$(g.target);if("img"==d.nodeName.toLowerCase()){d.src=d.src.substring(0,d.src.length-5)+"h.jpg"}else{d=$(d.parentNode);var f=d.getStyle("background-image");d.setStyle("background-image",f.substring(0,f.length-6)+"h.jpg)")}});c.addEvent("mouseleave",function(g){g=new Event(g).stop();var d=$(g.target);if("img"==d.nodeName.toLowerCase()){d.src=d.src.substring(0,d.src.length-5)+"s.jpg"}else{d=$(d.parentNode);var f=d.getStyle("background-image");d.setStyle("background-image",f.substring(0,f.length-6)+"s.jpg)")}});if("img"==c.nodeName.toLowerCase()){new Asset.image(c.src.substring(0,c.src.length-5)+"h.jpg")}else{var b=c.getStyle("background-image");new Asset.image(b.substring(4,b.length-5)+"h.jpg")}})}});var FeaturedUsedCar=new Class({hover_link:null,hover_images:null,effect1:null,effect2:null,initialize:function(a){this.hover_link=a.getElement("a");this.hover_images=a.getElements("div.r_used_car_image");this.effect1=new Fx.Tween(this.hover_images[0]);this.effect2=new Fx.Tween(this.hover_images[1]);this.hover_link.addEvent("mouseenter",function(b){b=new Event(b).stop();this.effect1.start("opacity",1);this.effect2.start("opacity",0)}.bind(this));this.hover_link.addEvent("mouseleave",function(b){b=new Event(b).stop();this.effect1.start("opacity",0);this.effect2.start("opacity",1)}.bind(this))}});var DropdownMenu=new Class({options:{},tabs:null,dropdowns:null,initialize:function(b,c){this.tabs=b;this.dropdowns=c;var a=0;this.tabs.each(function(d){if(!d.hasClass("section")){d.setAttribute("rel",a);d.addEvent("mouseover",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.nodeType||!g.hasClass("nav_tab")){g=$(g.parentNode)}var f=g.getAttribute("rel");this.placeDropdown(f)}.bind(this));d.addEvent("mouseout",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.nodeType||!g.hasClass("nav_tab")){var g=$(g.parentNode)}var f=g.getAttribute("rel");this.hideDropdown(f)}.bind(this))}a++}.bind(this));this.dropdowns.each(function(d){d.addEvent("mouseover",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.hasClass("nav_dropdown")){g=$(g.parentNode)}var f=g.getAttribute("rel");this.placeDropdown(f)}.bind(this));d.addEvent("mouseout",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.hasClass("nav_dropdown")){g=$(g.parentNode)}var f=g.getAttribute("rel");this.hideDropdown(f)}.bind(this))}.bind(this));new Asset.image(base_url+"images/bg_dropdown.png")},placeDropdown:function(a){if(a<this.dropdowns.length){if(!this.dropdowns[a].getAttribute("rel")){var f=this.tabs[a].getPosition();var e=this.tabs[a].getSize();var b=5;if(this.tabs[a].hasClass("first")){b=2}var c=f.y;var d=f.x+b;if(Browser.Engine.trident){c+=30;d-=2}else{c+=33}this.dropdowns[a].setStyles({top:c+"px",left:d+"px",width:"125px"});this.dropdowns[a].setAttribute("rel",a)}this.dropdowns[a].setStyle("display","block")}},hideDropdown:function(a){if(a<this.dropdowns.length){this.dropdowns[a].setStyle("display","none")}}});var UsedCarItems=new Class({items:null,initialize:function(a){this.items=a;a.each(function(b){b.addEvent("click",function(f){f=new Event(f).stop();var d=$(f.target);while(!d.hasClass("used_car_item")){d=$(d.parentNode)}var c=d.getElement("a");window.location=c.getAttribute("href")})})}});var UsedCarBanner=new Class({container:null,splash_images:null,togglers:null,image_timeout:null,current:0,next:null,initialize:function(a){this.container=a;this.splash_images=a.getElements(".rotation_image");this.togglers=a.getElements(".usedcar_nav_item");this.togglers.each(function(b){b.addEvent("click",function(f){f=new Event(f).stop();var d=$(f.target);var c=this.togglers.indexOf(d);this.next=c;this.stop();this._changeImage()}.bind(this))},this);this.start()},changeImage:function(){this.next=this.current+1;if(this.next>=this.splash_images.length){this.next=0}this._changeImage()},_changeImage:function(){if(this.current!=this.next){this.setOpaque();var b=null;var a=null;b=new Fx.Tween(this.splash_images[this.next]);a=new Fx.Tween(this.splash_images[this.current]);b.start("opacity",0,1);a.start("opacity",1,0);this.current=this.next}this.next=null;if(!this.image_interval){this.start()}},start:function(){this.image_interval=setInterval(this.changeImage.bind(this),6000)},stop:function(){clearInterval(this.image_interval);this.image_interval=null},setOpaque:function(){var a=0;this.splash_images.each(function(b){if(a!=this.current){b.setOpacity(0)}if(a!=this.next){this.togglers[a].removeClass("selected")}else{this.togglers[a].addClass("selected")}a++}.bind(this))}});var UsedSearch=new Class({manu_dropdown:null,make_dropdown:null,make_rdropdown:null,initialize:function(b){new ClearTextInput(b.used_keyword);this.manu_dropdown=$(b.used_manufacturer_id);this.make_dropdown=$(b.used_model_id);this.manu_rdropdown=g_drop_downs[this.manu_dropdown.form.name+"_"+this.manu_dropdown.name];this.make_rdropdown=g_drop_downs[this.make_dropdown.form.name+"_"+this.make_dropdown.name];this.manu_dropdown.addEvent("change",function(){this.setMakeDropdown(this.manu_dropdown.value)}.bind(this));if(manufacturer_id){this.setMakeDropdown(manufacturer_id);var c=false;var a=0;while(!c&&a<this.manu_dropdown.options.length){if(this.manu_dropdown.options[a].value==manufacturer_id){this.manu_rdropdown.selectOption(a,1);c=true}a++}}},setMakeDropdown:function(a){this.make_dropdown.options.length=1;makes[a].each(function(b){this.make_dropdown.options[this.make_dropdown.options.length]=new Option(b.name,b.id)}.bind(this));this.make_rdropdown.destroyDropDown();this.make_rdropdown.selectOption(0,1)}});var TestimonialRotator=new Class({options:{},images:null,interval:null,current:0,previous:null,initialize:function(a){this.images=a.getElements(".testimonial_image");this.interval=setInterval(this.changeImage.bind(this),4500)},changeImage:function(){var b=this.current+1;if(b>=this.images.length){b=0}if(this.current!=b){this.setOpaque();var c=null;var a=null;c=new Fx.Tween(this.images[b]);a=new Fx.Tween(this.images[this.current]);c.start("opacity",0,1);a.start("opacity",1,0);this.current=b}},setOpaque:function(){for(var a=0;a<this.images.length;a++){if(a!=this.current){this.images[a].setStyle("visibility","hidden")}}}});TestimonialRotator.implement(new Options);var ContactAccordion=new Class({accordion:null,callback_form:null,question_form:null,phone_number:null,name:null,question_name:null,question_email:null,question_textarea:null,visible:false,img_submit:null,initialize:function(){this.accordion=new Accordion($$("#accordion_contact_box .contact_box_toggler"),$$("#accordion_contact_box .contact_box_element"),{display:-1});this.callback_form=document.forms.call_me_back;this.phone_number=$(this.callback_form.phone_number);this.name=$(this.callback_form.name);this.callback_form=$(this.callback_form);this.question_form=document.forms.quick_question;this.question_name=$(this.question_form.name);this.question_email=$(this.question_form.email);this.question_textarea=$(this.question_form.question);new ClearTextInput(this.phone_number,{onFocus:function(a){this.accordion.display(0)}.bind(this)});new ClearTextInput(this.name);new ClearTextInput(this.question_name);new ClearTextInput(this.question_email);new ClearTextInput(this.question_textarea);this.callback_form.addEvent("submit",function(a){this.accordion.display(0);why="";if(this.phone_number.value==""||this.phone_number.value==this.phone_number.defaultValue){why+="Please enter your phone number\n"}if(this.name.value==""||this.name.value==this.name.defaultValue){why+="Please enter your name\n"}if(why!=""){alert(why);return false}return true}.bind(this))}});var PartsAccordion=new Class({form:null,visible:false,img_submit:null,sections:null,pickup_loc:null,heights:[],initialize:function(){this.sections=$$("#parts_contact_box .contact_box_element");this.form=document.forms.parts_enquiry;this.first_name=$(this.form.first_name);this.last_name=$(this.form.last_name);this.make_model=$(this.form.make_and_model);this.model_year=$(this.form.model_year);this.company=$(this.form.company);this.phone=$(this.form.phone);this.email=$(this.form.email);this.address=$(this.form.address);this.suburb=$(this.form.suburb);this.postcode=$(this.form.postcode);this.parts_description=$(this.form.parts_description);this.vin=$(this.form.vin);this.retrieve_methods=this.form.retrieve_method;this.pickup_location=this.form.pickup_location;this.parts_description=$(this.form.parts_description);this.parts_identification=$(this.form.parts_identification);this.form=$(this.form);this.pickup_loc=this.form.getElement("#pickup_location");this.pickup_loc.setStyle("display","none");for(var a=0;a<this.sections.length;a++){this.heights[a]=this.sections[a].getSize().y;this.sections[a].setStyles({height:"0px",visibility:"hidden",opacity:"0",overflow:"hidden"})}new ClearTextInput(this.first_name,{onFocus:function(b){this.display(0)}.bind(this)});new ClearTextInput(this.last_name,{onFocus:function(b){this.display(0)}.bind(this)});new ClearTextInput(this.make_model,{onFocus:function(b){this.display(1)}.bind(this)});new ClearTextInput(this.model_year,{onFocus:function(b){this.display(1)}.bind(this)});new ClearTextInput(this.company);new ClearTextInput(this.phone);new ClearTextInput(this.email);new ClearTextInput(this.address);new ClearTextInput(this.suburb);new ClearTextInput(this.vin);new ClearTextInput(this.postcode);new ClearTextInput(this.parts_description);new ClearTextInput(this.parts_identification);$(this.retrieve_methods[0]).addEvent("click",function(b){this.pickup_loc.setStyle("display","none")}.bind(this));$(this.retrieve_methods[1]).addEvent("click",function(b){this.pickup_loc.setStyle("display","block")}.bind(this));this.form.addEvent("submit",function(b){this.display(0);this.display(1);why="";if(this.first_name.value==""||this.first_name.value==this.first_name.defaultValue){why+="Please enter your First name\n"}if(this.last_name.value==""||this.last_name.value==this.last_name.defaultValue){why+="Please enter your Last name\n"}if(this.make_model.value==""||this.make_model.value==this.make_model.defaultValue){why+="Please enter your Car Make & Model\n"}if(this.model_year.value==""||this.model_year.value==this.model_year.defaultValue){why+="Please enter your Year of Model\n"}if(this.parts_description.value==""||this.parts_description.value==this.parts_description.defaultValue){why+="Please enter your Parts Description\n"}if(this.retrieve_methods[1].checked&&!this.pickup_location.selectedIndex){why+="Please select where you would like to pick-up this part\n"}if(why!=""){alert(why);return false}return true}.bind(this))},display:function(b){var a=new Fx.Morph(this.sections[b]);a.start({height:this.heights[b]+8,opacity:1})}});var CommentFormBox=new Class({form:null,sections:null,heights:[],first_name:null,last_name:null,email:null,make_and_manufacturer:null,comments:null,initialize:function(){this.sections=$$("#mr_comment_box .contact_box_element");for(var a=0;a<this.sections.length-1;a++){this.heights[a]=this.sections[a].getSize().y;this.sections[a].setStyles({height:"0px",visibility:"hidden",opacity:"0",overflow:"hidden"})}this.form=document.forms.comment_form;this.first_name=$(this.form.first_name);this.last_name=$(this.form.last_name);this.email=$(this.form.email);this.make_and_manufacturer=$(this.form.make_and_manufacturer);this.comments=$(this.form.comments);this.form=$(this.form);new ClearTextInput(this.first_name);new ClearTextInput(this.last_name);new ClearTextInput(this.email);new ClearTextInput(this.make_and_manufacturer);new ClearTextInput(this.comments,{onFocus:function(b){this.display(0);this.display(1)}.bind(this)});this.form.addEvent("submit",function(b){why="";if(this.first_name.value==""||this.first_name.value==this.first_name.defaultValue){why+="Please enter your first name\n"}if(this.last_name.value==""||this.last_name.value==this.last_name.defaultValue){why+="Please enter your last name\n"}if(this.make_and_manufacturer.value==""||this.make_and_manufacturer.value==this.make_and_manufacturer.defaultValue){why+="Please enter the make and manufacturer of your car\n"}if(this.comments.value==""||this.comments.value==this.comments.defaultValue){why+="Please enter a comment\n"}if(why!=""){alert(why);return false}return true}.bind(this))},display:function(b){var a=new Fx.Morph(this.sections[b]);a.start({height:this.heights[b]+8,opacity:1})}});var EasyBookingBox=new Class({form:null,sections:null,heights:[],name:null,phone:null,email:null,make:null,comments:null,preferred_time:null,preferred_date:null,initialize:function(){this.form=document.forms.easy_booking;this.name=$(this.form.name);this.phone=$(this.form.phone);this.email=$(this.form.email);this.make=$(this.form.make);this.preferred_time=$(this.form.preferred_time);this.preferred_date=$(this.form.preferred_date);this.form=$(this.form);this.form.addEvent("submit",function(a){why="";if(this.make.value==""||this.make.value==this.make.defaultValue){why+="Please enter the make of your car\n"}if(this.name.value==""||this.name.value==this.name.defaultValue){why+="Please enter your name\n"}if(this.preferred_time.value==""||this.preferred_time.value==this.preferred_time.defaultValue){why+="Please enter your preferred time\n"}if(this.preferred_date.value==""||this.preferred_date.value==this.preferred_date.defaultValue){why+="Please enter your preferred date\n"}if(!this.form.contact_method[0].checked&&!this.form.contact_method[1].checked){why+="Please select a method of contact\n"}if(this.form.contact_method[0].checked&&(this.email.value==""||this.email.value==this.email.defaultValue||!checkEmail(this.email.value))){why+="Please enter your email address\n"}if(this.form.contact_method[1].checked&&(this.phone.value==""||this.phone.value==this.phone.defaultValue)){why+="Please enter your phone number\n"}if(why!=""){alert(why);return false}return true}.bind(this))}});var KnowledgeBankToggler=new Class({options:{},togglers:null,articles:null,showroom_contents:null,current:0,next:null,initialize:function(c,a,b){this.togglers=$$(".article_toggle_box");this.articles=$$(".article_block");this.togglers.each(function(d){d.addEvent("click",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.hasClass("article_toggle_box")){g=$(g.parentNode)}var f=this.togglers.indexOf(g);this.clearArticles();this.articles[f].setStyle("display","block");g.setStyle("backgroundImage","url(images/keema_tip/bg_hover.gif)");sIFR.replace(hc57,{selector:".white_content_main h2",css:".sIFR-root { background-color: transparent; color: "+header_colour+";  }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]});sIFR.replace(hc57o,{selector:".pullout_quote",css:".sIFR-root { background-color: transparent; color: "+header_colour+"; }",wmode:"transparent",tuneHeight:-4,ratios:[9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]})}.bind(this))}.bind(this))},clearArticles:function(){this.articles.each(function(a){a.setStyle("display","none")});this.togglers.each(function(a){a.setStyle("backgroundImage","url(images/keema_tip/bg_normal.gif)")})}});var ShowroomToggler=new Class({options:{},showroom:null,showroom_items:null,showroom_contents:null,current:0,next:null,initialize:function(c,a,b){this.showroom_items=c;this.showroom_contents=a;this.showroom_items.each(function(d){d.addEvent("click",function(h){h=new Event(h).stop();var g=$(h.target);while(!g.hasClass("showroom_item")){g=$(g.parentNode)}var f=this.showroom_items.indexOf(g);this.next=f;this.showContent()}.bind(this))},this);this.hideContents();this.tab=b;if(this.tab){setTimeout(this.showTab.bind(this),2000)}},showContent:function(a){if(this.current!=this.next){this.showroom_contents[this.current].setStyle("display","none");this.showroom_contents[this.next].setStyle("display","block");sIFR.replace(hc57,{selector:".white_content_main h2.blue",css:".sIFR-root { background-color: transparent; color: #48537d; }",wmode:"transparent",tuneHeight:-4});this.current=this.next}},hideContents:function(){for(var a=0;a<this.showroom_contents.length;a++){if(a!=this.current){this.showroom_contents[a].setStyle("display","none")}}},showTab:function(){var a=new Fx.Tween(this.tab,{duration:2000});a.start("opacity",1)}});var SplashAccordion=new Class({header_container:null,accordion:null,text_scroller:null,arrow_fx:null,timeout:null,interval:null,container:null,splash_images:null,arrow:null,current:0,activeCount:0,initialize:function(a){this.header_container=a;this.splash_images=this.header_container.getElements(".rotation_image");this.container=this.header_container.getElement("#splash_accordion");this.accordion=new Accordion(this.header_container.getElements("#splash_accordion h3"),this.header_container.getElements("#splash_accordion .accordion_content"),{onActive:function(c,b){c.setStyles({color:active_colour,cursor:"auto"});this.resetInterval();this.placeArrow();this.changeImage();this.changeText();this.activeCount++}.bind(this),onBackground:function(c,b){c.setStyles({color:base_colour,cursor:"pointer"})}.bind(this)});this.text_scroller=new TextScroller(this.header_container.getElement("#splash_content_scroller"),{autoPlay:false});this.setInterval();this.arrow=this.header_container.getElement("#splash_accordion_arrow");this.arrow_fx=new Fx.Tween(this.arrow)},setInterval:function(){clearTimeout(this.timeout);this.timeout=null;this.interval=setInterval(this.changeAccordion.bind(this),6000)},resetInterval:function(){clearTimeout(this.timeout);clearInterval(this.interval);this.interval=null;this.timeout=null;this.timeout=setTimeout(this.setInterval.bind(this),2000)},setSplashInterval:function(){clearTimeout(this.timeout);this.timeout=null;this.interval=setInterval(this.changeAccordion.bind(this),6000)},changeAccordion:function(){var a=this.accordion.previous;var b=a+1;if(b>=this.accordion.elements.length){b=0}this.accordion.display(b)},placeArrow:function(){clearTimeout(this.arrow_timeout);this.arrow_timeout=null;this.arrow_timeout=setTimeout(this._placeArrow.bind(this),500)},_placeArrow:function(){clearTimeout(this.arrow_timeout);this.arrow_timeout=null;var c=this.arrow.getPosition();var b=this.accordion.togglers[this.accordion.previous].getPosition();var a=this.accordion.togglers[this.accordion.previous].getOffsetParent().getPosition();this.arrow_fx.start("top",(b.y-a.y+6)+"px")},changeImage:function(){clearTimeout(this.image_timeout);this.image_timeout=null;this.image_timeout=setTimeout(this._changeImage.bind(this),500)},_changeImage:function(){var a=this.accordion.previous;clearTimeout(this.image_timeout);this.image_timeout=null;if(this.current!=a){this.setOpaque();var c=null;var b=null;c=new Fx.Tween(this.splash_images[a]);b=new Fx.Tween(this.splash_images[this.current]);c.start("opacity",0,1);b.start("opacity",1,0);this.current=a}},changeText:function(){clearTimeout(this.text_timeout);this.text_timeout=null;this.text_timeout=setTimeout(this._changeText.bind(this),500)},_changeText:function(){clearTimeout(this.image_timeout);this.image_timeout=null;if(this.current>0||this.activeCount>1){this.text_scroller.showText(this.current)}},setOpaque:function(){var a=0;this.splash_images.each(function(b){if(a!=this.current&&a!=this.accordion.previous){b.setOpacity(0)}a++}.bind(this))}});var TextScroller=new Class({options:{margin:5,autoPlay:true},container:null,scroller:null,paragraphs:null,paragraph_height:null,curr:0,interval:null,fx:null,initialize:function(a,b){this.setOptions(b);this.container=a;this.scroll=this.container.getElement("div");this.paragraphs=this.container.getElements("p");if(this.paragraphs.length){this.paragraph_height=this.paragraphs[0].getSize().y;if(this.options.autoPlay){this.start()}this.fx=new Fx.Tween(this.scroll)}},nextText:function(){var a=this.curr+1;if(a>=this.paragraphs.length){a=0}this.showText(a)},showText:function(a){var b=(this.paragraph_height+this.options.margin)*a;this.fx.start("margin-top","-"+b+"px");this.curr=a},start:function(){this.interval=setInterval(this.nextText.bind(this),6000)},stop:function(){clearInterval(this.interval);this.interval=null}});TextScroller.implement(new Options);var DropDown=new Class({options:{width:null,padding:4,dropdownDivClass:"select_div",dropdownBoxClass:"select_dropdown_container",dropdownClass:"select_dropdown",dropdownImageClass:"select_image",dropDownImage:base_url+"images/form/butt_arrow.gif",dropDownImageWidth:16,dropDownImageHeight:14,selectText:"Select Option..",scrollbarBoxClass:"ddselect_dropdown_slider",sliderClass:"ddslider",sliderBackgroundClass:"ddslider_knob_bg",sliderKnobClass:"ddslider_knob",sliderKnobTopClass:"ddslider_knob_top",sliderKnobBottomClass:"ddslider_knob_bottom",scrollbarUpClass:"ddslider_up",scrollbarDownClass:"ddslider_down"},element:null,dropdown_status:false,dropdown:null,inputDiv:null,imageButton:null,dropDownOptions:[],selectOptions:null,coords:null,toggled:false,dropdownCreated:false,initialize:function(c,a,b){this.setOptions(b);this.element=c;this.element.style.display="inline";if(!this.options.width){this.options.width=this.element.getWidth()-this.options.dropDownImageWidth}this.element.style.display="none";this.selectedIndex=a;this.selectDiv=$(this.element.nextSibling.nextSibling);this.inputDiv=$(this.selectDiv.childNodes[0]).set("html",this.options.selectText);this.imageButton=$(this.selectDiv.childNodes[1]);this.inputDiv.addEvent("click",function(d){d=new Event(d).stop();this.toggleDropDown();this.toggled=true;document.fireEvent("click")}.bind(this));this.imageButton.addEvent("click",function(d){d=new Event(d).stop();this.toggleDropDown();this.toggled=true;document.fireEvent("click")}.bind(this));document.addEvent("click",function(d){if(this.dropdown_status&&!this.toggled){this.toggleDropDown()}this.toggled=false}.bind(this));new Asset.image(base_url+"images/form/bg_dropdown.png")},toggleDropDown:function(){if(!this.dropdownCreated){this.createDropDown()}if(this.dropdown_status){this.dropdownBox.setStyles({display:"none","z-index":"1"});this.dropdown_status=false}else{var a=this.selectDiv.getCoordinates();this.dropdownBox.setStyles({display:"block","z-index":"1000",left:a.left+"px",top:(a.top+this.inputDiv.offsetHeight)+"px"});if(this.element.options.length>8&&!this.dropdown_contentslider){this.dropdown_contentslider=new ContentSlider(this.dropdown,this.scrollbarBox,{max_height:154,sliderTrackClass:"ddslider",sliderUpClass:"ddslider_up",sliderDownClass:"ddslider_down",sliderKnobClass:"ddslider_knob",sliderKnobMin:31,updateWidth:false})}this.dropdown_status=true}},selectOption:function(b,a){if(Browser.Engine.name=="trident"){this.inputDiv.innerText=this.element.options[b].text}else{this.inputDiv.innerHTML=this.element.options[b].text}if(!a){this.toggleDropDown();this.dropdown.childNodes[this.selectedIndex].setStyles({background:"#f0f0f0",color:"#2b292a"})}this.selectedIndex=b;this.element.selectedIndex=b;this.element.fireEvent("change")},createDropDown:function(){this.dropdownBox=new Element("div",{"class":this.options.dropdownBoxClass,styles:{display:"none",position:"absolute"}});this.dropdown=new Element("div",{"class":this.options.dropdownClass,styles:{position:"relative"}});for(var c=0;c<this.element.options.length;c++){var b=new Element("div").set("html",this.element.options[c].text);b.addEvent("click",function(k){k=new Event(k).stop();var f=$(k.target);var h=false;var g=0;var i=f.getParent();while(!h&&g<this.element.options.length){if(f==i.childNodes[g]){h=true}else{g++}}this.selectOption(g)}.bind(this));b.addEvent("mouseenter",function(){this.setStyles({background:"#f0f0f0",color:"#2b292a"})});b.addEvent("mouseleave",function(k){k=new Event(k).stop();var h=false;var g=0;var f=$(k.target);var i=f.getParent();while(!h&&g<this.element.options.length){if(f==i.childNodes[g]){h=true}else{g++}}if(h&&g!=this.selectedIndex){f.setStyles({background:"transparent",color:"#383838"})}}.bind(this));b.injectInside(this.dropdown);if(this.element.options[c].selected){b.setStyles({background:"#f0f0f0",color:"#2b292a"})}}this.dropdown.inject(this.dropdownBox);this.dropdownBox.inject(document.body);this.dropdownBox.addEvent("click",function(f){f=new Event(f).stop()}.bind(this));dropdown_width=(this.options.width+this.options.dropDownImageWidth);this.scrollbarBox=new Element("div",{"class":this.options.scrollbarBoxClass});var d=0;var a=0;if(this.element.options.length>8){dropdown_height="154";a="154";d=10;this.dropdownBox.setStyle("height",dropdown_height+"px");this.slider=new Element("div",{"class":this.options.sliderClass});this.sliderKnob=new Element("div",{"class":this.options.sliderKnobClass});this.scrollbarUp=new Element("img",{"class":this.options.scrollbarUpClass,src:base_url+"images/form/scroll_up.gif",width:6,height:6});this.scrollbarDown=new Element("img",{"class":this.options.scrollbarDownClass,src:base_url+"images/form/scroll_down.gif",width:6,height:6});this.scrollbarUp.inject(this.scrollbarBox);this.slider.inject(this.scrollbarBox);this.sliderKnob.inject(this.slider);this.scrollbarDown.inject(this.scrollbarBox);select_width=dropdown_width-14}else{select_width=dropdown_width-4}this.dropdown.setStyle("width",select_width+"px");this.scrollbarBox.inject(this.dropdownBox);this.dropdownBox.setStyle("width",dropdown_width+"px");this.scrollbarBox.setStyles({width:d+"px",height:a+"px"});this.dropdownCreated=true},destroyDropDown:function(){if(this.dropdownCreated){this.dropdownBox.removeEvent("click");this.dropdownBox.getElements("li").each(function(a){a.removeEvents(["click","mouseenter","mouseleave"])});if(this.dropdown_contentslider){this.dropdown_contentslider=null}this.dropdownBox.destroy();this.dropdownCreated=false}}});DropDown.implement(new Options);var ContentSlider=new Class({options:{steps:100,max_height:400,sliderTrackClass:"slider",sliderUpClass:"sliderUp",sliderDownClass:"sliderDown",sliderKnobClass:"sliderknob",sliderKnobMin:26,updateWidth:true,fadeInSlider:false},old_step:0,scroll:null,step_delta:0,knobmousedown:false,content_box:null,sliderContainer:null,slider:null,sliderUp:null,sliderDown:null,sliderKnob:null,initialize:function(c,b,a){this.content_box=c;this.sliderContainer=b;this.setOptions(a);if(this.options.fadeInSlider){this.sliderContainer.setOpacity(0)}this.sliderTrack=this.sliderContainer.getElement("."+this.options.sliderTrackClass);this.sliderUp=this.sliderContainer.getElement("."+this.options.sliderUpClass);this.sliderDown=this.sliderContainer.getElement("."+this.options.sliderDownClass);this.sliderKnob=this.sliderContainer.getElement("."+this.options.sliderKnobClass);box_sh=this.content_box.scrollHeight;if(box_sh>this.options.max_height){this.content_box.setStyle("height",this.options.max_height+"px");if(this.options.updateWidth){this.content_box.setStyle("width",(this.content_box.getScrollSize().x-40)+"px")}this.content_box.setStyle("overflow","hidden");this.sliderTrack.setStyle("display","block");this.sliderTrack.setStyle("height",(this.options.max_height-2*15)+"px");this.sliderTrack.setStyle("margin-bottom","0px");this.sliderUp.setStyle("display","block");this.sliderDown.setStyle("display","block");this.sliderknob_h=this.sliderTrack.getStyle("height").toInt()*this.content_box.getStyle("height").toInt()/box_sh;if(this.sliderknob_h<this.options.sliderKnobMin){this.sliderknob_h=this.options.sliderKnobMin}this.sliderKnob.setStyle("height",Math.floor(this.sliderknob_h)+"px");if(this.options.fadeInSlider){this.sliderContainer.set("tween",{duration:1000});this.sliderContainer.tween("opacity",1)}this.scroll=new Fx.Scroll(this.content_box,{wait:false,duration:1000});this.slider=new Slider(this.sliderTrack,this.sliderKnob,{steps:this.options.steps,mode:"vertical",onChange:this.sliderChange.bind(this)}).set(0);this.sliderKnob.addEvent("mousedown",function(d){if(d.target==this.sliderKnob){this.knobmousedown=true}}.bind(this));this.sliderKnob.addEvent("mouseup",function(d){if(d.target==this.sliderKnob){this.knobmousedown=false}}.bind(this));this.step_delta=this.options.steps*100/this.content_box.scrollHeight;this.slider.addEvent("mousewheel",function(f){f=new Event(f).stop();var d=Math.floor(f.wheel*this.step_delta);this.slider.set(this.slider.step-d)}.bind(this));this.content_box.addEvent("mousewheel",function(f){f=new Event(f).stop();var d=Math.floor(f.wheel*this.step_delta);this.slider.set(this.slider.step-d)}.bind(this));this.sliderUp.addEvent("click",function(f){f=new Event(f).stop();var d=2*this.step_delta;this.slider.set(this.slider.step-d)}.bind(this));this.sliderDown.addEvent("click",function(f){f=new Event(f).stop();var d=2*this.step_delta;this.slider.set(this.slider.step+d)}.bind(this));this.content_box.getElements("a").each(function(d){href=d.getAttribute("href");if(href&&String.contains(href,"#")){parts=href.split("#");if(parts.length>1&&parts[1]!=""){d.addEvent("click",function(g){g=new Event(g).stop();this.knobmousedown=false;var f=d.getAttribute("href").split("#")[1];this.scrollToTarget(f)}.bind(this))}}}.bind(this))}else{this.content_box.setStyle("height",this.options.max_height+"px")}if(this.options.initialize){this.options.initialize.call(this)}},changeScrollHeight:function(){if(this.content_box.scrollHeight>this.options.max_height){this.sliderknob_h=this.sliderTrack.getStyle("height").toInt()*this.content_box.getStyle("height").toInt()/this.content_box.scrollHeight;if(this.sliderknob_h<26){this.sliderknob_h=26}this.sliderKnob.setStyle("height",Math.floor(this.sliderknob_h)+"px");this.step_delta=this.options.steps*100/this.content_box.scrollHeight}},sliderChange:function(){if(this.scroll&&this.slider){this.scroll.cancel();var a=(this.content_box.scrollHeight-this.content_box.getStyle("height").toInt())*this.slider.step/this.options.steps;this.content_box.scrollTo(0,a);this.old_step=this.slider.step}},scrollToTarget:function(a){found=false;as=this.content_box.getElements("a");ao=null;j=0;while(!found&&j<as.length){if(as[j].getAttribute("name")==a){found=true;ao=as[j]}j++}if(ao){this.scroll.cancel();this.slider.set(this.options.steps*ao.offsetTop/(this.content_box.scrollHeight-this.content_box.offsetHeight))}}});ContentSlider.implement(new Options);function checkEmail(a){var b=true;if(a==""){b=false}else{if(!isRFC822ValidEmail(a)){b=false}}return b}function isRFC822ValidEmail(k){var b="[^\\x0d\\x22\\x5c\\x80-\\xff]";var c="[^\\x0d\\x5b-\\x5d\\x80-\\xff]";var o="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+";var m="\\x5c[\\x00-\\x7f]";var h="\\x5b("+c+"|"+m+")*\\x5d";var f="\\x22("+b+"|"+m+")*\\x22";var a=o;var p="("+a+"|"+h+")";var e="("+o+"|"+f+")";var n=p+"(\\x2e"+p+")*";var i=e+"(\\x2e"+e+")*";var d=i+"\\x40"+n;var l="^"+d+"$";var g=new RegExp(l);if(g.test(k)){return true}return false};